feat: Blog catalog and tags #7

Merged
aniva merged 11 commits from post/page into main 2024-10-10 14:49:18 -07:00
2 changed files with 13 additions and 7 deletions
Showing only changes of commit 568c1b740f - Show all commits

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>