Skip to content

Commit b8c7dee

Browse files
committed
update styles for consistency
Signed-off-by: rishichawda <[email protected]>
1 parent 5177ea4 commit b8c7dee

File tree

1 file changed

+63
-44
lines changed

1 file changed

+63
-44
lines changed

src/pages/bits/[slug].astro

Lines changed: 63 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -50,60 +50,79 @@ function formatDate(date: Date): string {
5050
keywords: bit.data.tags?.join(', ') || bit.data.title,
5151
}}
5252
>
53-
<main class="min-h-screen bg-gradient-to-br from-brand-50/30 via-white to-brand-100/40">
54-
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-12 sm:py-16 lg:py-20">
55-
{/* Back Button */}
56-
<a
57-
href="/bits/"
58-
class="group inline-flex items-center px-6 py-3 bg-white/90 backdrop-blur-sm border border-brand-200/50 rounded-xl text-brand-700 hover:text-brand-600 hover:bg-white hover:shadow-lg transition-all duration-300 font-['Montserrat_Variable'] text-sm font-medium mb-8"
53+
<main class="flex flex-col mx-auto items-center">
54+
<a
55+
href="/bits/"
56+
class="group inline-flex items-center px-6 py-3 bg-white/90 backdrop-blur-sm border border-brand-200/50 rounded-xl text-brand-700 hover:text-brand-600 hover:bg-white hover:shadow-lg transition-all duration-300 font-['Montserrat_Variable'] text-sm font-medium mt-10"
57+
>
58+
<svg
59+
xmlns="http://www.w3.org/2000/svg"
60+
class="h-4 w-4 mr-2 group-hover:-translate-x-1 transition-transform duration-300"
61+
fill="none"
62+
viewBox="0 0 24 24"
63+
stroke="currentColor"
64+
stroke-width="2"
5965
>
60-
<svg
61-
xmlns="http://www.w3.org/2000/svg"
62-
class="h-4 w-4 mr-2 group-hover:-translate-x-1 transition-transform duration-300"
63-
fill="none"
64-
viewBox="0 0 24 24"
65-
stroke="currentColor"
66-
stroke-width="2"
67-
>
68-
<path
69-
stroke-linecap="round"
70-
stroke-linejoin="round"
71-
d="M10 19l-7-7m0 0l7-7m-7 7h18"
72-
></path>
73-
</svg>
74-
Back to bits
75-
</a>
66+
<path
67+
stroke-linecap="round"
68+
stroke-linejoin="round"
69+
d="M10 19l-7-7m0 0l7-7m-7 7h18"
70+
></path>
71+
</svg>
72+
Back to bits
73+
</a>
7674

77-
{/* Bit Content */}
78-
<article class="bg-white rounded-2xl shadow-lg border border-brand-100/50 p-8 sm:p-10 lg:p-12 mb-12">
79-
{/* Date */}
80-
<p class="font-['Montserrat_Variable'] text-brand-500 mb-4 text-sm font-medium uppercase tracking-wider">
81-
{formatDate(bit.data.date)}
82-
</p>
83-
84-
{/* Title */}
85-
<h1 class="text-3xl sm:text-4xl lg:text-5xl font-medium text-gray-900 mb-6 font-['Red_Hat_Display_Variable'] leading-tight">
75+
<article class="max-w-[90%] flex flex-col mx-auto items-center pt-8">
76+
<div class="inline-flex flex-col justify-start items-center gap-2.5 mb-4">
77+
<h1 class="justify-start text-black text-3xl md:text-4xl text-center font-semibold font-['Red_Hat_Display_Variable'] leading-tight mb-2">
8678
{bit.data.title}
8779
</h1>
88-
89-
{/* Tags */}
90-
{bit.data.tags && bit.data.tags.length > 0 && (
91-
<div class="flex flex-wrap gap-2 mb-8 pb-8 border-b border-gray-200">
92-
{bit.data.tags.map((tag) => (
93-
<span class="text-sm font-['Montserrat_Variable'] text-brand-600 bg-brand-100/50 px-3 py-1.5 rounded-full">
94-
{tag}
95-
</span>
80+
</div>
81+
82+
<div class="inline-flex items-center gap-3 mb-8 flex-wrap justify-center">
83+
<div class="inline-flex items-center gap-1.5 px-3 py-1 bg-gray-100 rounded-full">
84+
<svg
85+
xmlns="http://www.w3.org/2000/svg"
86+
class="h-3.5 w-3.5 text-gray-600"
87+
fill="none"
88+
viewBox="0 0 24 24"
89+
stroke="currentColor"
90+
stroke-width="2"
91+
>
92+
<path
93+
stroke-linecap="round"
94+
stroke-linejoin="round"
95+
d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
96+
></path>
97+
</svg>
98+
<small class="text-gray-700 text-xs font-medium font-['Montserrat_Variable'] leading-tight">
99+
{formatDate(bit.data.date)}
100+
</small>
101+
</div>
102+
</div>
103+
104+
{bit.data.tags && bit.data.tags.length > 0 && (
105+
<div class="w-full md:max-w-[790px] mb-10">
106+
<div class="inline-flex w-full px-2 justify-center items-center">
107+
<div class="inline-flex justify-center items-center gap-2 flex-wrap">
108+
{bit.data.tags.map((tag: string) => (
109+
<div class="px-3 py-1 bg-brand-500 rounded-md inline-flex flex-col justify-center items-center gap-2.5 overflow-hidden">
110+
<span class="justify-start bg-brand-500 text-white text-xs font-medium font-['Montserrat_Variable'] leading-tight">
111+
{tag}
112+
</span>
113+
</div>
96114
))}
97115
</div>
98-
)}
99-
100-
{/* Content */}
116+
</div>
117+
</div>
118+
)} <div class="mb-20 font-['Montserrat_Variable'] max-w-full lg:flex lg:flex-row lg:gap-4">
101119
<Prose>
102120
<Content components={{ a: ExternalLink }} />
103121
</Prose>
104-
</article>
122+
</div>
123+
</article>
105124

106-
{/* Navigation */}
125+
<div class="max-w-[90%] mx-auto mb-12">
107126
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
108127
{prevBit ? (
109128
<a

0 commit comments

Comments
 (0)