feat(settings): add font and apply to relevant text fields
This commit is contained in:
parent
a1a482abcc
commit
4b3e0677e4
9 changed files with 49 additions and 18 deletions
|
@ -6,6 +6,9 @@
|
||||||
:root {
|
:root {
|
||||||
/* Custom values */
|
/* Custom values */
|
||||||
|
|
||||||
|
--font-heading: 'Comfortaa', sans-serif;
|
||||||
|
--font-label: 'Varela Round', sans-serif;
|
||||||
|
|
||||||
--transparent: transparent;
|
--transparent: transparent;
|
||||||
|
|
||||||
--neutral-000: oklch(0 0 0);
|
--neutral-000: oklch(0 0 0);
|
||||||
|
@ -30,9 +33,9 @@
|
||||||
--radius: 0.688rem;
|
--radius: 0.688rem;
|
||||||
|
|
||||||
--primary: oklch(0.7493 0.1551 74.95);
|
--primary: oklch(0.7493 0.1551 74.95);
|
||||||
--hover-primary: oklch(0.6568 0.1358 74.86 / 0.8);
|
--hover-primary: oklch(0.7493 0.1551 74.95 / 0.8);
|
||||||
--active-primary: oklch(0.5911 0.1135 78.29);
|
--active-primary: oklch(0.6191 0.1218 77.58);
|
||||||
--disabled-primary: oklch(0.6568 0.1358 74.86 / 0.5);
|
--disabled-primary: oklch(0.7493 0.1551 74.95 / 0.5);
|
||||||
|
|
||||||
--secondary: oklch(0.4937 0.1697 271.26);
|
--secondary: oklch(0.4937 0.1697 271.26);
|
||||||
--hover-secondary: oklch(0.4937 0.1697 271.26 / 0.8);
|
--hover-secondary: oklch(0.4937 0.1697 271.26 / 0.8);
|
||||||
|
@ -45,8 +48,6 @@
|
||||||
|
|
||||||
--foreground: oklch(0.13 0.028 261.692);
|
--foreground: oklch(0.13 0.028 261.692);
|
||||||
|
|
||||||
--card: oklch(1 0 0);
|
|
||||||
|
|
||||||
--card-foreground: oklch(0.13 0.028 261.692);
|
--card-foreground: oklch(0.13 0.028 261.692);
|
||||||
|
|
||||||
--popover: oklch(1 0 0);
|
--popover: oklch(1 0 0);
|
||||||
|
@ -100,7 +101,25 @@
|
||||||
--sidebar-ring: oklch(0.707 0.022 261.325);
|
--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 {
|
@theme inline {
|
||||||
|
--font-heading: var(--font-heading);
|
||||||
|
--font-label: var(--font-label);
|
||||||
|
|
||||||
--transparent: var(--transparent);
|
--transparent: var(--transparent);
|
||||||
|
|
||||||
--color-neutral-000: var(--neutral-000);
|
--color-neutral-000: var(--neutral-000);
|
||||||
|
@ -132,7 +151,7 @@
|
||||||
--color-secondary: var(--secondary);
|
--color-secondary: var(--secondary);
|
||||||
--color-hover-secondary: var(--hover-secondary);
|
--color-hover-secondary: var(--hover-secondary);
|
||||||
--color-active-secondary: var(--active-secondary);
|
--color-active-secondary: var(--active-secondary);
|
||||||
--disabled-secondary: var(--disabled-secondary);
|
--color-disabled-secondary: var(--disabled-secondary);
|
||||||
|
|
||||||
/* Custom values */
|
/* Custom values */
|
||||||
|
|
||||||
|
@ -152,7 +171,7 @@
|
||||||
|
|
||||||
--color-card-foreground: var(--card-foreground);
|
--color-card-foreground: var(--card-foreground);
|
||||||
|
|
||||||
--color-popover: var(--popover);
|
--color-popover: var(--color-background);
|
||||||
|
|
||||||
--color-popover-foreground: var(--popover-foreground);
|
--color-popover-foreground: var(--popover-foreground);
|
||||||
|
|
||||||
|
@ -168,7 +187,7 @@
|
||||||
|
|
||||||
--color-muted-foreground: var(--muted-foreground);
|
--color-muted-foreground: var(--muted-foreground);
|
||||||
|
|
||||||
--color-accent: var(--accent);
|
--color-accent: var(--color-neutral-750);
|
||||||
|
|
||||||
--color-accent-foreground: var(--accent-foreground);
|
--color-accent-foreground: var(--accent-foreground);
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ export default function SettingsPage() {
|
||||||
</Select>
|
</Select>
|
||||||
</div>
|
</div>
|
||||||
<div className='pt-4'>
|
<div className='pt-4'>
|
||||||
<Button variant='destructive'>Delete Account</Button>
|
<Button variant='secondary'>Delete Account</Button>
|
||||||
<p className='text-sm text-muted-foreground pt-1'>
|
<p className='text-sm text-muted-foreground pt-1'>
|
||||||
Permanently delete your account and all associated data.
|
Permanently delete your account and all associated data.
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { cva, type VariantProps } from 'class-variance-authority';
|
||||||
import { cn } from '@/lib/utils';
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
const buttonVariants = cva(
|
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: {
|
variants: {
|
||||||
variant: {
|
variant: {
|
||||||
|
@ -37,7 +37,7 @@ const buttonVariants = cva(
|
||||||
);
|
);
|
||||||
|
|
||||||
function Button({
|
function Button({
|
||||||
className,
|
className = 'font-label',
|
||||||
variant,
|
variant,
|
||||||
size,
|
size,
|
||||||
asChild = false,
|
asChild = false,
|
||||||
|
@ -51,7 +51,7 @@ function Button({
|
||||||
return (
|
return (
|
||||||
<Comp
|
<Comp
|
||||||
data-slot='button'
|
data-slot='button'
|
||||||
className={cn(buttonVariants({ variant, size, className }))}
|
className={cn(buttonVariants({ variant, size }), className)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
|
@ -15,7 +15,7 @@ export default function LabeledInput({
|
||||||
name?: string;
|
name?: string;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<div className='grid grid-cols-1 gap-1'>
|
<div className='grid grid-cols-1 gap-1 font-label'>
|
||||||
<Label htmlFor={name}>{label}</Label>
|
<Label htmlFor={name}>{label}</Label>
|
||||||
|
|
||||||
<Input
|
<Input
|
||||||
|
|
|
@ -110,6 +110,18 @@ export default function Logo({
|
||||||
// Match the varName with the Logo-Asset name and store it in "logoVar"
|
// Match the varName with the Logo-Asset name and store it in "logoVar"
|
||||||
const logoVar = logoAssets[varName as keyof typeof logoAssets];
|
const logoVar = logoAssets[varName as keyof typeof logoAssets];
|
||||||
|
|
||||||
|
if (!logoVar) {
|
||||||
|
console.error(`Logo: Could not find logo asset for ${varName}`);
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
role='alert'
|
||||||
|
className='p-2 text-red-700 bg-red-100 border border-red-500 rounded-md text-xs'
|
||||||
|
>
|
||||||
|
Error: Logo asset not found. Check console.
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Image
|
<Image
|
||||||
src={logoVar}
|
src={logoVar}
|
||||||
|
|
|
@ -8,7 +8,7 @@ function Input({ className, type, ...props }: React.ComponentProps<'input'>) {
|
||||||
type={type}
|
type={type}
|
||||||
data-slot='input'
|
data-slot='input'
|
||||||
className={cn(
|
className={cn(
|
||||||
'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
|
'file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-label disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
|
||||||
'focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]',
|
'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',
|
'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
|
||||||
className,
|
className,
|
||||||
|
|
|
@ -13,7 +13,7 @@ function Label({
|
||||||
<LabelPrimitive.Root
|
<LabelPrimitive.Root
|
||||||
data-slot='label'
|
data-slot='label'
|
||||||
className={cn(
|
className={cn(
|
||||||
'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
|
'flex items-center gap-2 text-sm leading-none font-label select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
|
|
@ -107,7 +107,7 @@ function SelectItem({
|
||||||
<SelectPrimitive.Item
|
<SelectPrimitive.Item
|
||||||
data-slot='select-item'
|
data-slot='select-item'
|
||||||
className={cn(
|
className={cn(
|
||||||
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
"focus:bg-accent focus:text-text [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
|
|
@ -25,13 +25,13 @@ export default function LoginForm() {
|
||||||
<LabeledInput
|
<LabeledInput
|
||||||
type='email'
|
type='email'
|
||||||
label='E-Mail or Username'
|
label='E-Mail or Username'
|
||||||
placeholder='What you are known as.'
|
placeholder='What you are known as'
|
||||||
name='email'
|
name='email'
|
||||||
/>
|
/>
|
||||||
<LabeledInput
|
<LabeledInput
|
||||||
type='password'
|
type='password'
|
||||||
label='Password'
|
label='Password'
|
||||||
placeholder="Let's hope you remember it."
|
placeholder="Let's hope you remember it"
|
||||||
name='password'
|
name='password'
|
||||||
/>
|
/>
|
||||||
<div className='grid grid-rows-2 gap-2'>
|
<div className='grid grid-rows-2 gap-2'>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue