implemented eleventy filter for links

This commit is contained in:
sundae 2025-10-19 15:55:35 +03:00
parent fb24c6a302
commit c8223447a0
No known key found for this signature in database
41 changed files with 230 additions and 205 deletions

View file

@ -14,49 +14,43 @@ layout: base
<ul>
{% for program in programs %}
<li>
<span>
<img src="https://www.google.com/s2/favicons?domain={{ program.src }}" alt="">
<a href="{{ program.src }}">{{ program.name }}</a>
</span>
</li>
{% endfor %}
{{ program.name | link(program.src) | safe }}
</li>
{% endfor %}
</ul>
{% endif %}
{% if palettes and palettes|length > 0 %}
<p>Color palette used:</p>
{% for palette in palettes %}
<ul>
<li>
{% if palette.src %}
{{ palette.name | link(palette.src) | safe }}
{% endif %}
</li>
</ul>
{% endif %}
{% if palettes and palettes|length > 0 %}
<p>Color palette used:</p>
{% for palette in palettes %}
<ul>
<li>
<span>
{% if palette.src %}
<img src="https://www.google.com/s2/favicons?domain={{ palette.src }}" alt="">
<a href="{{ palette.src }}">
{% endif %}
{{ palette.name }}</a>
</span>
</li>
{% endfor %}
</ul>
{% endif %}
<section>
{% for image in images %}
<a href="{{ image.src }}">
<figure>
<img src="{{ image.src }}" alt="" {% if image.pixel %} style="image-rendering: pixelated" {% endif %}>
<figcaption>{{ image.alt }}</figcaption>
<time datetime="{{ image.date|ISO }}">{{ image.date|readable }}</time>
</figure>
</a>
{% endfor %}
</section>
{% for attachment in attachments %}
<section class="attachment">
<a href="{{ attachment.src }}">
<figure>
<img src="{{ attachment.src }}">
<figcaption>{{ attachment.alt }}</figcaption>
</figure>
</a>
</section>
{% endfor %}
</article>
{% endfor %}
</ul>
{% endif %}
<section>
{% for image in images %}
<a href="{{ image.src }}">
<figure>
<img src="{{ image.src }}" alt="" {% if image.pixel %} style="image-rendering: pixelated" {% endif %}>
<figcaption>{{ image.alt }}</figcaption>
<time datetime="{{ image.date|ISO }}">{{ image.date|readable }}</time>
</figure>
</a>
{% endfor %}
</section>
{% for attachment in attachments %}
<section class="attachment">
<a href="{{ attachment.src }}">
<figure>
<img src="{{ attachment.src }}">
<figcaption>{{ attachment.alt }}</figcaption>
</figure>
</a>
</section>
{% endfor %}
</article>