mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 01:35:56 +01:00
Fixed svg not being rendered properly
This commit is contained in:
parent
f5de48f10b
commit
a241acfe72
4 changed files with 7 additions and 11 deletions
|
@ -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!
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" standalone="no"?>
|
||||
<svg width="475" height="400" xmlns="https://www.w3.org/2000/svg">
|
||||
<svg width="475" height="400" viewBox="0 0 475 400" xmlns="https://www.w3.org/2000/svg">
|
||||
<polygon points="100 100 125.0 100.0 137.5 78.34936490538902 159.15063509461098 90.84936490538902 180.80127018922195 78.34936490538902 202.45190528383293 65.84936490538902 202.45190528383293 40.849364905389024 177.45190528383293 40.84936490538902 164.95190528383293 19.19872981077805 143.30127018922195 31.698729810778055 121.65063509461099 19.198729810778044 109.15063509461098 40.849364905389 121.65063509461096 62.49999999999998 100.0 74.99999999999999 100.0 99.99999999999999" stroke="none" fill="hsl(0, 100%, 85%)"/>
|
||||
<path d="M171.20190528383293,30.024047358083536C157.6935392597012 37.82310611842799,124.67689388157201 38.95709583490977,132.47595264191648 25.448729810778048" stroke="hsl(0, 100%, 85%)" stroke-width="5.0" fill="none"/>
|
||||
<path d="M171.20190528383293,30.024047358083536C157.6935392597012 37.82310611842799,124.67689388157201 38.95709583490977,132.47595264191648 25.448729810778048" stroke="white" stroke-width="2.5" fill="none"/>
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
@ -16,14 +16,10 @@
|
|||
{{- if .Get "link" }}</a>{{ end -}}
|
||||
{{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
|
||||
<figcaption>
|
||||
{{- if or (.Get "caption") (.Get "attr") -}}<p>
|
||||
{{- .Get "caption" | markdownify -}}
|
||||
{{- with .Get "attrlink" }}
|
||||
<a href="{{ . }}">
|
||||
{{- end -}}
|
||||
{{- .Get "attr" | markdownify -}}
|
||||
{{- if .Get "attrlink" }}</a>{{ end }}</p>
|
||||
{{- end }}
|
||||
{{- default (.Get "title") (.Get "caption") | markdownify -}}
|
||||
{{- with .Get "attrlink" }}<a href="{{ . }}">{{- end -}}
|
||||
{{- .Get "attr" | markdownify -}}
|
||||
{{- if .Get "attrlink" }}</a>{{ end }}</p>
|
||||
</figcaption>
|
||||
{{- end }}
|
||||
</figure>
|
Loading…
Reference in a new issue