summaryrefslogtreecommitdiff
path: root/layouts/blog
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/blog')
-rw-r--r--layouts/blog/list.html19
-rw-r--r--layouts/blog/single.html27
2 files changed, 46 insertions, 0 deletions
diff --git a/layouts/blog/list.html b/layouts/blog/list.html
new file mode 100644
index 0000000..9040dea
--- /dev/null
+++ b/layouts/blog/list.html
@@ -0,0 +1,19 @@
+{{ define "main" }}
+ <div id="blog-list">
+ <h1>
+ {{ if .Params.heading }}
+ {{ .Params.heading }}
+ {{ else }}
+ {{ .Title }}
+ {{ end }}
+ </h1>
+
+ {{ .Content }}
+
+ {{ if .Sections }}
+ {{- partial "blog-section-list.html" . -}}
+ {{ else }}
+ {{- partial "blog-list.html" . -}}
+ {{ end }}
+ </div>
+{{ end }}
diff --git a/layouts/blog/single.html b/layouts/blog/single.html
new file mode 100644
index 0000000..035db0a
--- /dev/null
+++ b/layouts/blog/single.html
@@ -0,0 +1,27 @@
+{{ define "main" }}
+ <article id="blog-post">
+ <header>
+ <h1>{{ .Title }}</h1>
+
+ <div id="blog-post-details">
+ <span id="date">
+ Published on
+ {{ .Date.Format "2" }}{{ if in (slice 1 21 31) .Date.Day}}st{{ else if in (slice 2 22) .Date.Day}}nd{{ else if in (slice 3 23) .Date.Day}}rd{{ else }}th{{ end }}
+ {{ .Date.Format "January" }}
+ {{ .Date.Format "2006" }}
+ </span>
+
+ <span id="reading-time">
+ Approx
+ {{ .ReadingTime }}
+ minute{{ if (ne .ReadingTime 1) }}s{{ end }}
+ read
+ </span>
+ </div>
+
+ <hr>
+ </header>
+
+ {{ .Content }}
+ </article>
+{{ end }}