Skip to content

Commit 72b7b57

Browse files
committed
Working on tags
1 parent 9b8c8c6 commit 72b7b57

File tree

2 files changed

+27
-5
lines changed

2 files changed

+27
-5
lines changed

src/pages/idea/tag/[tag].astro

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Drawer from "@layouts/Drawer.astro";
33
import Layout from "@layouts/Layout.astro";
44
import { Idea } from "@tool/idea";
55
import { getCollection } from "astro:content";
6-
import { Construction, Lightbulb } from "lucide-astro";
6+
import { Construction, Lightbulb, Hash } from "lucide-astro";
77
88
export async function getStaticPaths() {
99
return (await getCollection("ideas")).reduce((tags, idea) => {
@@ -26,7 +26,20 @@ const ideas = (await getCollection("ideas"))
2626
<Drawer>
2727
<div class="flex flex-col w-full items-center">
2828
<div class="h-6"></div>
29-
<span class="text-4xl font-bold"># {tag}</span>
29+
<div class="w-full flex flex-row justify-center items-center">
30+
<span class="text-4xl">
31+
Ideas With
32+
</span>
33+
<span class="tooltip tooltip-bottom" data-tip="More Tags">
34+
<a href="/idea/tag/" class="btn btn-circle btn-ghost btn-xl">
35+
<Hash class="w-10 h-10"/>
36+
</a>
37+
</span>
38+
<span class="text-4xl font-bold">
39+
{tag}
40+
</span>
41+
</div>
42+
3043
<div class="h-4"></div>
3144
<div class="w-full flex flex-row flex-wrap max-w-xs justify-center sm:max-w-2xl lg:max-w-5xl">
3245
{ ideas.map(idea => (

src/pages/idea/tag/index.astro

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
2-
import Layout from "@layouts/Layout.astro"
3-
import Drawer from "@layouts/Drawer.astro"
2+
import Drawer from "@layouts/Drawer.astro";
3+
import Layout from "@layouts/Layout.astro";
44
import { getCollection } from "astro:content";
5+
import { Hash } from "lucide-astro";
56
67
const tags = (await getCollection("ideas"))
78
.reduce((tags, idea) => {
@@ -17,7 +18,15 @@ const tags = (await getCollection("ideas"))
1718
<Drawer>
1819
<div class="flex flex-col w-full items-center">
1920
<div class="h-6"></div>
20-
<span class="text-4xl font-bold">Tags</span>
21+
<div class="flex flex-row justify-center items-center gap-1">
22+
<span class="text-4xl"></span>
23+
<span class="tooltip tooltip-bottom" data-tip="More Tags">
24+
<a href="/idea/tag/" class="btn btn-circle btn-ghost btn-xl">
25+
<Hash class="w-10 h-10"/>
26+
</a>
27+
</span>
28+
<span class="text-4xl font-bold">Tags</span>
29+
</div>
2130
<div class="h-4"></div>
2231
<div class="w-full grid grid-cols-1 max-w-xs sm:grid-cols-3 sm:max-w-2xl lg:grid-cols-5 lg:max-w-5xl">
2332
{ Object.entries(tags).sort(([a,], [b,]) => {

0 commit comments

Comments
 (0)