Skip to content

Commit

Permalink
Show tags in posts and notes
Browse files Browse the repository at this point in the history
  • Loading branch information
brookback committed Apr 23, 2024
1 parent fda7479 commit 7c0bd79
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 19 deletions.
25 changes: 14 additions & 11 deletions src/_includes/layouts/note.njk
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,27 @@ layout: layouts/main.njk
<h1 class="f4 mb1">
<time title="{{ date | tdate('Detailed') }}" datetime="{{ date | tdate('Machine') }}" pubdate>{{ date | tdate('HumanTime') }}</time>
</h1>
{% if location %}
<p title="Posted from" class="muted font-sans mb0 f6 target">{{ location }}</p>
{% endif %}

<div class="flex justify-between items-baseline gap">
{% if location %}
<p title="Posted from" class="muted font-sans mb0 f6 target">{{ location }}</p>
{% endif %}

{% if tags %}
<ul role="list" class="mb0 f6">
{% for tag in tags %}
<li class="muted font-sans inline">#{{ tag }}</li>
{% endfor %}
</ul>
{% endif %}
</div>
</header>

<div class="prose">
{{ content | md | safe }}
</div>

<footer class="mt3">
{% if tags %}
<ul role="list" class="mb3">
{% for tag in tags %}
<li class="muted font-sans f6 inline">#{{ tag }}</li>
{% endfor %}
</ul>
{% endif %}

<p class="mt6">
<a href=".." class="muted">
<span aria-hidden="true" class="BackLink mr1">←</span> All micro notes
Expand Down
16 changes: 12 additions & 4 deletions src/_includes/layouts/post.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ layout: layouts/main.njk
---
<main role="main">
<article class="Post" role="article" itemscope itemtype="http://schema.org/BlogPosting">
<header>
<header class="mb4">
<h1 itemprop="name" class="{% if link %}fw6 pt3{% else %}title{% endif %}">{{ title }}</h1>

<p class="mb0 fw5">
<p class="mb1 fw5">
<time class="text-color-contrast" datetime="{{ date | tdate('Machine') }}" title="{{ date | tdate('Detailed') }}" itemprop="datePublished" pubdate>
{{ date | tdate('HumanDate') }}
</time>
Expand All @@ -20,9 +20,17 @@ layout: layouts/main.njk
{% endif %}
</p>

<p class="f5 mb4 font-sans muted">
About {{ content | default("No content", true) | readingTime }} reading time
<p class="f5 mb0 font-sans muted">
About {{ content | default("No content", true) | readingTime }} reading time
</p>

{% if tags %}
<ul role="list" class="mb0 f6">
{% for tag in tags %}
<li class="muted font-sans inline">#{{ tag }}</li>
{% endfor %}
</ul>
{% endif %}
</header>

<div class="prose" itemprop="articleBody">
Expand Down
16 changes: 13 additions & 3 deletions src/micro.njk
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,19 @@ menu:
<time class="dt-published" datetime="{{ post.date | tdate('Machine', post.timezone) }}" pubdate>{{ post.date | tdate('HumanTime', post.timezone) }}</time> <span>#</span>
</a>
</h1>
{% if post.location %}
<p title="Posted from" class="muted font-sans mb0 f6 target">{{ post.location }}</p>
{% endif %}
<div class="flex justify-between items-baseline gap">
{% if post.location %}
<p title="Posted from" class="muted font-sans mb0 f6 target">{{ post.location }}</p>
{% endif %}

{% if post.tags %}
<ul role="list" class="mb0 f6">
{% for tag in post.tags %}
<li class="muted font-sans inline">#{{ tag }}</li>
{% endfor %}
</ul>
{% endif %}
</div>
</header>

<div class="prose e-content">
Expand Down
2 changes: 1 addition & 1 deletion src/notes/2024-03-24-15-31-48.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ date: '2024-03-24T15:31:48+01:00'
location: 'Stockholm, Sweden'
timezone: Europe/Stockholm
tags:
- fun
- random
---
This list of [things that don’t work](https://dynomight.net/things/) was fun:

Expand Down

0 comments on commit 7c0bd79

Please sign in to comment.