aboutsummaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/list.html24
-rw-r--r--layouts/_default/single.html13
-rw-r--r--layouts/book/single.html26
3 files changed, 48 insertions, 15 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 5d1370f..cf36155 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,12 +1,12 @@
1{{ define "main" }} 1{{ define "main" }}
2 <article> 2 <article>
3 <section>{{- .Content -}}</section> 3 <section>{{- .Content -}}</section>
4 <section> 4 <section>
5 {{ range .Paginator.Pages }} 5 {{ range .Paginator.Pages }}
6 <div> 6 <div>
7 {{ .Render "summary" }} 7 {{ .Render "summary" }}
8 </div> 8 </div>
9 {{ end }} 9 {{ end }}
10 </section> 10 </section>
11 </article> 11 </article>
12{{ end }} 12{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 3e48693..306df48 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,4 +1,11 @@
1{{ define "main" }} 1{{ define "main" }}
2 <h1>{{ .Title }}</h1> 2 <article>
3 {{- .Content -}} 3 <section>
4 <h1>{{ .Title }}</h1>
5 <h6>{{ .Date | time.Format ":date_full" }}</h6>
6 </section>
7 <section>
8 {{- .Content -}}
9 </section>
10 </article>
4{{ end }} \ No newline at end of file 11{{ end }} \ No newline at end of file
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