refactor: ♻️ move post meta into importable macro
This commit is contained in:
parent
9f7387c54b
commit
1ebb0e7226
3 changed files with 22 additions and 32 deletions
18
src/includes/postmeta.macro.njk
Normal file
18
src/includes/postmeta.macro.njk
Normal file
|
@ -0,0 +1,18 @@
|
|||
{% macro postmeta(params) %}
|
||||
<ul class="flex flex-wrap items-center gap-4 *:inline-flex *:items-center *:gap-1 *:*:stroke-sky-600">
|
||||
<li>
|
||||
{% lucide "calendar", {"size": "20"} %}
|
||||
<time datetime="{{ params.date | isoDate }}" title="{{ params.date | longDate }}">
|
||||
{{ params.date | readableDate }}
|
||||
</time>
|
||||
</li>
|
||||
<li>
|
||||
{% lucide "user", {"size": "20"} %}
|
||||
<a href="{{ params.author.href }}">{{ params.author.name }}</a>
|
||||
</li>
|
||||
<li>
|
||||
{% lucide "glasses", {"size": "20"} %}
|
||||
{{ params.content | readingtime }}
|
||||
</li>
|
||||
</ul>
|
||||
{% endmacro %}
|
Loading…
Add table
Add a link
Reference in a new issue