aboutsummaryrefslogtreecommitdiff
path: root/themes/docsy/layouts/_default
diff options
context:
space:
mode:
authorDimitri Staessens <[email protected]>2019-10-06 21:10:46 +0200
committerDimitri Staessens <[email protected]>2019-10-06 21:10:46 +0200
commit568553394d0a8b34668a75c9839a0f1f426469b2 (patch)
tree175c08844f05611b059ba6900fb6519dbbc735d2 /themes/docsy/layouts/_default
parentd5d6f70371958eec0679831abd283498ff2731e5 (diff)
downloadwebsite-568553394d0a8b34668a75c9839a0f1f426469b2.tar.gz
website-568553394d0a8b34668a75c9839a0f1f426469b2.zip
theme: Switch to docsy theme
Diffstat (limited to 'themes/docsy/layouts/_default')
-rw-r--r--themes/docsy/layouts/_default/baseof.html18
-rw-r--r--themes/docsy/layouts/_default/content.html14
-rw-r--r--themes/docsy/layouts/_default/list.html5
-rw-r--r--themes/docsy/layouts/_default/list.rss.xml43
-rw-r--r--themes/docsy/layouts/_default/search.html22
-rw-r--r--themes/docsy/layouts/_default/single.html5
6 files changed, 107 insertions, 0 deletions
diff --git a/themes/docsy/layouts/_default/baseof.html b/themes/docsy/layouts/_default/baseof.html
new file mode 100644
index 0000000..5767a95
--- /dev/null
+++ b/themes/docsy/layouts/_default/baseof.html
@@ -0,0 +1,18 @@
+<!doctype html>
+<html lang="{{ .Site.Language.Lang }}" class="no-js">
+ <head>
+ {{ partial "head.html" . }}
+ </head>
+ <body class="td-{{ .Kind }}">
+ <header>
+ {{ partial "navbar.html" . }}
+ </header>
+ <div class="container-fluid td-default td-outer">
+ <main role="main" class="td-main">
+ {{ block "main" . }}{{ end }}
+ </main>
+ {{ partial "footer.html" . }}
+ </div>
+ {{ partialCached "scripts.html" . }}
+ </body>
+</html> \ No newline at end of file
diff --git a/themes/docsy/layouts/_default/content.html b/themes/docsy/layouts/_default/content.html
new file mode 100644
index 0000000..b574ad2
--- /dev/null
+++ b/themes/docsy/layouts/_default/content.html
@@ -0,0 +1,14 @@
+<div class="td-content">
+ <h1>{{ .Title }}</h1>
+ {{ with .Params.description }}<div class="lead">{{ . | markdownify }}</div>{{ end }}
+ {{ .Content }}
+ {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }}
+ {{ partial "feedback.html" .Site.Params.ui.feedback }}
+ <br />
+ {{ end }}
+ {{ if (.Site.DisqusShortname) }}
+ <br />
+ {{ partial "disqus-comment.html" . }}
+ {{ end }}
+ <div class="text-muted mt-5 pt-3 border-top">{{ partial "page-meta-lastmod.html" . }}</div>
+</div>
diff --git a/themes/docsy/layouts/_default/list.html b/themes/docsy/layouts/_default/list.html
new file mode 100644
index 0000000..b2e137a
--- /dev/null
+++ b/themes/docsy/layouts/_default/list.html
@@ -0,0 +1,5 @@
+{{ define "main" }}
+{{ with .Content }}
+{{ . }}
+{{ end }}
+{{ end }} \ No newline at end of file
diff --git a/themes/docsy/layouts/_default/list.rss.xml b/themes/docsy/layouts/_default/list.rss.xml
new file mode 100644
index 0000000..b74bc35
--- /dev/null
+++ b/themes/docsy/layouts/_default/list.rss.xml
@@ -0,0 +1,43 @@
+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
+ <channel>
+ <title>{{ .Site.Title }} – {{ .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 }}
+ {{ if not $.Section }}
+ {{ $sections := .Site.Params.rss_sections | default (slice "blog") }}
+ {{ .Scratch.Set "rss_pages" (first 50 (where $.Site.RegularPages "Type" "in" $sections )) }}
+ {{ else }}
+ {{ if $.Parent.IsHome }}
+ {{ .Scratch.Set "rss_pages" (first 50 (where $.Site.RegularPages "Type" $.Section )) }}
+ {{ else }}
+ {{ .Scratch.Set "rss_pages" (first 50 $.Pages) }}
+ {{ end }}
+ {{ end }}
+ {{ range (.Scratch.Get "rss_pages") }}
+ <item>
+ <title>{{ .Section | 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>
+ {{ $img := (.Resources.ByType "image").GetMatch "*featured*" }}
+ {{ with $img }}
+ {{ $img := .Resize "640x" }}
+ {{ printf "<![CDATA[<img src=\"%s\" width=\"%d\" height=\"%d\"/>]]>" $img.Permalink $img.Width $img.Height | safeHTML }}
+ {{ end }}
+ {{ .Content | html }}
+ </description>
+ </item>
+ {{ end }}
+ </channel>
+</rss>
diff --git a/themes/docsy/layouts/_default/search.html b/themes/docsy/layouts/_default/search.html
new file mode 100644
index 0000000..395c398
--- /dev/null
+++ b/themes/docsy/layouts/_default/search.html
@@ -0,0 +1,22 @@
+{{ define "main" }}
+<section class="row td-search-result">
+<div class="col-12 col-md-8 offset-md-2">
+<h2 class="ml-4">{{ .Title }}</h2>
+{{ with .Site.Params.gcs_engine_id }}
+<script>
+(function() {
+var cx = '{{ . }}';
+var gcse = document.createElement('script');
+gcse.type = 'text/javascript';
+gcse.async = true;
+gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
+var s = document.getElementsByTagName('script')[0];
+s.parentNode.insertBefore(gcse, s);
+})();
+</script>
+ <gcse:searchresults-only></gcse:searchresults-only>
+{{ end }}
+</div>
+</section>
+
+{{ end }} \ No newline at end of file
diff --git a/themes/docsy/layouts/_default/single.html b/themes/docsy/layouts/_default/single.html
new file mode 100644
index 0000000..b2e137a
--- /dev/null
+++ b/themes/docsy/layouts/_default/single.html
@@ -0,0 +1,5 @@
+{{ define "main" }}
+{{ with .Content }}
+{{ . }}
+{{ end }}
+{{ end }} \ No newline at end of file