summaryrefslogtreecommitdiffstats
path: root/themes/Brine/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'themes/Brine/layouts')
-rw-r--r--themes/Brine/layouts/_default/baseof.html60
-rw-r--r--themes/Brine/layouts/_default/list.html6
-rw-r--r--themes/Brine/layouts/_default/page.html10
-rw-r--r--themes/Brine/layouts/_default/single.html12
-rw-r--r--themes/Brine/layouts/_default/terms.html6
-rw-r--r--themes/Brine/layouts/partials/pagination.html6
6 files changed, 89 insertions, 11 deletions
diff --git a/themes/Brine/layouts/_default/baseof.html b/themes/Brine/layouts/_default/baseof.html
index 5f8e2ec..8e22484 100644
--- a/themes/Brine/layouts/_default/baseof.html
+++ b/themes/Brine/layouts/_default/baseof.html
@@ -1,11 +1,49 @@
-<!DOCTYPE html>
-<html>
- {{- partial "head.html" . -}}
- <body>
- {{- partial "header.html" . -}}
- <div id="content">
- {{- block "main" . }}{{- end }}
- </div>
- {{- partial "footer.html" . -}}
- </body>
-</html>
+<!doctype html>
+<html lang="{{ .Site.LanguageCode | default "en-us" }}">
+
+<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Site.Title }} - {{ .Title }}{{ end }}</title>
+<link href="/favicon.ico" rel=icon />
+<meta content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Description }}{{ end }}" name="description" />
+<meta content="{{ .Site.Params.author | default "John Doe" }}" name="author" />
+<meta content="width=device-width" name="viewport" />
+<style>
+ a:hover,a.page-link.a{text-decoration:underline}
+ body{margin:0;word-wrap:break-word;font:calc(.75em + 1.3vmin)/1.6 "Segoe UI",Helvetica,Arial,sans-serif}
+ h2{margin-top:40px}
+ a{text-decoration:none;color:#03c}
+ aside ul{list-style:none;white-space:nowrap;padding:10px}
+ aside a,aside li{color:#E0E0E0}
+ aside{background:#212121;padding:3.75vw;top:0}
+ code{background:#eee}
+ main{margin:8vh auto;max-width:90%}
+ code{font-family:Consolas,monaco,monospace;padding:3px}
+ pre>code{display:block;padding:20px;white-space:pre-wrap;font-size:75%;max-width:80ch}
+ p,a,li,h1{max-width:70ch}
+ blockquote{color:#333;border-left:7px solid #fc9;padding:0 14px;margin:0}
+ @media(min-width:1100px){
+ aside{position:fixed;min-width:14vw;max-width:17vw;bottom:0;overflow-y:auto}
+ #l{margin-top:0}
+ main{width:63%;margin-left:31vw;margin-top:0}
+ }
+</style>
+<aside>
+ <ul>
+ <li><a href="{{ .Site.BaseURL }}"><b>{{ .Site.Title }}</b></a></li>
+ <li>&nbsp;</li>
+ <li><a href="/about/">About</a></li>
+ <li><a href="/reading-list/">Reading List</a></li>
+ <li><a href="/hardware/">Hardware</a></li>
+ <li><a href="/dreams/">Dreams</a></li>
+ <li><a href="/languages/">Languages</a></li>
+ <li><a href="/recipes/">Recipes</a></li>
+ <li><a href="/status/">Server Status</a></li>
+ <li>&nbsp;</li>
+ <li><a href="/tags/">Tags</a></li>
+ <li><a href="/index.xml">RSS Feed</a></li>
+ <li>&nbsp;</li>
+ <li>&copy; {{ now.Format "2006" }}</li>
+ </ul>
+</aside>
+<main>
+ {{ block "main" . }}{{ .Content }}{{ end }}
+</main>
diff --git a/themes/Brine/layouts/_default/list.html b/themes/Brine/layouts/_default/list.html
index e69de29..6fc5811 100644
--- a/themes/Brine/layouts/_default/list.html
+++ b/themes/Brine/layouts/_default/list.html
@@ -0,0 +1,6 @@
+{{ define "main" }}<article>
+ <h1 class="page-heading">{{ .Title }}</h1>
+ <ul class="post-list">
+ {{ range $index, $element := .Paginator.Pages }} <li><h3><a class="post-link" href="{{ .Permalink }}">{{ .Title }}</a></h3><span class="post-meta">{{ .PublishDate.Format "Jan 2, 2006" }}, {{ .ReadingTime }} min read</span></li>
+ {{ end }}</ul>{{ partial "pagination.html" $ }}
+ </article>{{ end }}
diff --git a/themes/Brine/layouts/_default/page.html b/themes/Brine/layouts/_default/page.html
new file mode 100644
index 0000000..8c69ad7
--- /dev/null
+++ b/themes/Brine/layouts/_default/page.html
@@ -0,0 +1,10 @@
+{{ define "main" }}
+ <article class="post">
+ <header class="post-header">
+ <h1 class ="post-title">{{ .Title }}</h1>
+ <div class="post-meta">
+ <div>Reading time: {{ .ReadingTime }} min</div>
+ </div>
+ </header>
+ <div class="post-content">{{ .Content }}</div>
+ </article>{{ end }}
diff --git a/themes/Brine/layouts/_default/single.html b/themes/Brine/layouts/_default/single.html
index e69de29..a34f75c 100644
--- a/themes/Brine/layouts/_default/single.html
+++ b/themes/Brine/layouts/_default/single.html
@@ -0,0 +1,12 @@
+{{ define "main" }}
+ <article class="post">
+ <header class="post-header">
+ <h1 class ="post-title">{{ .Title }}</h1>
+ <div class="post-meta">
+ <div>Published: {{ .PublishDate.Format "Jan 2, 2006" }}</div>
+ <div>Reading time: {{ .ReadingTime }} min</div>{{- with .Params.tags -}}
+ <div>Tags: {{ range . -}}{{- with $.Site.GetPage (printf "/%s/%s" "tags" . ) -}}<a href="{{ .Permalink }}">{{ .Title }}</a>&nbsp;{{- end -}}{{- end -}}</div>{{- end -}}
+ </div>
+ </header>
+ <div class="post-content">{{ .Content }}</div>
+ </article>{{ end }}
diff --git a/themes/Brine/layouts/_default/terms.html b/themes/Brine/layouts/_default/terms.html
new file mode 100644
index 0000000..1b64a66
--- /dev/null
+++ b/themes/Brine/layouts/_default/terms.html
@@ -0,0 +1,6 @@
+{{ define "main" }}<article>
+ <h1>{{ .Title }}</h1>
+ <ul class="posts-list">
+ {{ range .Data.Terms.Alphabetical }} <li><a href="{{ .Page.URL }}">{{ .Page.Title }}</a> {{ .Count }}</li>
+ {{ end }}</ul>
+ </article>{{ end }}
diff --git a/themes/Brine/layouts/partials/pagination.html b/themes/Brine/layouts/partials/pagination.html
new file mode 100644
index 0000000..7ed3bce
--- /dev/null
+++ b/themes/Brine/layouts/partials/pagination.html
@@ -0,0 +1,6 @@
+{{ with $.Paginator }}{{ if gt .TotalPages 1 }}
+ <p class="pagination">
+ {{ with .Prev }}<a class="page-link" href="{{ .URL }}">Previous</a></li>
+ {{ end }}{{ range .Pagers }}<a class="page-link{{ if eq .PageNumber $.Paginator.PageNumber }} a{{ end }}" href="{{ .URL }}">{{ .PageNumber }}</a>
+ {{ end }}{{ with .Next }}<a class="page-link" href="{{ .URL }}">Next</a>{{ end }}
+ </p>{{ end }}{{ end }} \ No newline at end of file