Skip to content

Commit 57ffb0c

Browse files
committed
feat: Implement admin article creation and editing pages, new global styles, and a UI switch component.
1 parent b440dde commit 57ffb0c

4 files changed

Lines changed: 12 additions & 15 deletions

File tree

app/admin/articles/[id]/page.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,9 @@ export default function EditArticlePage() {
375375
<h3 className="font-semibold text-white/90">Publishing</h3>
376376
<div className="flex items-center space-x-2">
377377
<Switch
378-
id="publish-status"
379378
checked={isPublished}
380379
onCheckedChange={setIsPublished}
381-
className="data-[state=checked]:bg-[#8a2be2] data-[state=unchecked]:bg-[#333333] border border-white/20"
380+
className="data-[state=checked]:bg-[#8a2be2] data-[state=unchecked]:bg-zinc-600 border border-white/20"
382381
/>
383382
<Label
384383
htmlFor="publish-status"

app/admin/articles/new/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ export default function NewArticlePage() {
549549
id="publish-status"
550550
checked={isPublished}
551551
onCheckedChange={setIsPublished}
552-
className="data-[state=checked]:bg-[#8a2be2] data-[state=unchecked]:bg-[#333333] border border-white/20"
552+
className="data-[state=checked]:bg-[#8a2be2] data-[state=unchecked]:bg-zinc-600 border border-white/20"
553553
/>
554554
<label
555555
htmlFor="publish-status"

app/globals.css

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,16 +219,14 @@ select:-webkit-autofill {
219219
font-weight: 600;
220220
font-size: clamp(2rem, 1.8rem + 1vw, 3rem);
221221
margin-bottom: 0.5em !important;
222-
border-bottom: 1px solid #ffffff5b !important;
223-
padding-bottom: 0.1em !important;
222+
margin-bottom: 0.5em !important;
224223
}
225224

226225
.markdown-body h2 {
227226
font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2.25rem);
228227
font-weight: 600;
229228
margin-bottom: 0.5em !important;
230-
border-bottom: 1px solid #ffffff5b !important;
231-
padding-bottom: 0.3em !important;
229+
margin-bottom: 0.5em !important;
232230
}
233231

234232
.markdown-body h3 {

components/ui/switch.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
"use client"
1+
"use client";
22

3-
import * as React from "react"
4-
import * as SwitchPrimitives from "@radix-ui/react-switch"
3+
import * as React from "react";
4+
import * as SwitchPrimitives from "@radix-ui/react-switch";
55

6-
import { cn } from "@/lib/utils"
6+
import { cn } from "@/lib/utils";
77

88
const Switch = React.forwardRef<
99
React.ElementRef<typeof SwitchPrimitives.Root>,
@@ -19,11 +19,11 @@ const Switch = React.forwardRef<
1919
>
2020
<SwitchPrimitives.Thumb
2121
className={cn(
22-
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
22+
"pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
2323
)}
2424
/>
2525
</SwitchPrimitives.Root>
26-
))
27-
Switch.displayName = SwitchPrimitives.Root.displayName
26+
));
27+
Switch.displayName = SwitchPrimitives.Root.displayName;
2828

29-
export { Switch }
29+
export { Switch };

0 commit comments

Comments
 (0)