feat: simplify layout structure
This commit is contained in:
parent
c2f112a41b
commit
7c38b2fa4b
36 changed files with 47 additions and 72 deletions
35
src/_includes/layouts/catalogue-item.html
Normal file
35
src/_includes/layouts/catalogue-item.html
Normal file
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
layout: "layouts/base"
|
||||
imageAlt: ""
|
||||
imageCaption: ""
|
||||
---
|
||||
|
||||
{% set filteredTags = tags | filterCatalogueTags %}
|
||||
<article class="[ catalogue ] [ flow ]">
|
||||
<div style="--flow-space: 2em">
|
||||
{% block image %}
|
||||
{% if image %}
|
||||
{% image image, imageAlt, imageCaption %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<section class="[ catalogue-meta ] [ flow ]">
|
||||
{% block title %}<h1>{{ title }}</h1>{% endblock %}
|
||||
{% block subtitle %}<h2 class="[ text-fadeText ]" style="--flow-space: 0.25em">{{ subtitle }}</h2>{% endblock %}
|
||||
{{ tertiary | safe }}
|
||||
{% if filteredTags | length > 0 %}
|
||||
<ul class="[ categories list-none p-0 ] [ cluster justify-center ]">
|
||||
{% for tag in filteredTags %}<li class="[ flex gap-0.25 ]">{{ tag }}</li>{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</section>
|
||||
<hr class="[ my-1 ]" />
|
||||
{% from "macros/date.njk" import format %}
|
||||
{{ format(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>
|
Loading…
Add table
Add a link
Reference in a new issue