the home site for me: also iteration 3 or 4 of my site

feat: add imgs component

dunkirk.sh cff3b625 f02db066

verified
Changed files
+27
sass
css
templates
shortcodes
+15
sass/css/mods.css
···
align-items: center;
}
+
.img-group {
+
display: flex;
+
flex-direction: row;
+
gap: 0.5rem;
+
max-width: 100%;
+
}
+
+
.img-group img {
+
flex: 1;
+
min-width: 0;
+
max-width: 100%;
+
height: auto;
+
object-fit: contain;
+
}
+
:root {
--nightshade-violet: oklch(0.27 0.0242 287.67);
--purple-night: oklch(27.58% 0.0203 289.13);
+12
templates/shortcodes/imgs.html
···
+
<figure {% if class %}class="{{class}}" {% else %}class="center" {% endif %}>
+
<div class="img-group">
+
{% set images = id | split(pat=",") %}
+
{% set alts = alt | default(value="") | split(pat=",") %}
+
{% for image in images %}
+
<img src="{{image | trim}}" {% if alts[loop.index0] %}alt="{{alts[loop.index0] | trim}}" {% endif %} />
+
{% endfor %}
+
</div>
+
{% if caption %}
+
<figcaption>{{caption | markdown | safe}}</figcaption>
+
{% endif %}
+
</figure>