From 4b3e0677e491a71110e4ad0079d1e7fd0df8aede Mon Sep 17 00:00:00 2001 From: SomeCodecat <88855796+SomeCodecat@users.noreply.github.com> Date: Thu, 22 May 2025 15:21:36 +0200 Subject: [PATCH] feat(settings): add font and apply to relevant text fields --- src/app/globals.css | 35 ++++++++++++++++++++++------- src/app/settings/page.tsx | 2 +- src/components/custom-ui/button.tsx | 6 ++--- src/components/labeled-input.tsx | 2 +- src/components/logo.tsx | 12 ++++++++++ src/components/ui/input.tsx | 2 +- src/components/ui/label.tsx | 2 +- src/components/ui/select.tsx | 2 +- src/components/user/login-form.tsx | 4 ++-- 9 files changed, 49 insertions(+), 18 deletions(-) diff --git a/src/app/globals.css b/src/app/globals.css index 558d875..99e47a7 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -6,6 +6,9 @@ :root { /* Custom values */ + --font-heading: 'Comfortaa', sans-serif; + --font-label: 'Varela Round', sans-serif; + --transparent: transparent; --neutral-000: oklch(0 0 0); @@ -30,9 +33,9 @@ --radius: 0.688rem; --primary: oklch(0.7493 0.1551 74.95); - --hover-primary: oklch(0.6568 0.1358 74.86 / 0.8); - --active-primary: oklch(0.5911 0.1135 78.29); - --disabled-primary: oklch(0.6568 0.1358 74.86 / 0.5); + --hover-primary: oklch(0.7493 0.1551 74.95 / 0.8); + --active-primary: oklch(0.6191 0.1218 77.58); + --disabled-primary: oklch(0.7493 0.1551 74.95 / 0.5); --secondary: oklch(0.4937 0.1697 271.26); --hover-secondary: oklch(0.4937 0.1697 271.26 / 0.8); @@ -45,8 +48,6 @@ --foreground: oklch(0.13 0.028 261.692); - --card: oklch(1 0 0); - --card-foreground: oklch(0.13 0.028 261.692); --popover: oklch(1 0 0); @@ -100,7 +101,25 @@ --sidebar-ring: oklch(0.707 0.022 261.325); } +@font-face { + font-family: 'Comfortaa'; + font-style: normal; + font-weight: 300 700; + src: url('/Fonts/Comfortaa/Comfortaa-VariableFont_weight.ttf') + format('truetype'); +} + +@font-face { + font-family: 'Varela Round'; + font-style: normal; + font-weight: 400; + src: url('/Fonts/VarelaRound/VarelaRound-Regular.ttf') format('truetype'); +} + @theme inline { + --font-heading: var(--font-heading); + --font-label: var(--font-label); + --transparent: var(--transparent); --color-neutral-000: var(--neutral-000); @@ -132,7 +151,7 @@ --color-secondary: var(--secondary); --color-hover-secondary: var(--hover-secondary); --color-active-secondary: var(--active-secondary); - --disabled-secondary: var(--disabled-secondary); + --color-disabled-secondary: var(--disabled-secondary); /* Custom values */ @@ -152,7 +171,7 @@ --color-card-foreground: var(--card-foreground); - --color-popover: var(--popover); + --color-popover: var(--color-background); --color-popover-foreground: var(--popover-foreground); @@ -168,7 +187,7 @@ --color-muted-foreground: var(--muted-foreground); - --color-accent: var(--accent); + --color-accent: var(--color-neutral-750); --color-accent-foreground: var(--accent-foreground); diff --git a/src/app/settings/page.tsx b/src/app/settings/page.tsx index 9afe7c6..70e198d 100644 --- a/src/app/settings/page.tsx +++ b/src/app/settings/page.tsx @@ -88,7 +88,7 @@ export default function SettingsPage() {
Permanently delete your account and all associated data.
diff --git a/src/components/custom-ui/button.tsx b/src/components/custom-ui/button.tsx index 51f3b63..1910ea5 100644 --- a/src/components/custom-ui/button.tsx +++ b/src/components/custom-ui/button.tsx @@ -5,7 +5,7 @@ import { cva, type VariantProps } from 'class-variance-authority'; import { cn } from '@/lib/utils'; const buttonVariants = cva( - "radius-lg inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", + "radius-lg inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-label transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", { variants: { variant: { @@ -37,7 +37,7 @@ const buttonVariants = cva( ); function Button({ - className, + className = 'font-label', variant, size, asChild = false, @@ -51,7 +51,7 @@ function Button({ return (