feat: Display series

This commit is contained in:
Leni Aniva 2024-10-10 12:16:44 -07:00
parent 2175e30325
commit 568c1b740f
Signed by: aniva
GPG Key ID: 4D9B1C8D10EA4C50
2 changed files with 13 additions and 7 deletions

View File

@ -4,10 +4,14 @@
export let link: Option<string> = null;
const date = metadata.date.toISOString().slice(0,-14);
const series = metadata?.series || [];
</script>
<div id="post-heading">
<h2>
{#each series as seriesTag}
<p class="series-tag">{seriesTag}</p>
{/each}
{#if link}
<a id="post-title" href={link}>{metadata.title}</a>
{:else}
@ -40,4 +44,7 @@
#post-title {
@apply text-3xl;
}
.series-tag {
color: theme('colors.sunglow.600');
}
</style>

View File

@ -12,17 +12,16 @@
<h1>Tags</h1>
<hr class="separator" />
<ul id="catalog" class="content">
<div id="catalog" class="content">
{#each allTags as tag}
<li>
<a href="/tag/{tag}">{tag}</a>
</li>
<a class="tag" href="/tag/{tag}">{tag}</a>
{/each}
</ul>
</div>
<hr class="separator" />
<style>
#catalog li {
margin-bottom: 10px;
.tag {
margin-left: 1em;
margin-right: 1em;
}
</style>