diff options
author | Matthew Lemon <y@yulqen.org> | 2023-10-23 15:05:16 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2023-10-23 15:05:16 +0100 |
commit | b970808bccebdbd102ef5f2337c74f3c2f99d1e9 (patch) | |
tree | 6d5f04ccffe154650e4fafd7419b370f67de25c6 /layouts/stream | |
parent | 4bcbdbc1c2480128b6c992c46597c977c7d57797 (diff) |
Pagination of stream complete with working images
To include an image in the stream, you have to use the streamimage
shortcode, e.g.
{{< streamimage filename="bobbins.jpg" >}}
bobbins.jpg must be saved in content/stream/img.
You can include a "size" param in the shortcode (a string as number),
which is translated as a height attribute in the img html tag.
Diffstat (limited to 'layouts/stream')
-rw-r--r-- | layouts/stream/list.html | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/layouts/stream/list.html b/layouts/stream/list.html index 2fb46b4..7f3a92f 100644 --- a/layouts/stream/list.html +++ b/layouts/stream/list.html @@ -12,21 +12,17 @@ <h3 id="{{ .Date.Format "Monday, 2 January 2006"| urlize}}">{{ .Date.Format "Monday, 2 January 2006" }}</h3> -{{ $.Scratch.Set "toss" "toss" }} <div style="margin-bottom: 1em;"> {{ .Content }} </div> -{{ $.Scratch }} - -{{ if $paginator.HasPrev }} - <p>this page is paginated</p> - {{ $.Page.Scratch.Add "imgpath" "PAGINATED" }} -{{ else }} - <p>this page is NOT paginated</p> - {{ $.Page.Scratch.Set "imgpath" "img/" }} -{{ end }} - +<!-- {{ if $paginator.HasPrev }} --> +<!-- <p>this page is paginated</p> --> +<!-- {{ $.Page.Scratch.Add "imgpath" "PAGINATED" }} --> +<!-- {{ else }} --> +<!-- <p>this page is NOT paginated</p> --> +<!-- {{ $.Page.Scratch.Set "imgpath" "img/" }} --> +<!-- {{ end }} --> {{ if .Params.tags }} |