summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2023-10-23 10:39:32 +0100
committerMatthew Lemon <y@yulqen.org>2023-10-23 10:39:32 +0100
commit4974bf7efe0a4428958679f6bdc7cc69dfc7291f (patch)
treeb988d405efc0e14f9fe32db655887066926d9bc2
parentb18995684f5ef0d8fe0e8eb690bbc1c10c3690c5 (diff)
wip: continuing with the pagination work
-rw-r--r--content/stream/2023-10-21.md3
-rw-r--r--layouts/shortcodes/streamimage.html3
-rw-r--r--layouts/stream/list.html1
3 files changed, 7 insertions, 0 deletions
diff --git a/content/stream/2023-10-21.md b/content/stream/2023-10-21.md
index 252e80e..8da0d97 100644
--- a/content/stream/2023-10-21.md
+++ b/content/stream/2023-10-21.md
@@ -7,8 +7,11 @@ tags: ["golf", "quicknotes", "cats"]
A [ginger cat](../blog/cats/cat_kills/#the-perpetrators) beneath a stool, sheltering from the rain:
+
{{< figure src="img/cat_stool.jpg" >}}
+{{< streamimage filename="cat_stool.jpg" >}}
+
---
[Storm Babet](https://www.metoffice.gov.uk/about-us/press-office/news/weather-and-climate/2023/storm-babet-has-been-named) has been and gone. Been pissing down for days.
diff --git a/layouts/shortcodes/streamimage.html b/layouts/shortcodes/streamimage.html
new file mode 100644
index 0000000..eb5d468
--- /dev/null
+++ b/layouts/shortcodes/streamimage.html
@@ -0,0 +1,3 @@
+{{ $filename := .Get "filename" }}
+{{ $scratch := .Scratch }}
+<img src="{{$scratch.Get "imgpath" }}/{{ $filename }}">
diff --git a/layouts/stream/list.html b/layouts/stream/list.html
index 000d00e..127d2eb 100644
--- a/layouts/stream/list.html
+++ b/layouts/stream/list.html
@@ -12,6 +12,7 @@
<p>this page is paginated</p>
{{ else }}
<p>this page is NOT paginated</p>
+ {{ $.Scratch.Set "imgpath" "img/" }}
{{ end }}
<div style="margin-bottom: 1em;">