aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/types/index.astro
diff options
context:
space:
mode:
authornolawz <amananudhiu@gmail.com>2026-03-03 04:04:23 +0530
committernolawz <amananudhiu@gmail.com>2026-03-03 04:04:23 +0530
commit45026eee4c93bbbe6141dd23a664abe6e9ff3ca2 (patch)
tree3d5762cb539d88cf1fc464ab07f9ecd49182ad08 /src/pages/types/index.astro
parentd41eff9eccf66644c4c60f53cb516bf079937a28 (diff)
Added events section and components required for that
Diffstat (limited to 'src/pages/types/index.astro')
-rw-r--r--src/pages/types/index.astro35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/pages/types/index.astro b/src/pages/types/index.astro
new file mode 100644
index 0000000..c269c22
--- /dev/null
+++ b/src/pages/types/index.astro
@@ -0,0 +1,35 @@
+---
+import Breadcrumbs from '@/components/Breadcrumbs.astro'
+import Link from '@/components/Link.astro'
+import PageHead from '@/components/PageHead.astro'
+import { badgeVariants } from '@/components/ui/badge'
+import Layout from '@/layouts/Layout.astro'
+import { getAllTypes } from '@/lib/data-utils'
+import { iconMappings } from '@/lib/utils'
+import { Icon } from 'astro-icon/components'
+
+const types = await getAllTypes()
+---
+
+<Layout class="max-w-3xl">
+ <PageHead slot="head" title="Tags" />
+ <Breadcrumbs items={[{ label: 'Tags', icon: 'lucide:tags' }]} />
+
+ <div class="flex flex-col gap-4">
+ <div class="flex flex-wrap gap-2">
+ {console.log([...types.entries()].map((a) => console.log(a)))}
+ {
+ [...types.entries()].map(([type, count]) => (
+ <Link
+ href={`/types/${type}`}
+ class={badgeVariants({ variant: 'muted' })}
+ >
+ <Icon name={iconMappings[type] || 'lucide:hash'} class="size-3" />
+ {type}
+ <span class="text-muted-foreground ml-1.5">({count})</span>
+ </Link>
+ ))
+ }
+ </div>
+ </div>
+</Layout>