diff --git a/src/app.css b/src/app.css index fe0b865..1a86416 100644 --- a/src/app.css +++ b/src/app.css @@ -19,76 +19,76 @@ @custom-variant dark (&:where(.dark, .dark *)); @theme { - /* single color */ - --color-highlight: #f9f6f1; - - --color-border: var(--color-highlight); - --color-text-muted: var(--color-text-muted); - - /* success */ - --color-success-50: #e3f2e7; - --color-success-100: #c7e6cf; - --color-success-200: #a2d4ae; - --color-success-300: #7dbf8e; - --color-success-400: #5ea571; - --color-success-500: #4e8e5f; - --color-success-600: #3e744c; - --color-success-700: #305b3b; - --color-success-800: #22412a; - --color-success-900: #15281b; - - /* info */ - --color-info-50: #e7eff6; - --color-info-100: #c5d9ea; - --color-info-200: #9fbfdb; - --color-info-300: #7aa5cc; - --color-info-400: #5e90be; - --color-info-500: #4779a5; - --color-info-600: #365d80; - --color-info-700: #27445d; - --color-info-800: #192b3a; - --color-info-900: #0d161f; - - /* warning */ - --color-warning-50: #fef4e6; - --color-warning-100: #fde4bf; - --color-warning-200: #fcd18e; - --color-warning-300: #fbbc5c; - --color-warning-400: #f9aa33; - --color-warning-500: #f7971b; - --color-warning-600: #c97a14; - --color-warning-700: #9a5c0e; - --color-warning-800: #6c3e08; - --color-warning-900: #3e2404; - - /* danger */ - --color-danger-50: #fbeaea; - --color-danger-100: #f5cccc; - --color-danger-200: #eba5a5; - --color-danger-300: #e17e7e; - --color-danger-400: #d96060; - --color-danger-500: #c94848; - --color-danger-600: #a53939; - --color-danger-700: #7c2b2b; - --color-danger-800: #521c1c; - --color-danger-900: #2b0e0e; + /* single color */ + --color-highlight: #f9f6f1; + + --color-border: var(--color-highlight); + --color-text-muted: var(--color-text-muted); + + /* success */ + --color-success-50: #e3f2e7; + --color-success-100: #c7e6cf; + --color-success-200: #a2d4ae; + --color-success-300: #7dbf8e; + --color-success-400: #5ea571; + --color-success-500: #4e8e5f; + --color-success-600: #3e744c; + --color-success-700: #305b3b; + --color-success-800: #22412a; + --color-success-900: #15281b; + + /* info */ + --color-info-50: #e7eff6; + --color-info-100: #c5d9ea; + --color-info-200: #9fbfdb; + --color-info-300: #7aa5cc; + --color-info-400: #5e90be; + --color-info-500: #4779a5; + --color-info-600: #365d80; + --color-info-700: #27445d; + --color-info-800: #192b3a; + --color-info-900: #0d161f; + + /* warning */ + --color-warning-50: #fef4e6; + --color-warning-100: #fde4bf; + --color-warning-200: #fcd18e; + --color-warning-300: #fbbc5c; + --color-warning-400: #f9aa33; + --color-warning-500: #f7971b; + --color-warning-600: #c97a14; + --color-warning-700: #9a5c0e; + --color-warning-800: #6c3e08; + --color-warning-900: #3e2404; + + /* danger */ + --color-danger-50: #fbeaea; + --color-danger-100: #f5cccc; + --color-danger-200: #eba5a5; + --color-danger-300: #e17e7e; + --color-danger-400: #d96060; + --color-danger-500: #c94848; + --color-danger-600: #a53939; + --color-danger-700: #7c2b2b; + --color-danger-800: #521c1c; + --color-danger-900: #2b0e0e; } /* Map Tailwind utilities → theme tokens (PRIMARY ONLY) */ @theme inline { - --color-primary-0: var(--brand-primary-0); - --color-primary-50: var(--brand-primary-50); - --color-primary-100: var(--brand-primary-100); - --color-primary-200: var(--brand-primary-200); - --color-primary-300: var(--brand-primary-300); - --color-primary-400: var(--brand-primary-400); - --color-primary-500: var(--brand-primary-500); - --color-primary-600: var(--brand-primary-600); - --color-primary-700: var(--brand-primary-700); - --color-primary-800: var(--brand-primary-800); - --color-primary-900: var(--brand-primary-900); - --color-primary-950: var(--brand-primary-950); - --color-primary-1000: var(--brand-primary-1000); + --color-primary-0: var(--brand-primary-0); + --color-primary-50: var(--brand-primary-50); + --color-primary-100: var(--brand-primary-100); + --color-primary-200: var(--brand-primary-200); + --color-primary-300: var(--brand-primary-300); + --color-primary-400: var(--brand-primary-400); + --color-primary-500: var(--brand-primary-500); + --color-primary-600: var(--brand-primary-600); + --color-primary-700: var(--brand-primary-700); + --color-primary-800: var(--brand-primary-800); + --color-primary-900: var(--brand-primary-900); + --color-primary-950: var(--brand-primary-950); + --color-primary-1000: var(--brand-primary-1000); } @source "../node_modules/flowbite-svelte/dist"; @@ -97,33 +97,47 @@ /* @utility and @layer rules… */ /* .content-visibility-auto */ -@utility content-visibility-auto { content-visibility: auto; } +@utility content-visibility-auto { + content-visibility: auto; +} /* .contain-size */ -@utility contain-size { contain: size; } +@utility contain-size { + contain: size; +} /* numbers -> px (e.g. contain-intrinsic-w-[320] => width: 320px) */ @utility contain-intrinsic-w-* { - --tw-ciw: --value(number); - width: calc(var(--tw-ciw) * 1px); + --tw-ciw: --value(number); + width: calc(var(--tw-ciw) * 1px); } @utility contain-intrinsic-h-* { - --tw-cih: --value(number); - height: calc(var(--tw-cih) * 1px); + --tw-cih: --value(number); + height: calc(var(--tw-cih) * 1px); } /* percentages (e.g. contain-intrinsic-wp-[65%] => width: 65%) */ -@utility contain-intrinsic-wp-* { width: --value(percentage); } -@utility contain-intrinsic-hp-* { height: --value(percentage); } +@utility contain-intrinsic-wp-* { + width: --value(percentage); +} +@utility contain-intrinsic-hp-* { + height: --value(percentage); +} /* list-upper-alpha, list-lower-alpha (keep your old class names) Note: in v4 you can also write list-[upper-alpha] / list-[lower-alpha] inline. */ -@utility list-upper-alpha { list-style-type: upper-alpha; } -@utility list-lower-alpha { list-style-type: lower-alpha; } +@utility list-upper-alpha { + list-style-type: upper-alpha; +} +@utility list-lower-alpha { + list-style-type: lower-alpha; +} /* flexGrow 1/2/3 — unlock grow-2, grow-3 (and any number via brackets) */ -@utility grow-* { flex-grow: --value(integer); } +@utility grow-* { + flex-grow: --value(integer); +} /* Hue rotate: use arbitrary values directly, e.g. hue-rotate-[20deg] (no config needed). */ @@ -135,10 +149,11 @@ @layer base { /* disable chrome cancel button */ input[type="search"]::-webkit-search-cancel-button { - display: none; + display: none; } - .leather, .publication-leather { + .leather, + .publication-leather { @apply bg-primary-50 dark:bg-primary-1000 text-gray-900 dark:text-gray-100; } @@ -465,7 +480,6 @@ } @layer components { - nav a { text-decoration-line: none !important; } @@ -506,7 +520,12 @@ /* common heading base styles */ - h1, h2, h3, h4, h5, h6 { + h1, + h2, + h3, + h4, + h5, + h6 { @apply text-gray-900 dark:text-gray-100 pt-4; } diff --git a/src/app.html b/src/app.html index 33b6e90..c646c7a 100644 --- a/src/app.html +++ b/src/app.html @@ -1,4 +1,4 @@ - +
@@ -8,7 +8,7 @@ - + - + %sveltekit.head% diff --git a/src/lib/a/README.md b/src/lib/a/README.md index 641f7b6..d2ea9e3 100644 --- a/src/lib/a/README.md +++ b/src/lib/a/README.md @@ -1,11 +1,10 @@ # Component Library -This folder contains a component library. -The idea is to have project-scoped reusable components that centralize theming and style rules, +This folder contains a component library. +The idea is to have project-scoped reusable components that centralize theming and style rules, so that main pages and layouts focus on the functionalities. All components are based on Flowbite Svelte components, -which are built on top of Tailwind CSS. +which are built on top of Tailwind CSS. Keeping all the styles in one place allows us to easily change the look and feel of the application by switching themes. - diff --git a/src/lib/a/cards/AEventPreview.svelte b/src/lib/a/cards/AEventPreview.svelte index 54f9ad7..03b3b5b 100644 --- a/src/lib/a/cards/AEventPreview.svelte +++ b/src/lib/a/cards/AEventPreview.svelte @@ -18,7 +18,7 @@ showContent = true, actions, onSelect, - onDeferralClick + onDeferralClick, }: { event: NDKEvent; label?: string; @@ -29,7 +29,11 @@ showDeferralNaddr?: boolean; showPublicationLink?: boolean; showContent?: boolean; - actions?: { label: string; onClick: (ev: NDKEvent) => void; variant?: "primary" | "light" | "alternative" }[]; + actions?: { + label: string; + onClick: (ev: NDKEvent) => void; + variant?: "primary" | "light" | "alternative"; + }[]; onSelect?: (ev: NDKEvent) => void; onDeferralClick?: (naddr: string, ev: NDKEvent) => void; } = $props(); @@ -98,12 +102,12 @@ const displayName: string | undefined = profileData?.display_name || profileData?.name; - const avatarFallback: string = - (displayName || event.pubkey || "?").slice(0, 1).toUpperCase(); - const createdDate: string = - event.created_at - ? new Date(event.created_at * 1000).toLocaleDateString() - : "Unknown date"; + const avatarFallback: string = (displayName || event.pubkey || "?") + .slice(0, 1) + .toUpperCase(); + const createdDate: string = event.created_at + ? new Date(event.created_at * 1000).toLocaleDateString() + : "Unknown date"; const computedActions = actions && actions.length > 0 @@ -112,8 +116,8 @@ { label: "Open", onClick: (ev: NDKEvent) => onSelect?.(ev), - variant: "light" as const - } + variant: "light" as const, + }, ]; @@ -131,31 +135,35 @@{props.profile.lud16}
@@ -240,7 +364,8 @@Scan the QR code or copy the address
{#if lnurl}
-