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

feat: support images

dunkirk.sh cdc68d4d 2ac637a0

verified
Changed files
+56 -2
sass
css
templates
shortcodes
+35
sass/css/mods.css
···
margin-right: 5px;
}
+
.image-gallery {
+
display: flex;
+
flex-direction: column;
+
gap: 0.5rem;
+
padding-top: 0.5rem;
+
}
+
+
.image-gallery img {
+
max-width: 100%;
+
border-radius: 0.25rem;
+
padding: 0;
+
margin: 0;
+
}
+
+
.side-by-side {
+
display: flex;
+
flex-direction: row;
+
}
+
+
.side-by-side img {
+
max-width: calc(50% - 0.25rem);
+
}
+
+
.gallery-grid {
+
display: grid;
+
grid-template-columns: repeat(2, 1fr);
+
gap: 0.1rem;
+
}
+
+
.gallery-grid img {
+
width: 100%;
+
height: auto;
+
object-fit: cover;
+
}
+
:root {
--nightshade-violet: oklch(0.27 0.0242 287.67);
--purple-night: oklch(27.58% 0.0203 289.13);
+21 -2
templates/shortcodes/bluesky.html
···
set content = post_data.record.text %} {% set has_embed = post_data.embed is
defined and post_data.embed %}
<blockquote>
-
{{ content }} {% if has_embed and post_data.embed["$type"] ==
+
{{ content }} {% if has_embed %} {% if post_data.embed["$type"] ==
"app.bsky.embed.video#view" %}
<video controls poster="{{ post_data.embed.thumbnail }}">
<source
···
type="application/x-mpegURL"
/>
</video>
-
{% endif %}
+
{% elif post_data.embed["$type"] == "app.bsky.embed.images#view" %} {% if
+
post_data.embed.images | length > 3 %}
+
<div class="image-gallery gallery-grid">
+
{% for image in post_data.embed.images %}
+
<img src="{{ image.fullsize }}" alt="{{ image.alt }}" loading="lazy" />
+
{% endfor %}
+
</div>
+
{% elif post_data.embed.images | length == 2 %}
+
<div class="image-gallery side-by-side">
+
{% for image in post_data.embed.images %}
+
<img src="{{ image.fullsize }}" alt="{{ image.alt }}" loading="lazy" />
+
{% endfor %}
+
</div>
+
{% else %}
+
<div class="image-gallery">
+
{% for image in post_data.embed.images %}
+
<img src="{{ image.fullsize }}" alt="{{ image.alt }}" loading="lazy" />
+
{% endfor %}
+
</div>
+
{% endif %} {% endif %} {% endif %}
<p>
<cite>
<a href="{{ post }}" target="_blank" rel="noopener"