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

View File

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