-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
99 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
layout: layouts/main.njk | ||
--- | ||
|
||
<main role="main"> | ||
<article> | ||
<header class="mb3"> | ||
<h1 class="f5 fw5 mb0"><a class="muted" href="/tags">Tags</a> <span class="faint">/</span> <u>{{ tag }}</u></h1> | ||
</header> | ||
|
||
<ul role="list"> | ||
{% for thing in search.pages(tag, "date=desc") %} | ||
<li class="mb4 border border-2 hover:border-neon pa2 rounded-small"> | ||
<article> | ||
<header class="mb2"> | ||
<h2 class="f4 mb1"> | ||
<a href="{{ thing.url }}"> | ||
{{ thing.type | title }}: | ||
{% if thing.type == "note" %} | ||
{{ thing.date | tdate('HumanTime') }} | ||
{% else %} | ||
{{ thing.title }} | ||
{% endif %} | ||
</a> | ||
</h2> | ||
|
||
{% if thing.type != "note" %} | ||
<p class="muted f6"> | ||
{{ thing.date | tdate('HumanDate') }} | ||
</p> | ||
{% endif %} | ||
</header> | ||
|
||
<div class="prose excerpt f5">{{ thing.content | excerpt | md | safe }}</div> | ||
</article> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</article> | ||
</main> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% macro list(tags) %} | ||
{% if tags %} | ||
<ul role="list" class="mb0 f6"> | ||
{% for tag in tags %} | ||
<li class="font-sans inline"> | ||
<a href="/tags/{{ tag }}" class="muted">#{{ tag }}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: All tags | ||
layout: layouts/page.njk | ||
--- | ||
|
||
<ol> | ||
{% for tag in search.values("tags") %} | ||
<li><a href="/tags/{{ tag }}">{{ tag }}</a></li> | ||
{% endfor %} | ||
</ol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export const layout = 'layouts/tagg.njk'; | ||
|
||
export default function* ({ search }: Lume.Data) { | ||
for (const tag of search.values<string>('tags')) { | ||
yield { | ||
url: `/tags/${tag}/`, | ||
type: 'tag', | ||
tag, | ||
}; | ||
} | ||
} |