wonderfulfrog.com/src/_includes/layouts/catalogue-item.html
2024-02-28 10:32:37 -08:00

39 lines
1.4 KiB
HTML

---
layout: "layouts/base"
imageAlt: ""
imageCaption: ""
---
{% set filteredTags = tags | filterCatalogueTags %}
<article class="[ catalogue ] [ flow ]">
{% block image %}
{% if image %}
{% image image, imageAlt, imageCaption %}
{% endif %}
{% endblock %}
<section class="[ catalogue-meta ] [ flow ]">
{% block title %}<h1>{{ title }}</h1>{% endblock %}
{% if subtitle %}<h2 class="[ text-fadeText flow-space-0.25 ]">{{ subtitle }}</h2>{% endif %}
{{ tertiary | safe }}
{% if rating %}
<div class="[ flex justify-center ]">
{% from "macros/utils.njk" import stars %}
{{ stars(rating) }}
</div>
{% endif %}
{% if filteredTags | length > 0 %}
<ul class="[ categories ] [ cluster justify-center p-0 ]" role="list">
{% for tag in filteredTags %}<li class="[ flex gap-0.25 ]">{{ tag }}</li>{% endfor %}
</ul>
{% endif %}
</section>
<hr class="[ my-1.5 ]" />
{% from "macros/date.njk" import format %}
{{ format(page.date) }}
{% block content %}{{ content | safe }}{% endblock %}
{% if url %}
<a href="{{ url }}" class="[ flex mt-1 items-center gap-0.5 ]" target="_blank" rel="external noreferrer noopener">
{% include "svgs/link.svg" %}{{ linkTitle }}
</a>
{% endif %}
</article>