summaryrefslogtreecommitdiffhomepage
path: root/themes/docsy/layouts/_default
diff options
context:
space:
mode:
authorIan Lewis <ianmlewis@gmail.com>2019-03-29 22:40:11 -0400
committerIan Lewis <ianmlewis@gmail.com>2019-03-29 22:40:11 -0400
commit22f1890a9beab11d8cfdceba3a4d66f8bbbb468c (patch)
tree110ec3a84a72560244ee4476852295b86a737eb0 /themes/docsy/layouts/_default
Initial commit
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.xml48
-rw-r--r--themes/docsy/layouts/_default/search.html22
-rw-r--r--themes/docsy/layouts/_default/single.html5
6 files changed, 112 insertions, 0 deletions
diff --git a/themes/docsy/layouts/_default/baseof.html b/themes/docsy/layouts/_default/baseof.html
new file mode 100644
index 000000000..5767a951f
--- /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 000000000..b574ad29c
--- /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 000000000..b2e137af6
--- /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 000000000..ae4f908ae
--- /dev/null
+++ b/themes/docsy/layouts/_default/list.rss.xml
@@ -0,0 +1,48 @@
+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
+ <channel>
+ <title>{{ .Site.Title }} – {{ .Title }}</title>
+ <link>{{ .Permalink }}</link>
+ <description>Recent Hugo news from gohugo.io</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 }}
+ <image>
+ <url>{{ "img/hugo.png" | absURL }}</url>
+ <title>GoHugo.io</title>
+ <link>{{ .Permalink }}</link>
+ </image>
+ {{ 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> \ No newline at end of file
diff --git a/themes/docsy/layouts/_default/search.html b/themes/docsy/layouts/_default/search.html
new file mode 100644
index 000000000..395c398df
--- /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 000000000..b2e137af6
--- /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