From a241acfe72cd51aa8cf28153c592c2b3aa1c78e8 Mon Sep 17 00:00:00 2001 From: JP Hastings-Spital Date: Wed, 30 Oct 2024 09:30:29 +0000 Subject: [PATCH] Fixed svg not being rendered properly --- .../memex/art-design/{tiles.md => tiles/index.md} | 4 ++-- content/memex/art-design/{ => tiles}/spectre.svg | 2 +- content/memex/art-design/{ => tiles}/spectre.webp | Bin layouts/shortcodes/figure.html | 12 ++++-------- 4 files changed, 7 insertions(+), 11 deletions(-) rename content/memex/art-design/{tiles.md => tiles/index.md} (93%) rename content/memex/art-design/{ => tiles}/spectre.svg (99%) rename content/memex/art-design/{ => tiles}/spectre.webp (100%) diff --git a/content/memex/art-design/tiles.md b/content/memex/art-design/tiles/index.md similarity index 93% rename from content/memex/art-design/tiles.md rename to content/memex/art-design/tiles/index.md index 5965d521..25e2b931 100644 --- a/content/memex/art-design/tiles.md +++ b/content/memex/art-design/tiles/index.md @@ -15,7 +15,7 @@ references: --- ## Aperiodic monotiles -{{< figure src="../spectre.webp" caption="The spectre aperiodic monotile, with \"odd\" tiles shaded." >}} +{{< figure src="spectre.webp" caption="The spectre aperiodic monotile, with \"odd\" tiles shaded." >}} 2023 was a good year for tiling! The Einstein hat and Sprectre aperiodic monotiles were discovered and [documented](https://cs.uwaterloo.ca/~csk/spectre/). These are special because they've been proven to _never repeat_. There's something really quite wonderful about that! @@ -27,7 +27,7 @@ I wrote a little code a few weekends ago to try and figure out if I could make a Though there are some lines that close (you can see some here) I have a _hunch_ that there may be provably non-zero many that never close. I have no idea how to go about proving that though! -{{< figure src="../spectre.svg" title="My spectre & tantrix crossover tiling, each one with a #colour chosen for its angle of rotation." alt="A computer-generated tiling of 20 identical 14-sided irregular shapes. They vary in light pastel colours. Each of the 14 sides inside each shape is connected with a different side by a white line, making a big but pretty knot of white lines connected through each of the shapes.">}} +{{< figure src="spectre.svg" title="My spectre & tantrix crossover tiling, each one with a #colour chosen for its angle of rotation." alt="A computer-generated tiling of 20 identical 14-sided irregular shapes. They vary in light pastel colours. Each of the 14 sides inside each shape is connected with a different side by a white line, making a big but pretty knot of white lines connected through each of the shapes.">}} The code for making this is below; but it's definitely not polished! diff --git a/content/memex/art-design/spectre.svg b/content/memex/art-design/tiles/spectre.svg similarity index 99% rename from content/memex/art-design/spectre.svg rename to content/memex/art-design/tiles/spectre.svg index ec6dc27e..fcdc4648 100644 --- a/content/memex/art-design/spectre.svg +++ b/content/memex/art-design/tiles/spectre.svg @@ -1,5 +1,5 @@ - + diff --git a/content/memex/art-design/spectre.webp b/content/memex/art-design/tiles/spectre.webp similarity index 100% rename from content/memex/art-design/spectre.webp rename to content/memex/art-design/tiles/spectre.webp diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index 0e15f27e..470fa88e 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -16,14 +16,10 @@ {{- if .Get "link" }}{{ end -}} {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
- {{- if or (.Get "caption") (.Get "attr") -}}

- {{- .Get "caption" | markdownify -}} - {{- with .Get "attrlink" }} - - {{- end -}} - {{- .Get "attr" | markdownify -}} - {{- if .Get "attrlink" }}{{ end }}

- {{- end }} + {{- default (.Get "title") (.Get "caption") | markdownify -}} + {{- with .Get "attrlink" }}{{- end -}} + {{- .Get "attr" | markdownify -}} + {{- if .Get "attrlink" }}{{ end }}

{{- end }} \ No newline at end of file