style: update dark mode and adjust accent colors

This commit is contained in:
Youwen Wu 2024-04-04 15:11:35 -07:00
parent e39cce1da6
commit c26de6ecfe
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
5 changed files with 36 additions and 40 deletions

View file

@ -7,7 +7,7 @@
--background: 0 0% 93%; --background: 0 0% 93%;
--foreground: 240 10% 3.9%; --foreground: 240 10% 3.9%;
--muted: 240 4.8% 95.9%; --muted: 240 4.8% 90%;
--muted-foreground: 240 3.8% 46.1%; --muted-foreground: 240 3.8% 46.1%;
--popover: 0 0% 96%; --popover: 0 0% 96%;
@ -22,11 +22,11 @@
--primary: 240 5.9% 10%; --primary: 240 5.9% 10%;
--primary-foreground: 0 0% 98%; --primary-foreground: 0 0% 98%;
--secondary: 240 4.8% 95.9%; --secondary: 240 4.8% 90%;
--secondary-foreground: 240 5.9% 10%; --secondary-foreground: 240 5.9% 12%;
--accent: 240 4.8% 95.9%; --accent: 240 4.8% 90%;
--accent-foreground: 240 5.9% 10%; --accent-foreground: 240 5.9% 12%;
--destructive: 0 72.2% 50.6%; --destructive: 0 72.2% 50.6%;
--destructive-foreground: 0 0% 98%; --destructive-foreground: 0 0% 98%;
@ -39,16 +39,16 @@
} }
.dark { .dark {
--background: 240 10% 3.9%; --background: 240 10% 7%;
--foreground: 0 0% 98%; --foreground: 0 0% 98%;
--muted: 240 3.7% 15.9%; --muted: 240 3.7% 15.9%;
--muted-foreground: 240 5% 64.9%; --muted-foreground: 240 5% 64.9%;
--popover: 240 10% 3.9%; --popover: 240 10% 6%;
--popover-foreground: 0 0% 98%; --popover-foreground: 0 0% 98%;
--card: 240 10% 3.9%; --card: 240 10% 6%;
--card-foreground: 0 0% 98%; --card-foreground: 0 0% 98%;
--border: 240 3.7% 15.9%; --border: 240 3.7% 15.9%;
@ -88,8 +88,7 @@
Cantarell, Cantarell,
'Open Sans', 'Open Sans',
'Helvetica Neue', 'Helvetica Neue',
sans-serif, sans-serif;
'Noto Color Emoji';
} }
} }

View file

@ -23,7 +23,7 @@
{/if} {/if}
</div> </div>
<div class="markdown-body mt-8"> <div class="markdown-body mt-8 font-serif">
{@html content} {@html content}
</div> </div>
</article> </article>

View file

@ -1,35 +1,34 @@
import type { Button as ButtonPrimitive } from "bits-ui"; import type { Button as ButtonPrimitive } from 'bits-ui';
import { type VariantProps, tv } from "tailwind-variants"; import { type VariantProps, tv } from 'tailwind-variants';
import Root from "./button.svelte"; import Root from './button.svelte';
const buttonVariants = tv({ const buttonVariants = tv({
base: "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", base: 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50',
variants: { variants: {
variant: { variant: {
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90", default: 'bg-primary text-primary-foreground shadow hover:bg-primary/90',
destructive: destructive: 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90',
"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
outline: outline:
"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground", 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground',
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80", secondary: 'bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80',
ghost: "hover:bg-accent hover:text-accent-foreground", ghost: 'hover:bg-accent hover:text-accent-foreground',
link: "text-primary underline-offset-4 hover:underline", link: 'text-primary underline-offset-4 hover:underline'
}, },
size: { size: {
default: "h-9 px-4 py-2", default: 'h-9 px-4 py-2',
sm: "h-8 rounded-md px-3 text-xs", sm: 'h-8 rounded-md px-3 text-xs',
lg: "h-10 rounded-md px-8", lg: 'h-10 rounded-md px-8',
icon: "h-9 w-9", icon: 'h-9 w-9'
}, }
}, },
defaultVariants: { defaultVariants: {
variant: "default", variant: 'default',
size: "default", size: 'default'
}, }
}); });
type Variant = VariantProps<typeof buttonVariants>["variant"]; type Variant = VariantProps<typeof buttonVariants>['variant'];
type Size = VariantProps<typeof buttonVariants>["size"]; type Size = VariantProps<typeof buttonVariants>['size'];
type Props = ButtonPrimitive.Props & { type Props = ButtonPrimitive.Props & {
variant?: Variant; variant?: Variant;
@ -46,5 +45,5 @@ export {
Root as Button, Root as Button,
type Props as ButtonProps, type Props as ButtonProps,
type Events as ButtonEvents, type Events as ButtonEvents,
buttonVariants, buttonVariants
}; };

View file

@ -29,7 +29,7 @@
} }
dl { dl {
font-family: monospace, monospace; font-family: monospace;
} }
dl dt { dl dt {
font-weight: bold; font-weight: bold;
@ -87,7 +87,7 @@
padding: 1em; padding: 1em;
overflow: auto; overflow: auto;
font-size: 0.85rem; font-size: 0.85rem;
font-family: monospace, monospace; font-family: monospace;
border: 1px dashed rgba(250, 100, 50, 0.5); border: 1px dashed rgba(250, 100, 50, 0.5);
} }
@ -95,7 +95,7 @@
margin: 1em 0; margin: 1em 0;
} }
figure figcaption { figure figcaption {
font-family: monospace, monospace; font-family: monospace;
font-size: 0.75em; font-size: 0.75em;
text-align: center; text-align: center;
color: grey; color: grey;
@ -114,7 +114,7 @@
@apply border-l-red-600 bg-red-100 dark:bg-red-900 dark:text-red-100; @apply border-l-red-600 bg-red-100 dark:bg-red-900 dark:text-red-100;
} }
.markdown-alert-title { .markdown-alert-title {
@apply flex items-center font-medium text-xl; @apply flex items-center font-medium text-xl font-sans;
} }
.markdown-alert-caution > .markdown-alert-title { .markdown-alert-caution > .markdown-alert-title {
@apply text-red-600 fill-red-600 dark:text-red-100 dark:fill-red-100; @apply text-red-600 fill-red-600 dark:text-red-100 dark:fill-red-100;

View file

@ -88,9 +88,7 @@
</p> </p>
</Card.Content> </Card.Content>
<Card.Footer> <Card.Footer>
<Button variant="outline" href="/blog" <Button variant="outline" href="/blog">Go to my blog<ArrowRight class="ml-2" /></Button>
>Go to the Coredump<ArrowRight class="ml-2" /></Button
>
</Card.Footer> </Card.Footer>
</Card.Root> </Card.Root>
<Card.Root class="col-span-2"> <Card.Root class="col-span-2">