aboutsummaryrefslogtreecommitdiffhomepage
path: root/themes/polaris/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'themes/polaris/layouts')
-rw-r--r--themes/polaris/layouts/_default/baseof.html23
-rw-r--r--themes/polaris/layouts/_default/home.html4
-rw-r--r--themes/polaris/layouts/_default/now.html8
-rw-r--r--themes/polaris/layouts/_default/single.html5
-rw-r--r--themes/polaris/layouts/partials/footer.html0
-rw-r--r--themes/polaris/layouts/partials/nav.html16
-rw-r--r--themes/polaris/layouts/partials/posts.html18
7 files changed, 74 insertions, 0 deletions
diff --git a/themes/polaris/layouts/_default/baseof.html b/themes/polaris/layouts/_default/baseof.html
new file mode 100644
index 0000000..b6ccdac
--- /dev/null
+++ b/themes/polaris/layouts/_default/baseof.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>{{ .Site.Title }}</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ {{ $style := resources.Get "css/style.css" | minify | fingerprint }}
+ <link rel="stylesheet" href="{{ $style.Permalink }}">
+ </head>
+ <body>
+ <nav>
+ {{ partial "nav.html" . }}
+ </nav>
+ <main>
+ {{ block "main" . }}
+ {{ .Content }}
+ {{ end }}
+ </main>
+ <footer>
+ {{ partial "footer.html" . }}
+ </footer>
+ </body>
+</html>
diff --git a/themes/polaris/layouts/_default/home.html b/themes/polaris/layouts/_default/home.html
new file mode 100644
index 0000000..6e46985
--- /dev/null
+++ b/themes/polaris/layouts/_default/home.html
@@ -0,0 +1,4 @@
+{{ define "main" }}
+ {{ .Content }}
+ {{ partial "posts.html" }}
+{{ end }}
diff --git a/themes/polaris/layouts/_default/now.html b/themes/polaris/layouts/_default/now.html
new file mode 100644
index 0000000..bb77eaf
--- /dev/null
+++ b/themes/polaris/layouts/_default/now.html
@@ -0,0 +1,8 @@
+{{ define "main" }}
+ <h1>{{ .Title }}</h1>
+ {{ .Content }}
+ <p>
+ Last updated {{ .Date | time.Format "Jan 02 2006" }}.
+ <a href="https://nownownow.com/about">What the heck is a “now page”?</a>
+ </p>
+{{ end }}
diff --git a/themes/polaris/layouts/_default/single.html b/themes/polaris/layouts/_default/single.html
new file mode 100644
index 0000000..d87f112
--- /dev/null
+++ b/themes/polaris/layouts/_default/single.html
@@ -0,0 +1,5 @@
+{{ define "main" }}
+ <h1>{{ .Title }}</h1>
+ <p><em>Written {{ .Date | time.Format "Jan 02 2006" }}.</em></p>
+ {{ .Content }}
+{{ end }}
diff --git a/themes/polaris/layouts/partials/footer.html b/themes/polaris/layouts/partials/footer.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/themes/polaris/layouts/partials/footer.html
diff --git a/themes/polaris/layouts/partials/nav.html b/themes/polaris/layouts/partials/nav.html
new file mode 100644
index 0000000..56d2fa9
--- /dev/null
+++ b/themes/polaris/layouts/partials/nav.html
@@ -0,0 +1,16 @@
+<div class="nav-over">
+ <div class="nav-title">
+ <h2><a href="/">{{ site.Title }}</a></h2>
+ {{ with site.Params.subtext }}<span class="nav-subtext">{{ . }}</span>{{ end }}
+ </div>
+ <ul>
+ {{ $currentPage := . }}
+ {{ range site.Menus.left_nav }}
+ <li><a class="nav-link link-left {{ if $currentPage.IsMenuCurrent "left_nav" . }} link-active {{ end }}" href=" {{ .URL }}">{{ .Name }}</a></li>
+ {{ end }}
+ {{ range site.Menus.right_nav }}
+ <li><a class="nav-link link-right" href=" {{ .URL }}">{{ .Name }}</a></li>
+ {{ end }}
+ </ul>
+</div>
+<div class="nav-under"></div>
diff --git a/themes/polaris/layouts/partials/posts.html b/themes/polaris/layouts/partials/posts.html
new file mode 100644
index 0000000..7fd87de
--- /dev/null
+++ b/themes/polaris/layouts/partials/posts.html
@@ -0,0 +1,18 @@
+{{ $pages := where site.RegularPages "Section" "blog" }}
+{{ $pagesLen := (len $pages) }}
+
+{{ if eq $pagesLen 0 }}
+<p>It sure is quiet around here.</p>
+{{ end }}
+
+{{ range $index, $element := $pages }}
+<article>
+ <header>
+ <h3><a href = "{{ .Permalink }}">{{ .Title }}</a></h3>
+ </header>
+ <p><em>{{ .Date | time.Format "Jan 02 2006" }}</em></p>
+</article>
+ {{ if ne (add $index 1) $pagesLen }}
+<hr>
+ {{ end }}
+{{ end }}