Vugo theme
This commit is contained in:
commit
64b0159616
33 changed files with 1224 additions and 0 deletions
22
vugo/layouts/_default/baseof.html
Normal file
22
vugo/layouts/_default/baseof.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ $.Site.Language }}">
|
||||
<head>
|
||||
{{ block "title" . }}
|
||||
<title>{{ if .IsHome }}{{ $.Site.Title }}{{ else }}{{ .Title }} | {{ $.Site.Title }}{{ end }}</title>
|
||||
{{ end }}
|
||||
{{ partial "head.html" . }}
|
||||
</head>
|
||||
<body>
|
||||
{{ partial "logo.html" . }}
|
||||
{{ partial "menu.html" . }}
|
||||
<h1 class="page-head">{{ .Title | markdownify }}</h1>
|
||||
<main>
|
||||
{{ block "main" . }}
|
||||
{{ end }}
|
||||
</main>
|
||||
{{ block "footer" . }}
|
||||
{{ partial "footer.html" . }}
|
||||
{{ end }}
|
||||
|
||||
</body>
|
||||
</html>
|
16
vugo/layouts/_default/index.html
Normal file
16
vugo/layouts/_default/index.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{{ define "main" }}
|
||||
{{ .Content -}}
|
||||
<div class="posts">
|
||||
{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "rambles") (eq (trim $.Site.Params.contentTypeName " ") "")) }} {{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "rambles" }} {{ $PageContext := . }} {{ if .IsHome }} {{ $PageContext = .Site }} {{ end }} {{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
|
||||
<table class="post-entry-meta"> {{ range first 10 .Paginator.Pages }}
|
||||
<tr>
|
||||
<td><a href="{{ .RelPermalink }}">{{ .Title | markdownify}}</a></td>
|
||||
<td>{{ .Params.Date.Format "2006-01-02" }}</td>
|
||||
<td>{{ .Params.Author }}</td>
|
||||
<td>{{ range .Params.tags }} #<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a>{{ end }}</td>
|
||||
</tr> {{ end }}
|
||||
</table>
|
||||
<p><a class="button" href="/rambles">Read more</a></p>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
25
vugo/layouts/_default/list.html
Normal file
25
vugo/layouts/_default/list.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
{{ define "main" }}
|
||||
{{ if .Content }}
|
||||
<article>
|
||||
{{ .Content -}}
|
||||
</article>
|
||||
{{ end }}
|
||||
<div class="posts">
|
||||
<table class="post-entry-meta">
|
||||
{{ range .Paginator.Pages }}
|
||||
<tr>
|
||||
<td><a href="{{ .RelPermalink }}">{{ .Title | markdownify}}</a></td>
|
||||
<td>{{ .Params.Date.Format "2006-01-02" }}</td>
|
||||
<td>{{ .Params.Author }}</td>
|
||||
<td > {{ range .Params.tags }} #<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a> {{ end }}</td>
|
||||
<!--
|
||||
{{ if and (.Param "readingTime") (eq (.Param "readingTime") true) }}
|
||||
<td class="post-reading-time">- {{ .ReadingTime }} min read ({{ .WordCount }} words)</td>
|
||||
{{ end }}
|
||||
-->
|
||||
</tr>
|
||||
{{ end }}
|
||||
</table>
|
||||
</div>
|
||||
{{ partial "pagination.html" . }}
|
||||
{{ end }}
|
39
vugo/layouts/_default/rss.xml
Normal file
39
vugo/layouts/_default/rss.xml
Normal file
|
@ -0,0 +1,39 @@
|
|||
{{- $pctx := . -}}
|
||||
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
|
||||
{{- $pages := slice -}}
|
||||
{{- if or $.IsHome $.IsSection -}}
|
||||
{{- $pages = $pctx.RegularPages -}}
|
||||
{{- else -}}
|
||||
{{- $pages = $pctx.Pages -}}
|
||||
{{- end -}}
|
||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||
{{- if ge $limit 1 -}}
|
||||
{{- $pages = $pages | first $limit -}}
|
||||
{{- end -}}
|
||||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ .Site.Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
||||
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
||||
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
|
||||
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
|
||||
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
||||
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
{{- with .OutputFormats.Get "RSS" -}}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{- end -}}
|
||||
{{ range $pages }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ .Content | html }}</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
</channel>
|
||||
</rss>
|
43
vugo/layouts/_default/single.html
Normal file
43
vugo/layouts/_default/single.html
Normal file
|
@ -0,0 +1,43 @@
|
|||
{{ define "main" }}
|
||||
{{ if eq .Type $.Site.Params.contentTypeName }}
|
||||
<div class="post-meta">
|
||||
{{ if .Params.Date }} <span class="post-date"> {{ .Date.Format "2006-01-02" }} </span> {{ end }}
|
||||
{{ with .Params.Author }} <span> - </span> <span class="post-author">{{ . }}</span> {{ end }}
|
||||
<span class="post-reading-time">- {{ .ReadingTime }} min read ({{ .WordCount }} words)</span>
|
||||
</span>
|
||||
|
||||
{{ if .Params.tags }}
|
||||
<span class="post-tags">
|
||||
{{ range .Params.tags }}
|
||||
#<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if (.Params.Toc | default .Site.Params.Toc) }}
|
||||
<div class="table-of-contents">
|
||||
<h2>
|
||||
{{ (.Params.TocTitle | default .Site.Params.TocTitle) | default "Table of Contents" }}
|
||||
</h2>
|
||||
{{ .TableOfContents }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if eq .Type $.Site.Params.contentTypeName }}
|
||||
<div class="post-content">
|
||||
{{- with .Content -}}
|
||||
{{ . | replaceRE "(<h[1-9] id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1} <a href="#${2}" class="anchor" ariaLabel="Anchor">#</a> ${3}` | safeHTML }}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{ else }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
|
||||
{{ if eq .Type $.Site.Params.contentTypeName }}
|
||||
{{ partial "posts_pagination.html" . }}
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
{{ end }}
|
7
vugo/layouts/partials/footer.html
Normal file
7
vugo/layouts/partials/footer.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<footer>
|
||||
<div class="mirror">
|
||||
[<a rel="rss" href="/index.xml">rss</a>]
|
||||
[*Insert mirrors here*]
|
||||
<a rel="lisence" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="CC BY-SA 4.0" src="/stickers/cc4.png"></a>
|
||||
</div>
|
||||
</footer>
|
13
vugo/layouts/partials/head.html
Normal file
13
vugo/layouts/partials/head.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<head>
|
||||
<link rel="canonical" href="{{ .Site.BaseURL }}">
|
||||
<link rel='alternate' type='application/rss+xml' title="{{ .Site.Title }} RSS" href='/index.xml'>
|
||||
<link rel='stylesheet' type='text/css' href='/style.css'>
|
||||
{{ with .Site.Params.favicon }}<link rel="icon" href="{{ . }}">
|
||||
{{ end -}}
|
||||
<meta name="description" content="{{ with .Params.description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}">
|
||||
{{ if isset .Params "tags" }}<meta name="keywords" content="{{ with .Params.tags }}{{ delimit . ", " }}{{ end }}">
|
||||
{{ end -}}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="robots" content="index, follow">
|
||||
<meta charset="utf-8">
|
||||
</head>
|
8
vugo/layouts/partials/logo.html
Normal file
8
vugo/layouts/partials/logo.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<div class="logo">
|
||||
<img src="/logoOptimised.png" />
|
||||
<h1>
|
||||
<a href="{{ if $.Site.Params.Logo.LogoHomeLink }}{{ $.Site.Params.Logo.LogoHomeLink }}{{else}}{{ $.Site.BaseURL }}{{ end }}">
|
||||
{{ with $.Site.Params.Logo.logoText }}{{ . }}{{ else }}Void{{ end }}
|
||||
</a>
|
||||
</h1>
|
||||
</div>
|
6
vugo/layouts/partials/menu.html
Normal file
6
vugo/layouts/partials/menu.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
<menu>
|
||||
<a href="/">home<br/></a> {{ range $.Site.Menus.main }} {{ if not .HasChildren }}
|
||||
<a href="{{ .URL }}">{{ .Name }}<br/></a> {{ end }} {{ end }}
|
||||
<hr />
|
||||
{{ range $.Site.Menus.services }} {{ if not .HasChildren }} <a href="{{ .URL }}">{{ .Name }}<br/></a> {{ end }} {{ end }}
|
||||
</menu>
|
10
vugo/layouts/partials/nextprev.html
Normal file
10
vugo/layouts/partials/nextprev.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{ if or .Next .Prev -}}
|
||||
<div id="nextprev">
|
||||
{{- with .Prev }}
|
||||
<a href="{{ .RelPermalink}}"><div id="prevart">Previous:<br>{{.Title}}</div></a>
|
||||
{{ end -}}
|
||||
{{- with .Next -}}
|
||||
<a href="{{ .RelPermalink}}"><div id="nextart">Next:<br>{{.Title}}</div></a>
|
||||
{{ end -}}
|
||||
</div>
|
||||
{{ end -}}
|
8
vugo/layouts/partials/pagination.html
Normal file
8
vugo/layouts/partials/pagination.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<div class="pagination__buttons">
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<a class="button prev" href="{{ .Paginator.Prev.URL }}"> {{ $.Site.Params.newerPosts | default "Newer posts" }} </a>
|
||||
{{ end }}
|
||||
{{ if .Paginator.HasNext }}
|
||||
<a class="button next" href="{{ .Paginator.Next.URL }}"> {{ $.Site.Params.olderPosts | default "Older posts" }} </a>
|
||||
{{ end }}
|
||||
</div>
|
8
vugo/layouts/partials/posts_pagination.html
Normal file
8
vugo/layouts/partials/posts_pagination.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<div class="pagination__buttons">
|
||||
{{ if .NextInSection }}
|
||||
<a class="button prev" href="{{ .NextInSection.RelPermalink }}">{{ .NextInSection.Title }}</a>
|
||||
{{ end }}
|
||||
{{ if .PrevInSection }}
|
||||
<a class="button next" href="{{ .PrevInSection.RelPermalink }}">{{ .PrevInSection.Title }}</a>
|
||||
{{ end }}
|
||||
</div>
|
6
vugo/layouts/shortcodes/audio.html
Normal file
6
vugo/layouts/shortcodes/audio.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
<audio controls="true">
|
||||
<source src="{{.Get "src" }}" type="audio/{{.Get "audio" }}">
|
||||
Sorry mate, your browser doesn't support playing audio files.
|
||||
</source>
|
||||
</audio>
|
||||
|
1
vugo/layouts/shortcodes/bold-gay.html
Normal file
1
vugo/layouts/shortcodes/bold-gay.html
Normal file
|
@ -0,0 +1 @@
|
|||
<b class="gay">{{ .Get "content" }}</b>
|
1
vugo/layouts/shortcodes/bold-italic-gay.html
Normal file
1
vugo/layouts/shortcodes/bold-italic-gay.html
Normal file
|
@ -0,0 +1 @@
|
|||
<b class="gay"><i>{{ .Get "content" }}</i></b>
|
1
vugo/layouts/shortcodes/end-details.html
Normal file
1
vugo/layouts/shortcodes/end-details.html
Normal file
|
@ -0,0 +1 @@
|
|||
</details>
|
1
vugo/layouts/shortcodes/gay.html
Normal file
1
vugo/layouts/shortcodes/gay.html
Normal file
|
@ -0,0 +1 @@
|
|||
<span class="gay">{{ .Get "content" }}</span>
|
1
vugo/layouts/shortcodes/hyperbowl.html
Normal file
1
vugo/layouts/shortcodes/hyperbowl.html
Normal file
|
@ -0,0 +1 @@
|
|||
<blockquote class="hyperbowl">"{{ .Get "content" }}"</blockquote>
|
20
vugo/layouts/shortcodes/img.html
Normal file
20
vugo/layouts/shortcodes/img.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<!--
|
||||
class: class of the figure
|
||||
link: url the image directs to
|
||||
alt: alternative text
|
||||
caption: caption
|
||||
mouse: what the image says when moused over ("title" in HTML)
|
||||
-->
|
||||
<figure {{ with .Get "class" }}class="{{.}}"{{ end -}}>
|
||||
{{- with .Get "link"}}<a href="{{.}}">{{ end -}}
|
||||
<img src="{{ .Get "src" }}"
|
||||
{{- with .Get "mouse" }} title="{{.}}"{{ end -}}
|
||||
{{- with .Get "alt" }} alt="{{.}}"{{ end -}}
|
||||
>
|
||||
{{- if .Get "link"}}</a>{{ end -}}
|
||||
{{- with .Get "caption" -}}
|
||||
<figcaption>
|
||||
{{- . -}}
|
||||
</figcaption>
|
||||
{{- end -}}
|
||||
</figure>
|
1
vugo/layouts/shortcodes/italic-gay.html
Normal file
1
vugo/layouts/shortcodes/italic-gay.html
Normal file
|
@ -0,0 +1 @@
|
|||
<i class="gay">{{ .Get "content" }}</i>
|
4
vugo/layouts/shortcodes/noscript.html
Normal file
4
vugo/layouts/shortcodes/noscript.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<noscript>
|
||||
<hr />
|
||||
<p class="gay">{{ .Get "content" }}</p>
|
||||
</noscript>
|
4
vugo/layouts/shortcodes/start-details.html
Normal file
4
vugo/layouts/shortcodes/start-details.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<details>
|
||||
<summary>
|
||||
{{ .Get "summary" }}
|
||||
</summary>
|
3
vugo/layouts/shortcodes/tagcloud.html
Normal file
3
vugo/layouts/shortcodes/tagcloud.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
{{ if isset .Site.Taxonomies "tags" }}{{ if not (eq (len .Site.Taxonomies.tags) 0) }} <ul id="tagcloud">
|
||||
{{ range $name, $items := .Site.Taxonomies.tags }}{{ $url := printf "%s/%s" "tags" ($name | urlize | lower)}}<li><a href="{{ $url | absURL }}" id="tag_{{ $name }}">{{ $name | title }}</a></li>
|
||||
{{ end }}</ul>{{ end }}{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue