summaryrefslogtreecommitdiff
path: root/themes/schizo/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'themes/schizo/layouts')
-rw-r--r--themes/schizo/layouts/_default/baseof.html36
-rw-r--r--themes/schizo/layouts/_default/list.html20
-rw-r--r--themes/schizo/layouts/_default/rss.xml26
-rw-r--r--themes/schizo/layouts/_default/single.html3
-rw-r--r--themes/schizo/layouts/index.html0
-rw-r--r--themes/schizo/layouts/partials/nav.html8
-rw-r--r--themes/schizo/layouts/partials/nextprev.html10
-rw-r--r--themes/schizo/layouts/partials/taglist.html13
-rw-r--r--themes/schizo/layouts/shortcodes/hidvid.html10
-rw-r--r--themes/schizo/layouts/shortcodes/img.html20
-rw-r--r--themes/schizo/layouts/shortcodes/tagcloud.html3
-rw-r--r--themes/schizo/layouts/shortcodes/vid.html6
12 files changed, 155 insertions, 0 deletions
diff --git a/themes/schizo/layouts/_default/baseof.html b/themes/schizo/layouts/_default/baseof.html
new file mode 100644
index 0000000..57e17ce
--- /dev/null
+++ b/themes/schizo/layouts/_default/baseof.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html lang="{{ .Site.Language }}">
+<head>
+ <title>{{ if not .IsHome }}{{ .Title | title }} | {{ end }}{{ .Site.Title }}</title>
+ <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>
+<body>
+{{ if .Site.Menus.main }}{{ partial "nav.html" . }}{{ end -}}
+<main>
+<header><h1 id="tag_{{ .Title }}">{{ block "title" . }}{{ end }}</h1></header>
+<article>
+{{ block "main" . }}
+{{ .Content }}
+{{ end }}
+{{ if .Param "nextprev" }}{{ partial "nextprev.html" . -}}{{ end -}}
+{{ if .Param "taglist" }}{{ partial "taglist.html" . }}{{ end -}}
+</article>
+</main>
+{{ block "footer" . }}
+<footer>
+ <a href="{{ .Site.BaseURL }}">{{ .Site.BaseURL }}</a>
+ {{- if .Param "showrss" }}<br><br><a href="/index.xml"><img src="/rss.svg" style="max-height:1.5em" alt="RSS Feed" title="Subscribe via RSS for updates."></a>{{ end }}
+</footer>
+{{ end }}
+</body>
+</html>
diff --git a/themes/schizo/layouts/_default/list.html b/themes/schizo/layouts/_default/list.html
new file mode 100644
index 0000000..601fc08
--- /dev/null
+++ b/themes/schizo/layouts/_default/list.html
@@ -0,0 +1,20 @@
+{{ define "title" -}}
+{{ .Title | title }}
+{{- end }}
+{{ define "main" -}}
+{{ .Content }}
+<ul>
+{{- range.Pages }}
+<li>
+ {{- if .Param "datesinlist" }}<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006 Jan 02" }}</time> &ndash; {{ end -}}
+ <a href="{{ .RelPermalink }}">{{ .Title }}</a>
+ {{- if .Param "authorsinlist" }}
+ {{ with .Params.authors }}
+ by
+ {{ delimit . ", " " and " }}
+ {{end}}
+ {{ end -}}
+</li>
+{{- end }}
+</ul>
+{{- end }}
diff --git a/themes/schizo/layouts/_default/rss.xml b/themes/schizo/layouts/_default/rss.xml
new file mode 100644
index 0000000..38dbe3d
--- /dev/null
+++ b/themes/schizo/layouts/_default/rss.xml
@@ -0,0 +1,26 @@
+<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 .Site.RegularPages }}
+ <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>
diff --git a/themes/schizo/layouts/_default/single.html b/themes/schizo/layouts/_default/single.html
new file mode 100644
index 0000000..56c5a11
--- /dev/null
+++ b/themes/schizo/layouts/_default/single.html
@@ -0,0 +1,3 @@
+{{ define "title" -}}
+{{ .Title }}
+{{- end }}
diff --git a/themes/schizo/layouts/index.html b/themes/schizo/layouts/index.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/themes/schizo/layouts/index.html
diff --git a/themes/schizo/layouts/partials/nav.html b/themes/schizo/layouts/partials/nav.html
new file mode 100644
index 0000000..a7318fe
--- /dev/null
+++ b/themes/schizo/layouts/partials/nav.html
@@ -0,0 +1,8 @@
+<nav>
+ <ul>
+ {{- $sec := .Page.Section }}{{ $file := .File.TranslationBaseName -}}
+ {{ range.Site.Menus.main.ByWeight }}{{ $base := path.Base .URL }}
+ <li><a {{ if or ( eq $sec $base ) ( eq $file $base ) ( and (eq $sec "") ( eq $file "_index") (eq $base "/") ) }}class="menuactive" {{ end }}href="{{ .URL }}"><span class=pre>{{ .Pre }}</span><span class=menuname>{{ .Name }}</span></a></li>
+ {{- end }}
+ </ul>
+</nav>
diff --git a/themes/schizo/layouts/partials/nextprev.html b/themes/schizo/layouts/partials/nextprev.html
new file mode 100644
index 0000000..099f16d
--- /dev/null
+++ b/themes/schizo/layouts/partials/nextprev.html
@@ -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 -}}
diff --git a/themes/schizo/layouts/partials/taglist.html b/themes/schizo/layouts/partials/taglist.html
new file mode 100644
index 0000000..757db6f
--- /dev/null
+++ b/themes/schizo/layouts/partials/taglist.html
@@ -0,0 +1,13 @@
+ {{- if isset .Params "tags" -}}
+ {{- $tagsLen := len .Params.tags -}}
+ {{- if gt $tagsLen 0 -}}
+ <div style="clear:both" class=taglist>
+ {{- with .Site.Params.relatedtext }}{{ . }}<br>{{ end -}}
+ {{- range $k, $v := .Params.tags -}}
+ {{- $url := printf "tags/%s" (. | urlize | lower) -}}
+ <a id="tag_{{ . | lower }}" href="{{ $url | absURL }}">{{ . | title }}</a>
+ {{- if lt $k (sub $tagsLen 1) }} &middot; {{ end -}}
+ {{- end -}}
+ </div>
+ {{- end -}}
+ {{- end }}
diff --git a/themes/schizo/layouts/shortcodes/hidvid.html b/themes/schizo/layouts/shortcodes/hidvid.html
new file mode 100644
index 0000000..14f592d
--- /dev/null
+++ b/themes/schizo/layouts/shortcodes/hidvid.html
@@ -0,0 +1,10 @@
+<details>
+ <summary>Click to reveal video.</summary>
+<iframe src="{{ index .Params 0 }}"
+ loading="lazy"
+ sandbox="allow-same-origin allow-scripts allow-popups"
+ allowfullscreen frameborder="0"
+ class="embvid"
+ title="Embedded Video">
+</iframe>
+</details>
diff --git a/themes/schizo/layouts/shortcodes/img.html b/themes/schizo/layouts/shortcodes/img.html
new file mode 100644
index 0000000..ff7959b
--- /dev/null
+++ b/themes/schizo/layouts/shortcodes/img.html
@@ -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>
diff --git a/themes/schizo/layouts/shortcodes/tagcloud.html b/themes/schizo/layouts/shortcodes/tagcloud.html
new file mode 100644
index 0000000..0cf0118
--- /dev/null
+++ b/themes/schizo/layouts/shortcodes/tagcloud.html
@@ -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 }}
diff --git a/themes/schizo/layouts/shortcodes/vid.html b/themes/schizo/layouts/shortcodes/vid.html
new file mode 100644
index 0000000..4c612fe
--- /dev/null
+++ b/themes/schizo/layouts/shortcodes/vid.html
@@ -0,0 +1,6 @@
+<iframe src="{{ index .Params 0 }}"
+ loading="lazy"
+ sandbox="allow-same-origin allow-scripts allow-popups"
+ allowfullscreen frameborder="0"
+ title="Embedded Video">
+</iframe>