[PIE-16] Basic tag page implementation (#13)

Adds `/tags/[name]` and associated API routes and such. `/tags/` has an extremely barebones layout atm so it's not publicly visible

Reviewed-on: #13
Co-authored-by: june <self@breadone.net>
Co-committed-by: june <self@breadone.net>
This commit was merged in pull request #13.
This commit is contained in:
2025-08-16 23:17:31 +12:00
committed by June
parent 6145f14df0
commit bf5d2f24c2
8 changed files with 88 additions and 6 deletions

View File

@@ -6,7 +6,7 @@ const { tags } = Astro.props
{
(tags ?? []).map(tag => (
<a
href={`/tag/${tag.id}`}
href={`/tags/${tag.name}`}
class="text-white bg-white/20 px-2 mr-2 mt-2 rounded-md inline-block hover:bg-white/30"
>
{tag.name}

View File

@@ -7,8 +7,9 @@
</a>
<div class="ml-auto space-x-5">
<a class="hover:underline underline-offset-4 " href="/recipe/new">new</a>
<a class="hover:underline underline-offset-4 " >tags</a>
<a class="hover:underline underline-offset-4 " >search</a>
<a class="hover:underline underline-offset-4" href="/recipe/new">new</a>
<a class="hover:underline underline-offset-4" href="/recipe/import">add</a>
<!-- <a class="hover:underline underline-offset-4" href="/tags">tags</a> -->
<a class="hover:underline underline-offset-4" >search</a>
</div>
</div>