summaryrefslogtreecommitdiff
path: root/layouts/reviews
diff options
context:
space:
mode:
authormms <git@sapka.me>2024-11-11 21:33:47 +0100
committermms <git@sapka.me>2024-11-11 21:33:47 +0100
commit71e48e43cefa0b2830b8f167f5ca5d0a6dad738e (patch)
treec41fdcfacadf5278576711a5459fbff25cb38f83 /layouts/reviews
parent1436e6b4da3586f63220ba340e0e8b838385aaa4 (diff)
feat: book reviews
Diffstat (limited to 'layouts/reviews')
-rw-r--r--layouts/reviews/list.html38
-rw-r--r--layouts/reviews/single.html22
2 files changed, 60 insertions, 0 deletions
diff --git a/layouts/reviews/list.html b/layouts/reviews/list.html
new file mode 100644
index 0000000..b5a9643
--- /dev/null
+++ b/layouts/reviews/list.html
@@ -0,0 +1,38 @@
+{{ define "main" }}
+{{ $page := .Page }}
+<article>
+{{ .Content }}
+
+{{ range .Params.reviewSection}}
+<h2>{{ . }}</h2>
+
+ <table style=" width: 80%;
+ table-layout: fixed;
+ margin: 10px;
+ ">
+ <thead>
+ <tr>
+ <td><b>Title</b></td>
+ <td style="width: 50px;
+ text-align: center;
+ "><b>RTG</b></td>
+ </thead>
+ <tbody>
+ {{- range
+(where $page.Site.RegularPages ".Params.reviewSection" "intersect" (slice .)).ByTitle }}
+
+ <tr>
+ <td><a href="{{ .Permalink }}">{{ .Title }}</td>
+ <td style="
+ width: 50px;
+ text-align: center;
+ "
+ >{{ .Params.Rating}}</td>
+ </tr>
+ {{- end }}
+ </tbody>
+</table>
+ {{ end }}
+</article>
+
+{{ end }}
diff --git a/layouts/reviews/single.html b/layouts/reviews/single.html
new file mode 100644
index 0000000..8b8e1da
--- /dev/null
+++ b/layouts/reviews/single.html
@@ -0,0 +1,22 @@
+{{ define "main" }}
+<article class="reviews">
+
+ <aside class="right-panel">
+ {{ partial "reviews/metrics.html" . }}
+
+ {{ if .Page.Params.related}}
+ {{ partial "reviews/related.html" . }}
+ {{ end }}
+ </aside>
+ <h2> <a href="{{ .Page.Permalink }}"> {{ .Title }}</a></h2>
+ <hr>
+
+ {{ .Page.Content }}
+
+ <hr>
+ <time datetime="{{.PublishDate.Format "2006-01-02" }}">
+ Published:
+ {{ .PublishDate.Format "Monday, 2 Jan 2006" }}
+ </time>
+</article>
+{{- end }}