Update illustrations and enhance SVG handling in HTML (#2051)

This commit is contained in:
Paweł Kuna
2025-01-10 22:31:03 +01:00
committed by GitHub
parent 86cab40faa
commit 5cca710ac6
24 changed files with 10 additions and 6 deletions

View File

@@ -12,7 +12,6 @@ const illustrations = glob
return path.basename(file, '.png')
})
fs.writeFileSync(
path.join(__dirname, `../src/pages/_data/illustrations.json`),
JSON.stringify(illustrations)

View File

@@ -0,0 +1,5 @@
---
"@tabler/core": patch
---
Update illustrations and enhance SVG handling in HTML

View File

@@ -1 +1 @@
["weightlifting","wait","video","to-do","telescope","snowman","shield","search","project","not-found","neutral-info","music","mobile-computer","message","map-destination","loading","kite","icons","icons-workshop","icons-production","icons-ladder","icons-drawing","icons-drawing-run","ice-skates","guitar","good-news","girl-refresh","girl-phone","gift","folders","flowers","fingerprint","exit","error","email","electric-scooter","dart","dance","conversation","computer-fix","clock-and-cat","chart","chart-circle","calendar","building","boy","boy-with-key","boy-gives-flowers","boy-girl","boy-and-laptop","boy-and-cat","bicycle","bad-news","archive","ai"]
["weightlifting","wait","video","to-do","tiredness","telescope","snowman","shield","search","project","printer","not-found","new-year","new-year-2","neutral-info","music","mobile-computer","message","map-destination","loading","kite","icons","icons-workshop","icons-production","icons-ladder","icons-drawing","icons-drawing-run","ice-skates","halloween-pumpkin","guitar","good-news","girl-refresh","girl-phone","gift","ghost","folders","flowers","fingerprint","exit","error","email","electric-scooter","dart","dance","conversation","computer-fix","clock-and-cat","christmas-tree","christmas-gifts","christmas-fireplace","chart","chart-circle","calendar","building","boy","boy-with-key","boy-refresh","boy-gives-flowers","boy-girl","boy-and-laptop","boy-and-cat","bicycle","bad-news","archive","ai"]

View File

@@ -14,7 +14,7 @@ illustrations = illustrations | push: illustration %} {% endif %} {% endfor %} {
<div class="col-md-7">
<div class="card">
<div class="card-body d-flex align-items-center">
<div id="current-illustration">{{ first_illustration }}</div>
<div id="current-illustration">{{ first_illustration | replace: '<svg ', '<svg class="w-100 h-auto" ' }}</div>
</div>
</div>
</div>
@@ -55,7 +55,7 @@ illustrations = illustrations | push: illustration %} {% endif %} {% endfor %} {
<label class="form-imagecheck mb-2">
<input name="form-imagecheck" type="radio" value="{{ illustration.slug }}" class="form-imagecheck-input js-select-illustration" {% if forloop.first %} checked{% endif %}>
<span class="form-imagecheck-figure">
{{ illustration }}
{{ illustration | replace: '<svg ', '<svg class="w-100 h-auto" ' }}
</span>
</label>
</div>
@@ -73,7 +73,7 @@ illustrations = illustrations | push: illustration %} {% endif %} {% endfor %} {
</div>
<h2 class="page-title my-5">
{{ site.illustrations.count | minus: 4 }} more SVG Illustrations
{{ site.data.illustrations | size | minus: 4 }} more SVG Illustrations
</h2>
<div class="row row-cards">
@@ -129,7 +129,7 @@ illustrations = illustrations | push: illustration %} {% endif %} {% endfor %} {
const illustrations = {
{% for illustration in illustrations %}
"{{ illustration.slug }}": {
svg: '{{ illustration.content | quote | replace_regex: "\n", "\n" }}',
svg: '{{ illustration.content | replace: '<svg ', '<svg class="w-100 h-auto" ' | quote | replace_regex: "\n", "\n" }}',
},
{% endfor %}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB