aboutsummaryrefslogtreecommitdiff
path: root/layouts/book/single.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/book/single.html')
-rw-r--r--layouts/book/single.html26
1 files changed, 26 insertions, 0 deletions
diff --git a/layouts/book/single.html b/layouts/book/single.html
new file mode 100644
index 0000000..3ffb236
--- /dev/null
+++ b/layouts/book/single.html
@@ -0,0 +1,26 @@
1{{ define "main" }}
2 <article>
3 <h1>{{ .Title }}</h1>
4 <h4>{{ .Params.author }}</h4>
5 <h6>{{ .Date | time.Format ":date_full" }}</h6>
6 {{ if isset .Params "image" }}
7 <img src="{{ .Params.image }}" alt="Book cover of the book {{ .Title }}" />
8 {{ end }}
9 {{ if isset .Params "amazon" }}
10 <p>
11 <a href="{{ .Params.amazon }}" target="_blank">amazon</a>
12 </p>
13 {{ end }}
14 <div>
15 <p>Rating: </p>
16 {{ if isset .Params "rating" }}
17 {{ $rating := .Params.rating }}
18 {{ range $i, $num := (seq $rating) }}
19
20 {{ end }}
21 {{ else }}
22 <p>N/A</p>
23 {{ end }}
24 </div>
25 </article>
26{{ end }} \ No newline at end of file