diff --git a/assets/icon.svg b/assets/icon.svg new file mode 100644 index 0000000..ec6a62c --- /dev/null +++ b/assets/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/main.css b/assets/main.css index 4314613..f02ef5b 100644 --- a/assets/main.css +++ b/assets/main.css @@ -1,9 +1,11 @@ /* App-wide styling */ body { - background-color: #0f1116; - color: #ffffff; + background-color: #0f172a; + color: #f8fafc; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; - margin: 20px; + margin: 0; + padding: 0; + overflow: hidden; } #hero { @@ -46,8 +48,8 @@ body { #navbar { display: flex; flex-direction: row; - } - +} + #navbar a { color: #ffffff; margin-right: 20px; @@ -63,8 +65,8 @@ body { /* Blog page */ #blog { margin-top: 50px; - } - +} + #blog a { color: #ffffff; margin-top: 50px; diff --git a/assets/tailwind.css b/assets/tailwind.css index a1f9f71..1d47677 100644 --- a/assets/tailwind.css +++ b/assets/tailwind.css @@ -10,14 +10,20 @@ --color-red-50: oklch(97.1% 0.013 17.38); --color-red-100: oklch(93.6% 0.032 17.717); --color-red-200: oklch(88.5% 0.062 18.334); + --color-red-300: oklch(80.8% 0.114 19.571); --color-red-400: oklch(70.4% 0.191 22.216); --color-red-500: oklch(63.7% 0.237 25.331); --color-red-600: oklch(57.7% 0.245 27.325); --color-red-700: oklch(50.5% 0.213 27.518); --color-red-800: oklch(44.4% 0.177 26.899); + --color-red-900: oklch(39.6% 0.141 25.723); + --color-green-400: oklch(79.2% 0.209 151.711); --color-green-500: oklch(72.3% 0.219 149.579); --color-green-600: oklch(62.7% 0.194 149.214); --color-green-700: oklch(52.7% 0.154 150.069); + --color-emerald-400: oklch(76.5% 0.177 163.223); + --color-emerald-500: oklch(69.6% 0.17 162.48); + --color-emerald-600: oklch(59.6% 0.145 163.225); --color-cyan-50: oklch(98.4% 0.019 200.873); --color-blue-50: oklch(97% 0.014 254.604); --color-blue-200: oklch(88.2% 0.059 254.128); @@ -27,11 +33,26 @@ --color-blue-900: oklch(37.9% 0.146 265.522); --color-indigo-50: oklch(96.2% 0.018 272.314); --color-indigo-100: oklch(93% 0.034 272.788); + --color-indigo-300: oklch(78.5% 0.115 274.713); + --color-indigo-400: oklch(67.3% 0.182 276.935); --color-indigo-500: oklch(58.5% 0.233 277.117); --color-indigo-600: oklch(51.1% 0.262 276.966); --color-indigo-700: oklch(45.7% 0.24 277.023); + --color-indigo-900: oklch(35.9% 0.144 278.697); + --color-purple-400: oklch(71.4% 0.203 305.504); --color-purple-500: oklch(62.7% 0.265 303.9); --color-purple-600: oklch(55.8% 0.288 302.321); + --color-pink-500: oklch(65.6% 0.241 354.308); + --color-pink-600: oklch(59.2% 0.249 0.584); + --color-slate-50: oklch(98.4% 0.003 247.858); + --color-slate-200: oklch(92.9% 0.013 255.508); + --color-slate-300: oklch(86.9% 0.022 252.894); + --color-slate-400: oklch(70.4% 0.04 256.788); + --color-slate-500: oklch(55.4% 0.046 257.417); + --color-slate-600: oklch(44.6% 0.043 257.281); + --color-slate-700: oklch(37.2% 0.044 257.287); + --color-slate-800: oklch(27.9% 0.041 260.031); + --color-slate-900: oklch(20.8% 0.042 265.755); --color-gray-50: oklch(98.5% 0.002 247.839); --color-gray-100: oklch(96.7% 0.003 264.542); --color-gray-200: oklch(92.8% 0.006 264.531); @@ -41,10 +62,13 @@ --color-gray-600: oklch(44.6% 0.03 256.802); --color-gray-700: oklch(37.3% 0.034 259.733); --color-gray-900: oklch(21% 0.034 264.665); + --color-black: #000; --color-white: #fff; --spacing: 0.25rem; + --container-sm: 24rem; --container-md: 28rem; --container-2xl: 42rem; + --container-3xl: 48rem; --container-4xl: 56rem; --container-5xl: 64rem; --container-7xl: 80rem; @@ -52,6 +76,8 @@ --text-xs--line-height: calc(1 / 0.75); --text-sm: 0.875rem; --text-sm--line-height: calc(1.25 / 0.875); + --text-base: 1rem; + --text-base--line-height: calc(1.5 / 1); --text-lg: 1.125rem; --text-lg--line-height: calc(1.75 / 1.125); --text-xl: 1.25rem; @@ -60,16 +86,28 @@ --text-2xl--line-height: calc(2 / 1.5); --text-3xl: 1.875rem; --text-3xl--line-height: calc(2.25 / 1.875); + --text-4xl: 2.25rem; + --text-4xl--line-height: calc(2.5 / 2.25); --text-5xl: 3rem; --text-5xl--line-height: 1; --text-6xl: 3.75rem; --text-6xl--line-height: 1; + --text-7xl: 4.5rem; + --text-7xl--line-height: 1; --font-weight-medium: 500; --font-weight-semibold: 600; --font-weight-bold: 700; + --font-weight-extrabold: 800; + --tracking-tight: -0.025em; + --tracking-wider: 0.05em; --radius-md: 0.375rem; --radius-lg: 0.5rem; + --radius-xl: 0.75rem; + --radius-2xl: 1rem; --animate-spin: spin 1s linear infinite; + --blur-sm: 8px; + --blur-md: 12px; + --blur-3xl: 64px; --default-transition-duration: 150ms; --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); --default-font-family: var(--font-sans); @@ -234,6 +272,36 @@ .inset-0 { inset: calc(var(--spacing) * 0); } + .-top-2 { + top: calc(var(--spacing) * -2); + } + .top-0 { + top: calc(var(--spacing) * 0); + } + .-right-2 { + right: calc(var(--spacing) * -2); + } + .right-0 { + right: calc(var(--spacing) * 0); + } + .-bottom-2 { + bottom: calc(var(--spacing) * -2); + } + .bottom-0 { + bottom: calc(var(--spacing) * 0); + } + .-left-2 { + left: calc(var(--spacing) * -2); + } + .left-1\/2 { + left: calc(1/2 * 100%); + } + .-z-10 { + z-index: calc(10 * -1); + } + .z-50 { + z-index: 50; + } .container { width: 100%; @media (width >= 40rem) { @@ -267,6 +335,9 @@ .mt-6 { margin-top: calc(var(--spacing) * 6); } + .mt-10 { + margin-top: calc(var(--spacing) * 10); + } .mt-20 { margin-top: calc(var(--spacing) * 20); } @@ -294,6 +365,9 @@ .mb-8 { margin-bottom: calc(var(--spacing) * 8); } + .mb-12 { + margin-bottom: calc(var(--spacing) * 12); + } .ml-3 { margin-left: calc(var(--spacing) * 3); } @@ -315,42 +389,90 @@ .inline-flex { display: inline-flex; } + .table { + display: table; + } + .h-4 { + height: calc(var(--spacing) * 4); + } .h-5 { height: calc(var(--spacing) * 5); } + .h-6 { + height: calc(var(--spacing) * 6); + } .h-8 { height: calc(var(--spacing) * 8); } + .h-10 { + height: calc(var(--spacing) * 10); + } .h-12 { height: calc(var(--spacing) * 12); } .h-16 { height: calc(var(--spacing) * 16); } + .h-24 { + height: calc(var(--spacing) * 24); + } + .h-\[600px\] { + height: 600px; + } + .h-screen { + height: 100vh; + } + .min-h-full { + min-height: 100%; + } .min-h-screen { min-height: 100vh; } + .w-1 { + width: calc(var(--spacing) * 1); + } + .w-4 { + width: calc(var(--spacing) * 4); + } .w-5 { width: calc(var(--spacing) * 5); } .w-8 { width: calc(var(--spacing) * 8); } + .w-10 { + width: calc(var(--spacing) * 10); + } .w-12 { width: calc(var(--spacing) * 12); } .w-16 { width: calc(var(--spacing) * 16); } + .w-24 { + width: calc(var(--spacing) * 24); + } .w-96 { width: calc(var(--spacing) * 96); } + .w-\[800px\] { + width: 800px; + } + .w-\[1000px\] { + width: 1000px; + } .w-full { width: 100%; } + .w-screen { + width: 100vw; + } .max-w-2xl { max-width: var(--container-2xl); } + .max-w-3xl { + max-width: var(--container-3xl); + } .max-w-4xl { max-width: var(--container-4xl); } @@ -363,18 +485,34 @@ .max-w-md { max-width: var(--container-md); } + .max-w-sm { + max-width: var(--container-sm); + } .flex-1 { flex: 1; } + .flex-shrink { + flex-shrink: 1; + } .flex-shrink-0 { flex-shrink: 0; } + .border-collapse { + border-collapse: collapse; + } + .-translate-x-1\/2 { + --tw-translate-x: calc(calc(1/2 * 100%) * -1); + translate: var(--tw-translate-x) var(--tw-translate-y); + } .transform { transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,); } .animate-spin { animation: var(--animate-spin); } + .resize { + resize: both; + } .appearance-none { appearance: none; } @@ -393,6 +531,9 @@ .gap-2 { gap: calc(var(--spacing) * 2); } + .gap-3 { + gap: calc(var(--spacing) * 3); + } .gap-4 { gap: calc(var(--spacing) * 4); } @@ -402,6 +543,20 @@ .gap-8 { gap: calc(var(--spacing) * 8); } + .space-y-1 { + :where(& > :not(:last-child)) { + --tw-space-y-reverse: 0; + margin-block-start: calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse)); + margin-block-end: calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse))); + } + } + .space-y-2 { + :where(& > :not(:last-child)) { + --tw-space-y-reverse: 0; + margin-block-start: calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse)); + margin-block-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse))); + } + } .space-y-3 { :where(& > :not(:last-child)) { --tw-space-y-reverse: 0; @@ -430,6 +585,16 @@ margin-block-end: calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse))); } } + .space-y-12 { + :where(& > :not(:last-child)) { + --tw-space-y-reverse: 0; + margin-block-start: calc(calc(var(--spacing) * 12) * var(--tw-space-y-reverse)); + margin-block-end: calc(calc(var(--spacing) * 12) * calc(1 - var(--tw-space-y-reverse))); + } + } + .gap-x-6 { + column-gap: calc(var(--spacing) * 6); + } .space-x-4 { :where(& > :not(:last-child)) { --tw-space-x-reverse: 0; @@ -437,9 +602,18 @@ margin-inline-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-x-reverse))); } } + .overflow-hidden { + overflow: hidden; + } + .overflow-y-auto { + overflow-y: auto; + } .rounded { border-radius: 0.25rem; } + .rounded-2xl { + border-radius: var(--radius-2xl); + } .rounded-full { border-radius: calc(infinity * 1px); } @@ -449,6 +623,9 @@ .rounded-md { border-radius: var(--radius-md); } + .rounded-xl { + border-radius: var(--radius-xl); + } .border { border-style: var(--tw-border-style); border-width: 1px; @@ -488,15 +665,51 @@ .border-indigo-500 { border-color: var(--color-indigo-500); } + .border-indigo-500\/20 { + border-color: color-mix(in srgb, oklch(58.5% 0.233 277.117) 20%, transparent); + @supports (color: color-mix(in lab, red, red)) { + border-color: color-mix(in oklab, var(--color-indigo-500) 20%, transparent); + } + } .border-indigo-600 { border-color: var(--color-indigo-600); } .border-red-200 { border-color: var(--color-red-200); } + .border-red-500\/30 { + border-color: color-mix(in srgb, oklch(63.7% 0.237 25.331) 30%, transparent); + @supports (color: color-mix(in lab, red, red)) { + border-color: color-mix(in oklab, var(--color-red-500) 30%, transparent); + } + } + .border-slate-600 { + border-color: var(--color-slate-600); + } + .border-slate-700 { + border-color: var(--color-slate-700); + } .border-transparent { border-color: transparent; } + .border-white\/5 { + border-color: color-mix(in srgb, #fff 5%, transparent); + @supports (color: color-mix(in lab, red, red)) { + border-color: color-mix(in oklab, var(--color-white) 5%, transparent); + } + } + .border-white\/10 { + border-color: color-mix(in srgb, #fff 10%, transparent); + @supports (color: color-mix(in lab, red, red)) { + border-color: color-mix(in oklab, var(--color-white) 10%, transparent); + } + } + .bg-black\/30 { + background-color: color-mix(in srgb, #000 30%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-black) 30%, transparent); + } + } .bg-blue-50 { background-color: var(--color-blue-50); } @@ -506,6 +719,15 @@ .bg-blue-600 { background-color: var(--color-blue-600); } + .bg-emerald-500\/20 { + background-color: color-mix(in srgb, oklch(69.6% 0.17 162.48) 20%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-emerald-500) 20%, transparent); + } + } + .bg-emerald-600 { + background-color: var(--color-emerald-600); + } .bg-gray-50 { background-color: var(--color-gray-50); } @@ -515,38 +737,145 @@ .bg-gray-500 { background-color: var(--color-gray-500); } + .bg-green-500\/20 { + background-color: color-mix(in srgb, oklch(72.3% 0.219 149.579) 20%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-green-500) 20%, transparent); + } + } .bg-green-600 { background-color: var(--color-green-600); } .bg-indigo-100 { background-color: var(--color-indigo-100); } + .bg-indigo-500\/20 { + background-color: color-mix(in srgb, oklch(58.5% 0.233 277.117) 20%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-indigo-500) 20%, transparent); + } + } .bg-indigo-600 { background-color: var(--color-indigo-600); } + .bg-indigo-600\/20 { + background-color: color-mix(in srgb, oklch(51.1% 0.262 276.966) 20%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-indigo-600) 20%, transparent); + } + } + .bg-indigo-900\/10 { + background-color: color-mix(in srgb, oklch(35.9% 0.144 278.697) 10%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-indigo-900) 10%, transparent); + } + } .bg-purple-500 { background-color: var(--color-purple-500); } + .bg-purple-600\/10 { + background-color: color-mix(in srgb, oklch(55.8% 0.288 302.321) 10%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-purple-600) 10%, transparent); + } + } .bg-red-50 { background-color: var(--color-red-50); } .bg-red-100 { background-color: var(--color-red-100); } + .bg-red-500\/20 { + background-color: color-mix(in srgb, oklch(63.7% 0.237 25.331) 20%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-red-500) 20%, transparent); + } + } .bg-red-600 { background-color: var(--color-red-600); } + .bg-red-900\/20 { + background-color: color-mix(in srgb, oklch(39.6% 0.141 25.723) 20%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-red-900) 20%, transparent); + } + } + .bg-slate-50 { + background-color: var(--color-slate-50); + } + .bg-slate-700\/30 { + background-color: color-mix(in srgb, oklch(37.2% 0.044 257.287) 30%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-slate-700) 30%, transparent); + } + } + .bg-slate-800\/50 { + background-color: color-mix(in srgb, oklch(27.9% 0.041 260.031) 50%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-slate-800) 50%, transparent); + } + } + .bg-slate-900 { + background-color: var(--color-slate-900); + } + .bg-slate-900\/50 { + background-color: color-mix(in srgb, oklch(20.8% 0.042 265.755) 50%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-slate-900) 50%, transparent); + } + } + .bg-slate-900\/80 { + background-color: color-mix(in srgb, oklch(20.8% 0.042 265.755) 80%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-slate-900) 80%, transparent); + } + } + .bg-transparent { + background-color: transparent; + } .bg-white { background-color: var(--color-white); } + .bg-gradient-to-b { + --tw-gradient-position: to bottom in oklab; + background-image: linear-gradient(var(--tw-gradient-stops)); + } .bg-gradient-to-br { --tw-gradient-position: to bottom right in oklab; background-image: linear-gradient(var(--tw-gradient-stops)); } + .bg-gradient-to-r { + --tw-gradient-position: to right in oklab; + background-image: linear-gradient(var(--tw-gradient-stops)); + } .from-indigo-50 { --tw-gradient-from: var(--color-indigo-50); --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); } + .from-indigo-400 { + --tw-gradient-from: var(--color-indigo-400); + --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); + } + .from-indigo-500 { + --tw-gradient-from: var(--color-indigo-500); + --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); + } + .from-indigo-600 { + --tw-gradient-from: var(--color-indigo-600); + --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); + } + .from-purple-600 { + --tw-gradient-from: var(--color-purple-600); + --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); + } + .from-slate-600 { + --tw-gradient-from: var(--color-slate-600); + --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); + } + .from-white { + --tw-gradient-from: var(--color-white); + --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); + } .via-white { --tw-gradient-via: var(--color-white); --tw-gradient-via-stops: var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position); @@ -556,6 +885,39 @@ --tw-gradient-to: var(--color-cyan-50); --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); } + .to-pink-600 { + --tw-gradient-to: var(--color-pink-600); + --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); + } + .to-purple-400 { + --tw-gradient-to: var(--color-purple-400); + --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); + } + .to-purple-500 { + --tw-gradient-to: var(--color-purple-500); + --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); + } + .to-purple-600 { + --tw-gradient-to: var(--color-purple-600); + --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); + } + .to-slate-400 { + --tw-gradient-to: var(--color-slate-400); + --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); + } + .to-slate-700 { + --tw-gradient-to: var(--color-slate-700); + --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); + } + .bg-clip-text { + background-clip: text; + } + .p-1 { + padding: calc(var(--spacing) * 1); + } + .p-1\.5 { + padding: calc(var(--spacing) * 1.5); + } .p-2 { padding: calc(var(--spacing) * 2); } @@ -595,6 +957,9 @@ .py-3 { padding-block: calc(var(--spacing) * 3); } + .py-4 { + padding-block: calc(var(--spacing) * 4); + } .py-8 { padding-block: calc(var(--spacing) * 8); } @@ -604,12 +969,27 @@ .py-16 { padding-block: calc(var(--spacing) * 16); } + .py-24 { + padding-block: calc(var(--spacing) * 24); + } .pt-4 { padding-top: calc(var(--spacing) * 4); } + .pt-6 { + padding-top: calc(var(--spacing) * 6); + } + .pt-20 { + padding-top: calc(var(--spacing) * 20); + } + .pb-16 { + padding-bottom: calc(var(--spacing) * 16); + } .text-center { text-align: center; } + .font-mono { + font-family: var(--font-mono); + } .text-2xl { font-size: var(--text-2xl); line-height: var(--tw-leading, var(--text-2xl--line-height)); @@ -618,10 +998,18 @@ font-size: var(--text-3xl); line-height: var(--tw-leading, var(--text-3xl--line-height)); } + .text-4xl { + font-size: var(--text-4xl); + line-height: var(--tw-leading, var(--text-4xl--line-height)); + } .text-5xl { font-size: var(--text-5xl); line-height: var(--tw-leading, var(--text-5xl--line-height)); } + .text-base { + font-size: var(--text-base); + line-height: var(--tw-leading, var(--text-base--line-height)); + } .text-lg { font-size: var(--text-lg); line-height: var(--tw-leading, var(--text-lg--line-height)); @@ -642,6 +1030,10 @@ --tw-font-weight: var(--font-weight-bold); font-weight: var(--font-weight-bold); } + .font-extrabold { + --tw-font-weight: var(--font-weight-extrabold); + font-weight: var(--font-weight-extrabold); + } .font-medium { --tw-font-weight: var(--font-weight-medium); font-weight: var(--font-weight-medium); @@ -650,9 +1042,26 @@ --tw-font-weight: var(--font-weight-semibold); font-weight: var(--font-weight-semibold); } + .tracking-tight { + --tw-tracking: var(--tracking-tight); + letter-spacing: var(--tracking-tight); + } + .tracking-wider { + --tw-tracking: var(--tracking-wider); + letter-spacing: var(--tracking-wider); + } + .break-all { + word-break: break-all; + } + .whitespace-nowrap { + white-space: nowrap; + } .text-blue-900 { color: var(--color-blue-900); } + .text-emerald-400 { + color: var(--color-emerald-400); + } .text-gray-400 { color: var(--color-gray-400); } @@ -668,15 +1077,33 @@ .text-gray-900 { color: var(--color-gray-900); } + .text-green-400 { + color: var(--color-green-400); + } .text-green-500 { color: var(--color-green-500); } .text-green-600 { color: var(--color-green-600); } + .text-indigo-300 { + color: var(--color-indigo-300); + } + .text-indigo-400 { + color: var(--color-indigo-400); + } .text-indigo-600 { color: var(--color-indigo-600); } + .text-indigo-900\/50 { + color: color-mix(in srgb, oklch(35.9% 0.144 278.697) 50%, transparent); + @supports (color: color-mix(in lab, red, red)) { + color: color-mix(in oklab, var(--color-indigo-900) 50%, transparent); + } + } + .text-red-300 { + color: var(--color-red-300); + } .text-red-400 { color: var(--color-red-400); } @@ -692,14 +1119,43 @@ .text-red-800 { color: var(--color-red-800); } + .text-slate-50 { + color: var(--color-slate-50); + } + .text-slate-300 { + color: var(--color-slate-300); + } + .text-slate-400 { + color: var(--color-slate-400); + } + .text-slate-500 { + color: var(--color-slate-500); + } + .text-slate-900 { + color: var(--color-slate-900); + } + .text-transparent { + color: transparent; + } .text-white { color: var(--color-white); } + .uppercase { + text-transform: uppercase; + } + .underline { + text-decoration-line: underline; + } .placeholder-gray-500 { &::placeholder { color: var(--color-gray-500); } } + .placeholder-slate-500 { + &::placeholder { + color: var(--color-slate-500); + } + } .shadow-lg { --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); @@ -712,6 +1168,63 @@ --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); } + .shadow-xl { + --tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 8px 10px -6px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .ring-1 { + --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .shadow-indigo-500\/20 { + --tw-shadow-color: color-mix(in srgb, oklch(58.5% 0.233 277.117) 20%, transparent); + @supports (color: color-mix(in lab, red, red)) { + --tw-shadow-color: color-mix(in oklab, color-mix(in oklab, var(--color-indigo-500) 20%, transparent) var(--tw-shadow-alpha), transparent); + } + } + .shadow-indigo-600\/20 { + --tw-shadow-color: color-mix(in srgb, oklch(51.1% 0.262 276.966) 20%, transparent); + @supports (color: color-mix(in lab, red, red)) { + --tw-shadow-color: color-mix(in oklab, color-mix(in oklab, var(--color-indigo-600) 20%, transparent) var(--tw-shadow-alpha), transparent); + } + } + .shadow-purple-600\/20 { + --tw-shadow-color: color-mix(in srgb, oklch(55.8% 0.288 302.321) 20%, transparent); + @supports (color: color-mix(in lab, red, red)) { + --tw-shadow-color: color-mix(in oklab, color-mix(in oklab, var(--color-purple-600) 20%, transparent) var(--tw-shadow-alpha), transparent); + } + } + .ring-slate-700 { + --tw-ring-color: var(--color-slate-700); + } + .outline { + outline-style: var(--tw-outline-style); + outline-width: 1px; + } + .blur-3xl { + --tw-blur: blur(var(--blur-3xl)); + filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,); + } + .backdrop-blur-md { + --tw-backdrop-blur: blur(var(--blur-md)); + -webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,); + backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,); + } + .backdrop-blur-sm { + --tw-backdrop-blur: blur(var(--blur-sm)); + -webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,); + backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,); + } + .transition { + transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, visibility, content-visibility, overlay, pointer-events; + transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)); + transition-duration: var(--tw-duration, var(--default-transition-duration)); + } + .transition-all { + transition-property: all; + transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)); + transition-duration: var(--tw-duration, var(--default-transition-duration)); + } .transition-colors { transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to; transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)); @@ -722,6 +1235,53 @@ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)); transition-duration: var(--tw-duration, var(--default-transition-duration)); } + .outline-none { + --tw-outline-style: none; + outline-style: none; + } + .ring-inset { + --tw-ring-inset: inset; + } + .group-hover\:text-emerald-400 { + &:is(:where(.group):hover *) { + @media (hover: hover) { + color: var(--color-emerald-400); + } + } + } + .group-hover\:text-indigo-400 { + &:is(:where(.group):hover *) { + @media (hover: hover) { + color: var(--color-indigo-400); + } + } + } + .group-hover\:shadow-indigo-500\/40 { + &:is(:where(.group):hover *) { + @media (hover: hover) { + --tw-shadow-color: color-mix(in srgb, oklch(58.5% 0.233 277.117) 40%, transparent); + @supports (color: color-mix(in lab, red, red)) { + --tw-shadow-color: color-mix(in oklab, color-mix(in oklab, var(--color-indigo-500) 40%, transparent) var(--tw-shadow-alpha), transparent); + } + } + } + } + .hover\:-translate-y-0\.5 { + &:hover { + @media (hover: hover) { + --tw-translate-y: calc(var(--spacing) * -0.5); + translate: var(--tw-translate-x) var(--tw-translate-y); + } + } + } + .hover\:-translate-y-1 { + &:hover { + @media (hover: hover) { + --tw-translate-y: calc(var(--spacing) * -1); + translate: var(--tw-translate-x) var(--tw-translate-y); + } + } + } .hover\:bg-blue-700 { &:hover { @media (hover: hover) { @@ -729,6 +1289,13 @@ } } } + .hover\:bg-emerald-500 { + &:hover { + @media (hover: hover) { + background-color: var(--color-emerald-500); + } + } + } .hover\:bg-gray-50 { &:hover { @media (hover: hover) { @@ -743,6 +1310,16 @@ } } } + .hover\:bg-green-500\/30 { + &:hover { + @media (hover: hover) { + background-color: color-mix(in srgb, oklch(72.3% 0.219 149.579) 30%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-green-500) 30%, transparent); + } + } + } + } .hover\:bg-green-700 { &:hover { @media (hover: hover) { @@ -757,6 +1334,13 @@ } } } + .hover\:bg-indigo-500 { + &:hover { + @media (hover: hover) { + background-color: var(--color-indigo-500); + } + } + } .hover\:bg-indigo-700 { &:hover { @media (hover: hover) { @@ -771,6 +1355,16 @@ } } } + .hover\:bg-red-500\/30 { + &:hover { + @media (hover: hover) { + background-color: color-mix(in srgb, oklch(63.7% 0.237 25.331) 30%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-red-500) 30%, transparent); + } + } + } + } .hover\:bg-red-700 { &:hover { @media (hover: hover) { @@ -778,6 +1372,82 @@ } } } + .hover\:bg-slate-200 { + &:hover { + @media (hover: hover) { + background-color: var(--color-slate-200); + } + } + } + .hover\:bg-slate-700\/50 { + &:hover { + @media (hover: hover) { + background-color: color-mix(in srgb, oklch(37.2% 0.044 257.287) 50%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-slate-700) 50%, transparent); + } + } + } + } + .hover\:bg-slate-800 { + &:hover { + @media (hover: hover) { + background-color: var(--color-slate-800); + } + } + } + .hover\:bg-slate-800\/80 { + &:hover { + @media (hover: hover) { + background-color: color-mix(in srgb, oklch(27.9% 0.041 260.031) 80%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-slate-800) 80%, transparent); + } + } + } + } + .hover\:bg-white\/5 { + &:hover { + @media (hover: hover) { + background-color: color-mix(in srgb, #fff 5%, transparent); + @supports (color: color-mix(in lab, red, red)) { + background-color: color-mix(in oklab, var(--color-white) 5%, transparent); + } + } + } + } + .hover\:from-indigo-500 { + &:hover { + @media (hover: hover) { + --tw-gradient-from: var(--color-indigo-500); + --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); + } + } + } + .hover\:from-purple-500 { + &:hover { + @media (hover: hover) { + --tw-gradient-from: var(--color-purple-500); + --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); + } + } + } + .hover\:to-pink-500 { + &:hover { + @media (hover: hover) { + --tw-gradient-to: var(--color-pink-500); + --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); + } + } + } + .hover\:to-purple-500 { + &:hover { + @media (hover: hover) { + --tw-gradient-to: var(--color-purple-500); + --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position)); + } + } + } .hover\:text-gray-700 { &:hover { @media (hover: hover) { @@ -792,6 +1462,20 @@ } } } + .hover\:text-indigo-300 { + &:hover { + @media (hover: hover) { + color: var(--color-indigo-300); + } + } + } + .hover\:text-indigo-400 { + &:hover { + @media (hover: hover) { + color: var(--color-indigo-400); + } + } + } .hover\:text-indigo-500 { &:hover { @media (hover: hover) { @@ -799,6 +1483,34 @@ } } } + .hover\:text-red-300 { + &:hover { + @media (hover: hover) { + color: var(--color-red-300); + } + } + } + .hover\:text-slate-700 { + &:hover { + @media (hover: hover) { + color: var(--color-slate-700); + } + } + } + .hover\:text-white { + &:hover { + @media (hover: hover) { + color: var(--color-white); + } + } + } + .hover\:underline { + &:hover { + @media (hover: hover) { + text-decoration-line: underline; + } + } + } .hover\:shadow-lg { &:hover { @media (hover: hover) { @@ -807,6 +1519,41 @@ } } } + .hover\:shadow-xl { + &:hover { + @media (hover: hover) { + --tw-shadow: 0 20px 25px -5px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 8px 10px -6px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + } + } + .hover\:shadow-indigo-600\/40 { + &:hover { + @media (hover: hover) { + --tw-shadow-color: color-mix(in srgb, oklch(51.1% 0.262 276.966) 40%, transparent); + @supports (color: color-mix(in lab, red, red)) { + --tw-shadow-color: color-mix(in oklab, color-mix(in oklab, var(--color-indigo-600) 40%, transparent) var(--tw-shadow-alpha), transparent); + } + } + } + } + .hover\:shadow-purple-600\/40 { + &:hover { + @media (hover: hover) { + --tw-shadow-color: color-mix(in srgb, oklch(55.8% 0.288 302.321) 40%, transparent); + @supports (color: color-mix(in lab, red, red)) { + --tw-shadow-color: color-mix(in oklab, color-mix(in oklab, var(--color-purple-600) 40%, transparent) var(--tw-shadow-alpha), transparent); + } + } + } + } + .hover\:ring-slate-600 { + &:hover { + @media (hover: hover) { + --tw-ring-color: var(--color-slate-600); + } + } + } .focus\:z-10 { &:focus { z-index: 10; @@ -817,6 +1564,17 @@ border-color: var(--color-indigo-500); } } + .focus\:border-transparent { + &:focus { + border-color: transparent; + } + } + .focus\:ring-1 { + &:focus { + --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + } .focus\:ring-2 { &:focus { --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor); @@ -845,6 +1603,47 @@ outline-style: none; } } + .focus-visible\:outline-2 { + &:focus-visible { + outline-style: var(--tw-outline-style); + outline-width: 2px; + } + } + .focus-visible\:outline-offset-2 { + &:focus-visible { + outline-offset: 2px; + } + } + .focus-visible\:outline-slate-900 { + &:focus-visible { + outline-color: var(--color-slate-900); + } + } + .focus-visible\:outline-white { + &:focus-visible { + outline-color: var(--color-white); + } + } + .active\:bg-slate-300 { + &:active { + background-color: var(--color-slate-300); + } + } + .active\:bg-slate-800 { + &:active { + background-color: var(--color-slate-800); + } + } + .active\:text-slate-300 { + &:active { + color: var(--color-slate-300); + } + } + .active\:text-slate-900 { + &:active { + color: var(--color-slate-900); + } + } .sm\:ml-6 { @media (width >= 40rem) { margin-left: calc(var(--spacing) * 6); @@ -874,12 +1673,23 @@ padding-inline: calc(var(--spacing) * 6); } } + .sm\:text-7xl { + @media (width >= 40rem) { + font-size: var(--text-7xl); + line-height: var(--tw-leading, var(--text-7xl--line-height)); + } + } .sm\:text-sm { @media (width >= 40rem) { font-size: var(--text-sm); line-height: var(--tw-leading, var(--text-sm--line-height)); } } + .md\:mt-0 { + @media (width >= 48rem) { + margin-top: calc(var(--spacing) * 0); + } + } .md\:grid-cols-2 { @media (width >= 48rem) { grid-template-columns: repeat(2, minmax(0, 1fr)); @@ -890,6 +1700,21 @@ grid-template-columns: repeat(3, minmax(0, 1fr)); } } + .md\:flex-row { + @media (width >= 48rem) { + flex-direction: row; + } + } + .md\:items-center { + @media (width >= 48rem) { + align-items: center; + } + } + .md\:justify-between { + @media (width >= 48rem) { + justify-content: space-between; + } + } .md\:text-6xl { @media (width >= 48rem) { font-size: var(--text-6xl); @@ -906,6 +1731,26 @@ padding-inline: calc(var(--spacing) * 8); } } + .lg\:pt-32 { + @media (width >= 64rem) { + padding-top: calc(var(--spacing) * 32); + } + } +} +@property --tw-translate-x { + syntax: "*"; + inherits: false; + initial-value: 0; +} +@property --tw-translate-y { + syntax: "*"; + inherits: false; + initial-value: 0; +} +@property --tw-translate-z { + syntax: "*"; + inherits: false; + initial-value: 0; } @property --tw-rotate-x { syntax: "*"; @@ -988,6 +1833,10 @@ syntax: "*"; inherits: false; } +@property --tw-tracking { + syntax: "*"; + inherits: false; +} @property --tw-shadow { syntax: "*"; inherits: false; @@ -1053,6 +1902,100 @@ inherits: false; initial-value: 0 0 #0000; } +@property --tw-outline-style { + syntax: "*"; + inherits: false; + initial-value: solid; +} +@property --tw-blur { + syntax: "*"; + inherits: false; +} +@property --tw-brightness { + syntax: "*"; + inherits: false; +} +@property --tw-contrast { + syntax: "*"; + inherits: false; +} +@property --tw-grayscale { + syntax: "*"; + inherits: false; +} +@property --tw-hue-rotate { + syntax: "*"; + inherits: false; +} +@property --tw-invert { + syntax: "*"; + inherits: false; +} +@property --tw-opacity { + syntax: "*"; + inherits: false; +} +@property --tw-saturate { + syntax: "*"; + inherits: false; +} +@property --tw-sepia { + syntax: "*"; + inherits: false; +} +@property --tw-drop-shadow { + syntax: "*"; + inherits: false; +} +@property --tw-drop-shadow-color { + syntax: "*"; + inherits: false; +} +@property --tw-drop-shadow-alpha { + syntax: ""; + inherits: false; + initial-value: 100%; +} +@property --tw-drop-shadow-size { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-blur { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-brightness { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-contrast { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-grayscale { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-hue-rotate { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-invert { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-opacity { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-saturate { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-sepia { + syntax: "*"; + inherits: false; +} @keyframes spin { to { transform: rotate(360deg); @@ -1061,6 +2004,9 @@ @layer properties { @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) { *, ::before, ::after, ::backdrop { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-translate-z: 0; --tw-rotate-x: initial; --tw-rotate-y: initial; --tw-rotate-z: initial; @@ -1079,6 +2025,7 @@ --tw-gradient-via-position: 50%; --tw-gradient-to-position: 100%; --tw-font-weight: initial; + --tw-tracking: initial; --tw-shadow: 0 0 #0000; --tw-shadow-color: initial; --tw-shadow-alpha: 100%; @@ -1093,6 +2040,29 @@ --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-offset-shadow: 0 0 #0000; + --tw-outline-style: solid; + --tw-blur: initial; + --tw-brightness: initial; + --tw-contrast: initial; + --tw-grayscale: initial; + --tw-hue-rotate: initial; + --tw-invert: initial; + --tw-opacity: initial; + --tw-saturate: initial; + --tw-sepia: initial; + --tw-drop-shadow: initial; + --tw-drop-shadow-color: initial; + --tw-drop-shadow-alpha: 100%; + --tw-drop-shadow-size: initial; + --tw-backdrop-blur: initial; + --tw-backdrop-brightness: initial; + --tw-backdrop-contrast: initial; + --tw-backdrop-grayscale: initial; + --tw-backdrop-hue-rotate: initial; + --tw-backdrop-invert: initial; + --tw-backdrop-opacity: initial; + --tw-backdrop-saturate: initial; + --tw-backdrop-sepia: initial; } } } diff --git a/src/auth.rs b/src/auth.rs index 7664126..937e174 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -24,7 +24,7 @@ pub struct UserSafe { } #[server] -pub async fn register(username: String, password: String) -> Result { +pub async fn register(username: String, password: String) -> Result { let db = db::establish_connection() .await .map_err(|e| ServerFnError::new(e.to_string()))?; @@ -37,21 +37,31 @@ pub async fn register(username: String, password: String) -> Result Result { +pub async fn login(username: String, password: String) -> Result { let db = db::establish_connection() .await .map_err(|e| ServerFnError::new(e.to_string()))?; @@ -76,7 +86,10 @@ pub async fn login(username: String, password: String) -> Result Element { let navigator = use_navigator(); rsx! { - nav { - class: "bg-white shadow-lg border-b border-gray-200", - div { - class: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", + div { + class: "h-screen w-screen flex flex-col overflow-hidden bg-slate-900 text-slate-50", + nav { + class: "bg-slate-900/80 backdrop-blur-md border-b border-white/10 shadow-lg flex-shrink-0 z-50", div { - class: "flex justify-between h-16", + class: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", div { - class: "flex items-center", - Link { - to: Route::Home {}, - class: "flex-shrink-0 flex items-center", - div { - class: "w-8 h-8 bg-indigo-600 rounded-lg flex items-center justify-center mr-3", - span { class: "text-white font-bold text-lg", "W" } - } - span { class: "text-xl font-bold text-gray-900", "Wichtl" } - } + class: "flex justify-between h-16", div { - class: "hidden sm:ml-6 sm:flex sm:space-x-8", + class: "flex items-center", Link { to: Route::Home {}, - class: "text-gray-500 hover:text-gray-900 px-3 py-2 rounded-md text-sm font-medium transition-colors", - "Startseite" + class: "flex-shrink-0 flex items-center group", + div { + class: "w-8 h-8 bg-gradient-to-br from-indigo-500 to-purple-600 rounded-lg flex items-center justify-center mr-3 shadow-lg shadow-indigo-500/20 group-hover:shadow-indigo-500/40 transition-all", + span { class: "text-white font-bold text-lg", "W" } + } + span { class: "text-xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-white to-slate-400", "Wichtl" } } - if let Some(_user) = user_state() { + div { + class: "hidden sm:ml-6 sm:flex sm:space-x-8", Link { - to: Route::Dashboard {}, - class: "text-gray-500 hover:text-gray-900 px-3 py-2 rounded-md text-sm font-medium transition-colors", - "Dashboard" + to: Route::Home {}, + class: "text-slate-300 hover:text-white hover:bg-white/5 px-3 py-2 rounded-md text-sm font-medium transition-all", + "Startseite" + } + if let Some(_user) = user_state() { + Link { + to: Route::Dashboard {}, + class: "text-slate-300 hover:text-white hover:bg-white/5 px-3 py-2 rounded-md text-sm font-medium transition-all", + "Dashboard" + } } } } - } - div { - class: "flex items-center", - if let Some(user) = user_state() { - div { - class: "flex items-center space-x-4", - span { class: "text-gray-700 text-sm", "Willkommen, {user.username}!" } - button { - class: "text-gray-500 hover:text-gray-700 px-3 py-2 rounded-md text-sm font-medium transition-colors", - onclick: move |_| async move { - if auth::logout().await.is_ok() { - user_state.set(None); - navigator.push(Route::Home {}); - } - }, - "Abmelden" + div { + class: "flex items-center", + if let Some(user) = user_state() { + div { + class: "flex items-center space-x-4", + span { class: "text-slate-400 text-sm", "Willkommen, {user.username}!" } + button { + class: "text-slate-300 hover:text-white hover:bg-white/5 px-3 py-2 rounded-md text-sm font-medium transition-all", + onclick: move |_| async move { + if auth::logout().await.is_ok() { + user_state.set(None); + navigator.push(Route::Home {}); + } + }, + "Abmelden" + } + } + } else { + Link { + to: Route::Auth {}, + class: "bg-indigo-600 text-white px-4 py-2 rounded-md text-sm font-medium hover:bg-indigo-500 shadow-lg shadow-indigo-500/20 transition-all", + "Anmelden" } - } - } else { - Link { - to: Route::Auth {}, - class: "bg-indigo-600 text-white px-4 py-2 rounded-md text-sm font-medium hover:bg-indigo-700 transition-colors", - "Anmelden" } } } } } - } - Outlet:: {} + div { + class: "flex-1 overflow-y-auto scrollbar-thin scrollbar-thumb-slate-700 scrollbar-track-transparent", + Outlet:: {} + } + } } } diff --git a/src/views/auth.rs b/src/views/auth.rs index 49b8bd6..99267e8 100644 --- a/src/views/auth.rs +++ b/src/views/auth.rs @@ -4,153 +4,100 @@ use dioxus::prelude::*; #[component] pub fn Auth() -> Element { - let mut active_tab = use_signal(|| "login".to_string()); + let mut is_login = use_signal(|| true); let mut username = use_signal(|| String::new()); let mut password = use_signal(|| String::new()); let mut error = use_signal(|| String::new()); - let mut success = use_signal(|| String::new()); + let mut user_state = use_context::>>(); let navigator = use_navigator(); rsx! { div { - class: "min-h-screen bg-gradient-to-br from-indigo-50 via-white to-cyan-50 flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8", + class: "min-h-full py-12 px-4 sm:px-6 lg:px-8 flex items-center justify-center", div { class: "max-w-md w-full space-y-8", div { class: "text-center", - div { - class: "w-16 h-16 bg-indigo-600 rounded-lg flex items-center justify-center mx-auto mb-4", - span { class: "text-white font-bold text-2xl", "W" } + h2 { + class: "text-4xl font-extrabold text-transparent bg-clip-text bg-gradient-to-r from-indigo-400 to-purple-400", + if is_login() { "Willkommen zurück" } else { "Konto erstellen" } } - h2 { class: "text-3xl font-bold text-gray-900", if active_tab() == "login" { "Melde dich in deinem Konto an" } else { "Erstelle dein Konto" } } - p { class: "mt-2 text-sm text-gray-600", if active_tab() == "login" { "Noch kein Konto? " } else { "Hast du schon ein Konto? " } - button { - class: "font-medium text-indigo-600 hover:text-indigo-500", - onclick: move |_| active_tab.set(if active_tab() == "login" { "register".to_string() } else { "login".to_string() }), - if active_tab() == "login" { "Registrieren" } else { "Anmelden" } - } + p { class: "mt-2 text-sm text-slate-400", + if is_login() { "Melde dich an, um deine Wichtel-Runden zu verwalten" } else { "Registriere dich, um loszulegen" } } } div { - class: "bg-white rounded-lg shadow-lg p-8", + class: "bg-slate-800/50 backdrop-blur-md border border-white/10 rounded-2xl p-8 shadow-xl", + form { + class: "space-y-6", + onsubmit: move |e| { + e.prevent_default(); + spawn(async move { + let res = if is_login() { + auth::login(username(), password()).await + } else { + auth::register(username(), password()).await + }; - // Tab buttons (hidden, using the link above instead) - - // Login Form - if active_tab() == "login" { - div { - class: "space-y-6", - div { - label { class: "block text-sm font-medium text-gray-700", "for": "username", "Benutzername" } - input { - id: "username", - class: "appearance-none rounded-md relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm", - placeholder: "Benutzername eingeben", - value: "{username}", - oninput: move |e| username.set(e.value()) - } - } - div { - label { class: "block text-sm font-medium text-gray-700", "for": "password", "Passwort" } - input { - id: "password", - class: "appearance-none rounded-md relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm", - type: "password", - placeholder: "Passwort eingeben", - value: "{password}", - oninput: move |e| password.set(e.value()) - } - } - button { - class: "group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 transition-colors", - onclick: move |_| { - let mut user_state = use_context::>>(); - async move { - error.set("".to_string()); - success.set("".to_string()); - match auth::login(username(), password()).await { - Ok(_msg) => { - success.set("Login successful".to_string()); - if let Ok(Some(user)) = auth::get_current_user().await { - user_state.set(Some(user)); - navigator.push(Route::Home {}); - } - }, - Err(e) => error.set(e.to_string()), - } + match res { + Ok(user) => { + user_state.set(Some(user)); + navigator.push(Route::Dashboard {}); } - }, - "Anmelden" + Err(e) => error.set(e.to_string()), + } + }); + }, + div { + label { class: "block text-xs font-medium text-indigo-300 uppercase tracking-wider mb-2", "for": "username", "Benutzername" } + input { + id: "username", + class: "appearance-none block w-full px-4 py-3 bg-slate-900/50 border border-slate-700 rounded-xl text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent transition-all sm:text-sm", + placeholder: "Dein Name", + value: "{username}", + oninput: move |e| username.set(e.value()), + required: true + } + } + div { + label { class: "block text-xs font-medium text-indigo-300 uppercase tracking-wider mb-2", "for": "password", "Passwort" } + input { + id: "password", + class: "appearance-none block w-full px-4 py-3 bg-slate-900/50 border border-slate-700 rounded-xl text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent transition-all sm:text-sm", + type: "password", + placeholder: "••••••••", + value: "{password}", + oninput: move |e| password.set(e.value()), + required: true + } + } + div { + button { + type: "submit", + class: "group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-bold rounded-xl text-white bg-gradient-to-r from-indigo-600 to-purple-600 hover:from-indigo-500 hover:to-purple-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 shadow-lg shadow-indigo-600/20 hover:shadow-indigo-600/40 transform hover:-translate-y-0.5 transition-all", + if is_login() { "Anmelden" } else { "Registrieren" } + } + } + if !error().is_empty() { + div { + class: "bg-red-900/20 border border-red-500/30 rounded-xl p-4", + p { class: "text-sm text-red-400", "{error}" } } } } - // Register Form - if active_tab() == "register" { - div { - class: "space-y-6", - div { - label { class: "block text-sm font-medium text-gray-700", "for": "reg-username", "Benutzername" } - input { - id: "reg-username", - class: "appearance-none rounded-md relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm", - placeholder: "Benutzername wählen", - value: "{username}", - oninput: move |e| username.set(e.value()) - } - } - div { - label { class: "block text-sm font-medium text-gray-700", "for": "reg-password", "Passwort" } - input { - id: "reg-password", - class: "appearance-none rounded-md relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm", - type: "password", - placeholder: "Passwort wählen", - value: "{password}", - oninput: move |e| password.set(e.value()) - } - } - button { - class: "group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 transition-colors", - onclick: move |_| { - let mut user_state = use_context::>>(); - async move { - error.set("".to_string()); - success.set("".to_string()); - match auth::register(username(), password()).await { - Ok(_msg) => { - // Auto-login after successful registration - match auth::login(username(), password()).await { - Ok(_login_msg) => { - if let Ok(Some(user)) = auth::get_current_user().await { - user_state.set(Some(user)); - navigator.push(Route::Home {}); - } else { - success.set("Registration successful. Please log in.".to_string()); - } - }, - Err(login_err) => { - error.set(format!("Registration successful but auto-login failed: {}", login_err)); - } - } - }, - Err(e) => error.set(e.to_string()), - } - } - }, - "Konto erstellen" - } + div { + class: "mt-6 text-center", + button { + class: "text-sm text-indigo-400 hover:text-indigo-300 transition-colors", + onclick: move |_| { + is_login.set(!is_login()); + error.set("".to_string()); + }, + if is_login() { "Noch kein Konto? Jetzt registrieren" } else { "Bereits ein Konto? Jetzt anmelden" } } } - - // Messages - if !error().is_empty() { - p { class: "text-red-500 mt-4 text-center text-sm", "{error}" } - } - if !success().is_empty() { - p { class: "text-green-500 mt-4 text-center text-sm", "{success}" } - } } } } diff --git a/src/views/create_event.rs b/src/views/create_event.rs index a7405a6..cd5f161 100644 --- a/src/views/create_event.rs +++ b/src/views/create_event.rs @@ -12,16 +12,19 @@ pub fn CreateEvent() -> Element { rsx! { div { - class: "min-h-screen bg-gradient-to-br from-indigo-50 via-white to-cyan-50 py-12 px-4 sm:px-6 lg:px-8", + class: "min-h-full py-12 px-4 sm:px-6 lg:px-8 flex items-center justify-center", div { - class: "max-w-md mx-auto", + class: "max-w-md w-full space-y-8", div { - class: "text-center mb-8", - h2 { class: "text-3xl font-bold text-gray-900", "Neues Event erstellen" } - p { class: "mt-2 text-sm text-gray-600", "Richte deine Wichtel-Runde ein" } + class: "text-center", + h2 { + class: "text-4xl font-extrabold text-transparent bg-clip-text bg-gradient-to-r from-indigo-400 to-purple-400", + "Neues Event" + } + p { class: "mt-2 text-sm text-slate-400", "Erstelle eine neue Wichtel-Runde" } } div { - class: "bg-white rounded-lg shadow-lg p-8", + class: "bg-slate-800/50 backdrop-blur-md border border-white/10 rounded-2xl p-8 shadow-xl", form { class: "space-y-6", onsubmit: move |e| { @@ -34,10 +37,10 @@ pub fn CreateEvent() -> Element { }); }, div { - label { class: "block text-sm font-medium text-gray-700", "for": "event-name", "Event-Name" } + label { class: "block text-xs font-medium text-indigo-300 uppercase tracking-wider mb-2", "for": "event-name", "Event-Name" } input { id: "event-name", - class: "appearance-none rounded-md relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm", + class: "appearance-none block w-full px-4 py-3 bg-slate-900/50 border border-slate-700 rounded-xl text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent transition-all sm:text-sm", placeholder: "z.B. Familienweihnachten 2024", value: "{name}", oninput: move |e| name.set(e.value()), @@ -45,10 +48,10 @@ pub fn CreateEvent() -> Element { } } div { - label { class: "block text-sm font-medium text-gray-700", "for": "event-date", "Event-Datum" } + label { class: "block text-xs font-medium text-indigo-300 uppercase tracking-wider mb-2", "for": "event-date", "Event-Datum" } input { id: "event-date", - class: "appearance-none rounded-md relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm", + class: "appearance-none block w-full px-4 py-3 bg-slate-900/50 border border-slate-700 rounded-xl text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent transition-all sm:text-sm", type: "date", value: "{date}", oninput: move |e| date.set(e.value()), @@ -56,10 +59,10 @@ pub fn CreateEvent() -> Element { } } div { - label { class: "block text-sm font-medium text-gray-700", "for": "event-budget", "Budget" } + label { class: "block text-xs font-medium text-indigo-300 uppercase tracking-wider mb-2", "for": "event-budget", "Budget" } input { id: "event-budget", - class: "appearance-none rounded-md relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm", + class: "appearance-none block w-full px-4 py-3 bg-slate-900/50 border border-slate-700 rounded-xl text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent transition-all sm:text-sm", placeholder: "z.B. 20 EUR", value: "{budget}", oninput: move |e| budget.set(e.value()), @@ -69,14 +72,14 @@ pub fn CreateEvent() -> Element { div { button { type: "submit", - class: "group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 transition-colors", + class: "group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-bold rounded-xl text-white bg-gradient-to-r from-indigo-600 to-purple-600 hover:from-indigo-500 hover:to-purple-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 shadow-lg shadow-indigo-600/20 hover:shadow-indigo-600/40 transform hover:-translate-y-0.5 transition-all", "Event erstellen" } } if !error().is_empty() { div { - class: "bg-red-50 border border-red-200 rounded-md p-4", - p { class: "text-sm text-red-700", "{error}" } + class: "bg-red-900/20 border border-red-500/30 rounded-xl p-4", + p { class: "text-sm text-red-400", "{error}" } } } } diff --git a/src/views/dashboard.rs b/src/views/dashboard.rs index 4b80d03..4379cee 100644 --- a/src/views/dashboard.rs +++ b/src/views/dashboard.rs @@ -10,71 +10,75 @@ pub fn Dashboard() -> Element { rsx! { div { - class: "min-h-screen bg-gradient-to-br from-indigo-50 via-white to-cyan-50 py-8", + class: "min-h-full py-12 px-4 sm:px-6 lg:px-8", div { - class: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", + class: "max-w-7xl mx-auto", div { - class: "mb-8", - h1 { class: "text-3xl font-bold text-gray-900", "Meine Events" } - p { class: "mt-1 text-sm text-gray-600", "Verwalte deine Wichtel-Runden" } - } + class: "flex flex-col md:flex-row md:items-center md:justify-between mb-12", + div { + h1 { + class: "text-4xl font-extrabold text-transparent bg-clip-text bg-gradient-to-r from-indigo-400 to-purple-400 mb-2", + "Meine Events" + } + p { class: "text-slate-400", "Verwalte deine Wichtel-Runden" } + } - div { - class: "mb-8", Link { to: Route::CreateEvent {}, - class: "inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 transition-colors", + class: "mt-4 md:mt-0 inline-flex items-center px-6 py-3 border border-transparent text-sm font-bold rounded-xl text-white bg-gradient-to-r from-indigo-600 to-purple-600 hover:from-indigo-500 hover:to-purple-500 shadow-lg shadow-indigo-600/20 hover:shadow-indigo-600/40 transform hover:-translate-y-0.5 transition-all", svg { class: "w-5 h-5 mr-2", fill: "none", stroke: "currentColor", view_box: "0 0 24 24", - path { - stroke_linecap: "round", - stroke_linejoin: "round", - stroke_width: "2", - d: "M12 6v6m0 0v6m0-6h6m-6 0H6" - } + path { stroke_linecap: "round", stroke_linejoin: "round", stroke_width: "2", d: "M12 6v6m0 0v6m0-6h6m-6 0H6" } } - - "Neues Event erstellen" + "Neues Event" } } match (&*created_events.read_unchecked(), &*participated_events.read_unchecked()) { (Some(Ok(created_list)), Some(Ok(participated_list))) => rsx! { div { - class: "space-y-8", + class: "space-y-12", // Created Events Section if !created_list.is_empty() { div { div { - class: "mb-4", - h2 { class: "text-xl font-semibold text-gray-900", "Erstellte Events" } - p { class: "text-sm text-gray-600", "Wichtel-Events, die du organisiert hast" } + class: "mb-6 flex items-center gap-3", + div { class: "p-2 bg-indigo-500/20 rounded-lg", svg { class: "w-5 h-5 text-indigo-400", fill: "none", stroke: "currentColor", view_box: "0 0 24 24", path { stroke_linecap: "round", stroke_linejoin: "round", stroke_width: "2", d: "M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" } } } + h2 { class: "text-2xl font-bold text-white", "Erstellte Events" } } div { class: "grid gap-6 md:grid-cols-2 lg:grid-cols-3", for event in created_list { div { key: "{event.id}", - class: "bg-white rounded-lg shadow-md hover:shadow-lg transition-shadow border-l-4 border-indigo-500", + class: "group bg-slate-800/50 backdrop-blur-sm border border-white/5 rounded-2xl p-6 hover:bg-slate-800/80 transition-all hover:-translate-y-1 shadow-lg", div { - class: "p-6", - h3 { class: "text-lg font-semibold text-gray-900 mb-2", "{event.name}" } - p { class: "text-gray-600 mb-1", "Datum: {event.date}" } - p { class: "text-gray-600 mb-4", "Budget: {event.budget}" } + h3 { class: "text-xl font-bold text-white mb-2 group-hover:text-indigo-400 transition-colors", "{event.name}" } div { - class: "flex gap-2", + class: "space-y-1 mb-6", + p { class: "text-slate-400 text-sm flex items-center gap-2", + svg { class: "w-4 h-4", fill: "none", stroke: "currentColor", view_box: "0 0 24 24", path { stroke_linecap: "round", stroke_linejoin: "round", stroke_width: "2", d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" } } + "{event.date}" + } + p { class: "text-slate-400 text-sm flex items-center gap-2", + svg { class: "w-4 h-4", fill: "none", stroke: "currentColor", view_box: "0 0 24 24", path { stroke_linecap: "round", stroke_linejoin: "round", stroke_width: "2", d: "M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z" } } + "{event.budget}" + } + } + div { + class: "flex gap-3", Link { to: Route::EventPage { id: event.id }, - class: "flex-1 text-center px-3 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 transition-colors", - "Event verwalten" + class: "flex-1 text-center px-4 py-2 bg-indigo-600 text-white text-sm font-medium rounded-lg hover:bg-indigo-500 transition-colors", + "Verwalten" } Link { to: Route::JoinEvent { token: event.invite_token.clone() }, - class: "px-3 py-2 border border-gray-300 text-gray-700 rounded-md hover:bg-gray-50 transition-colors", - "Einladung teilen" + class: "px-4 py-2 border border-slate-600 text-slate-300 text-sm font-medium rounded-lg hover:bg-white/5 hover:text-white transition-colors", + "Teilen" } } } @@ -88,31 +92,39 @@ pub fn Dashboard() -> Element { if !participated_list.is_empty() { div { div { - class: "mb-4", - h2 { class: "text-xl font-semibold text-gray-900", "Beigetretene Events" } - p { class: "text-sm text-gray-600", "Wichtel-Events, an denen du teilnimmst" } + class: "mb-6 flex items-center gap-3", + div { class: "p-2 bg-emerald-500/20 rounded-lg", svg { class: "w-5 h-5 text-emerald-400", fill: "none", stroke: "currentColor", view_box: "0 0 24 24", path { stroke_linecap: "round", stroke_linejoin: "round", stroke_width: "2", d: "M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" } } } + h2 { class: "text-2xl font-bold text-white", "Beigetretene Events" } } div { class: "grid gap-6 md:grid-cols-2 lg:grid-cols-3", for event in participated_list { div { key: "{event.id}", - class: "bg-white rounded-lg shadow-md hover:shadow-lg transition-shadow border-l-4 border-green-500", + class: "group bg-slate-800/50 backdrop-blur-sm border border-white/5 rounded-2xl p-6 hover:bg-slate-800/80 transition-all hover:-translate-y-1 shadow-lg", div { - class: "p-6", - h3 { class: "text-lg font-semibold text-gray-900 mb-2", "{event.name}" } - p { class: "text-gray-600 mb-1", "Datum: {event.date}" } - p { class: "text-gray-600 mb-4", "Budget: {event.budget}" } + h3 { class: "text-xl font-bold text-white mb-2 group-hover:text-emerald-400 transition-colors", "{event.name}" } div { - class: "flex gap-2", + class: "space-y-1 mb-6", + p { class: "text-slate-400 text-sm flex items-center gap-2", + svg { class: "w-4 h-4", fill: "none", stroke: "currentColor", view_box: "0 0 24 24", path { stroke_linecap: "round", stroke_linejoin: "round", stroke_width: "2", d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" } } + "{event.date}" + } + p { class: "text-slate-400 text-sm flex items-center gap-2", + svg { class: "w-4 h-4", fill: "none", stroke: "currentColor", view_box: "0 0 24 24", path { stroke_linecap: "round", stroke_linejoin: "round", stroke_width: "2", d: "M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z" } } + "{event.budget}" + } + } + div { + class: "flex gap-3", Link { to: Route::EventPage { id: event.id }, - class: "flex-1 text-center px-3 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors", - "Event ansehen" + class: "flex-1 text-center px-4 py-2 bg-emerald-600 text-white text-sm font-medium rounded-lg hover:bg-emerald-500 transition-colors", + "Ansehen" } Link { to: Route::JoinEvent { token: event.invite_token.clone() }, - class: "px-3 py-2 border border-gray-300 text-gray-700 rounded-md hover:bg-gray-50 transition-colors", + class: "px-4 py-2 border border-slate-600 text-slate-300 text-sm font-medium rounded-lg hover:bg-white/5 hover:text-white transition-colors", "Teilen" } } @@ -126,24 +138,22 @@ pub fn Dashboard() -> Element { // Empty State (no events at all) if created_list.is_empty() && participated_list.is_empty() { div { - class: "text-center py-12", - svg { - class: "mx-auto h-12 w-12 text-gray-400", - fill: "none", - stroke: "currentColor", - view_box: "0 0 24 24", - path { - stroke_linecap: "round", - stroke_linejoin: "round", - stroke_width: "2", - d: "M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" + class: "text-center py-24", + div { + class: "inline-flex items-center justify-center w-24 h-24 rounded-full bg-slate-800/50 mb-6", + svg { + class: "h-12 w-12 text-slate-500", + fill: "none", + stroke: "currentColor", + view_box: "0 0 24 24", + path { stroke_linecap: "round", stroke_linejoin: "round", stroke_width: "2", d: "M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" } } } - h3 { class: "mt-2 text-sm font-medium text-gray-900 mb-2", "Noch keine Events" } - p { class: "mt-1 text-sm text-gray-500 mb-4", "Erstelle dein erstes Wichtel-Event, um loszulegen!" } + h3 { class: "text-xl font-medium text-white mb-2", "Noch keine Events" } + p { class: "text-slate-400 mb-8 max-w-sm mx-auto", "Erstelle dein erstes Wichtel-Event, um loszulegen!" } Link { to: Route::CreateEvent {}, - class: "inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500", + class: "inline-flex items-center px-6 py-3 border border-transparent shadow-lg shadow-indigo-600/20 text-base font-bold rounded-xl text-white bg-gradient-to-r from-indigo-600 to-purple-600 hover:from-indigo-500 hover:to-purple-500 transition-all", "Event erstellen" } } @@ -152,39 +162,15 @@ pub fn Dashboard() -> Element { }, (Some(Err(e)), _) | (_, Some(Err(e))) => rsx! { div { - class: "bg-red-50 border border-red-200 rounded-md p-4", - div { - class: "flex", - div { - class: "flex-shrink-0", - svg { - class: "h-5 w-5 text-red-400", - fill: "currentColor", - view_box: "0 0 20 20", - path { - fill_rule: "evenodd", - d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z", - clip_rule: "evenodd" - } - } - } - div { - class: "ml-3", - div { - class: "ml-3", - h3 { class: "text-sm font-medium text-red-800", "Fehler beim Laden der Events" } - p { class: "mt-2 text-sm text-red-700", "{e}" } - } - } - } + class: "bg-red-900/20 border border-red-500/30 rounded-xl p-6 text-center", + h3 { class: "text-lg font-medium text-red-400 mb-2", "Fehler beim Laden" } + p { class: "text-red-300", "{e}" } } }, _ => rsx! { div { - class: "flex justify-center items-center py-12", - div { - class: "animate-spin rounded-full h-12 w-12 border-b-2 border-indigo-600" - } + class: "flex justify-center items-center py-24", + div { class: "animate-spin rounded-full h-12 w-12 border-b-2 border-indigo-500" } } }, } diff --git a/src/views/event_page.rs b/src/views/event_page.rs index aa42c50..431253e 100644 --- a/src/views/event_page.rs +++ b/src/views/event_page.rs @@ -39,103 +39,136 @@ pub fn EventPage(id: i32) -> Element { rsx! { div { - class: "flex flex-col items-center min-h-screen py-2", - h1 { class: "text-2xl font-bold mb-4", "Event-Details" } + class: "min-h-full py-12 px-4 sm:px-6 lg:px-8", + div { + class: "max-w-3xl mx-auto", - if let Some(link) = invite_link() { + // Header div { - class: "mb-4 p-4 bg-gray-100 rounded", - p { class: "font-bold", "Einladungslink:" } - code { "{link}" } + class: "text-center mb-12", + h1 { + class: "text-4xl font-extrabold text-transparent bg-clip-text bg-gradient-to-r from-indigo-400 to-purple-400 mb-2", + "Event Details" + } + p { class: "text-slate-400", "Verwalte deine Wichtel-Runde" } } - } - // Administrative Controls (only for creator) - if is_creator() { - div { - class: "mb-6 p-4 bg-blue-50 rounded-lg border border-blue-200", - h3 { class: "text-lg font-semibold text-blue-900 mb-3", "Event-Verwaltung" } - - // Event Details Editing + if let Some(link) = invite_link() { div { - class: "space-y-3", + class: "mb-8 bg-slate-800/50 backdrop-blur-sm border border-white/10 rounded-2xl p-6 shadow-xl", div { - class: "flex items-center justify-between", + class: "flex flex-col space-y-2", + label { class: "text-xs font-semibold text-indigo-400 uppercase tracking-wider", "Einladungslink" } div { - p { class: "text-sm font-medium text-gray-700", "Budget:" } - if edit_budget() { - div { - class: "flex gap-2", + class: "flex items-center gap-2 bg-black/30 rounded-lg p-1 border border-white/5", + code { class: "flex-1 p-3 font-mono text-sm text-slate-300 break-all bg-transparent", "{link}" } + button { + class: "p-2 text-slate-400 hover:text-white transition-colors", + title: "Kopieren", + svg { class: "w-5 h-5", fill: "none", stroke: "currentColor", view_box: "0 0 24 24", path { stroke_linecap: "round", stroke_linejoin: "round", stroke_width: "2", d: "M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" } } + } + } + } + } + } + + // Administrative Controls (only for creator) + if is_creator() { + div { + class: "mb-8 bg-indigo-900/10 border border-indigo-500/20 rounded-2xl p-6 backdrop-blur-sm", + div { + class: "flex items-center gap-3 mb-6", + div { class: "p-2 bg-indigo-500/20 rounded-lg", svg { class: "w-5 h-5 text-indigo-400", fill: "none", stroke: "currentColor", view_box: "0 0 24 24", path { stroke_linecap: "round", stroke_linejoin: "round", stroke_width: "2", d: "M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" } } } + h3 { class: "text-lg font-semibold text-white", "Verwaltung" } + } + + div { + class: "space-y-4", + // Budget + div { + class: "group flex items-center justify-between p-3 rounded-xl hover:bg-white/5 transition-colors", + div { + p { class: "text-xs font-medium text-indigo-300 uppercase tracking-wider mb-1", "Budget" } + if edit_budget() { input { - class: "border rounded px-2 py-1 text-sm", + class: "bg-slate-900/50 border border-slate-600 rounded px-2 py-1 text-sm text-white focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 outline-none", value: "{new_budget}", - oninput: move |e| new_budget.set(e.value()) - } - button { - class: "px-2 py-1 text-xs bg-green-600 text-white rounded hover:bg-green-700", - onclick: move |_| async move { - if server_fns::update_event_budget(id, new_budget()).await.is_ok() { - edit_budget.set(false); - event_details.restart(); - } - }, - "Speichern" - } - button { - class: "px-2 py-1 text-xs bg-gray-500 text-white rounded hover:bg-gray-600", - onclick: move |_| edit_budget.set(false), - "Abbrechen" + oninput: move |e| new_budget.set(e.value()), + autofocus: true } + } else { + p { class: "text-white font-medium", "{new_budget}" } } - } else { - div { - class: "flex items-center gap-2", - p { class: "text-gray-900", "{new_budget}" } + } + div { + if edit_budget() { + div { + class: "flex gap-2", + button { + class: "p-1.5 bg-green-500/20 text-green-400 rounded hover:bg-green-500/30 transition-colors", + onclick: move |_| async move { + if server_fns::update_event_budget(id, new_budget()).await.is_ok() { + edit_budget.set(false); + event_details.restart(); + } + }, + svg { class: "w-4 h-4", fill: "none", stroke: "currentColor", view_box: "0 0 24 24", path { stroke_linecap: "round", stroke_linejoin: "round", stroke_width: "2", d: "M5 13l4 4L19 7" } } + } + button { + class: "p-1.5 bg-red-500/20 text-red-400 rounded hover:bg-red-500/30 transition-colors", + onclick: move |_| edit_budget.set(false), + svg { class: "w-4 h-4", fill: "none", stroke: "currentColor", view_box: "0 0 24 24", path { stroke_linecap: "round", stroke_linejoin: "round", stroke_width: "2", d: "M6 18L18 6M6 6l12 12" } } + } + } + } else { button { - class: "px-2 py-1 text-xs bg-blue-600 text-white rounded hover:bg-blue-700", + class: "text-slate-500 hover:text-indigo-400 transition-colors", onclick: move |_| edit_budget.set(true), "Bearbeiten" } } } } - } - div { - class: "flex items-center justify-between", + // Date div { - p { class: "text-sm font-medium text-gray-700", "Datum:" } - if edit_date() { - div { - class: "flex gap-2", + class: "group flex items-center justify-between p-3 rounded-xl hover:bg-white/5 transition-colors", + div { + p { class: "text-xs font-medium text-indigo-300 uppercase tracking-wider mb-1", "Datum" } + if edit_date() { input { - class: "border rounded px-2 py-1 text-sm", + class: "bg-slate-900/50 border border-slate-600 rounded px-2 py-1 text-sm text-white focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 outline-none", r#type: "date", value: "{new_date}", oninput: move |e| new_date.set(e.value()) } - button { - class: "px-2 py-1 text-xs bg-green-600 text-white rounded hover:bg-green-700", - onclick: move |_| async move { - if server_fns::update_event_date(id, new_date()).await.is_ok() { - edit_date.set(false); - event_details.restart(); - } - }, - "Speichern" - } - button { - class: "px-2 py-1 text-xs bg-gray-500 text-white rounded hover:bg-gray-600", - onclick: move |_| edit_date.set(false), - "Abbrechen" - } + } else { + p { class: "text-white font-medium", "{new_date}" } } - } else { - div { - class: "flex items-center gap-2", - p { class: "text-gray-900", "{new_date}" } + } + div { + if edit_date() { + div { + class: "flex gap-2", + button { + class: "p-1.5 bg-green-500/20 text-green-400 rounded hover:bg-green-500/30 transition-colors", + onclick: move |_| async move { + if server_fns::update_event_date(id, new_date()).await.is_ok() { + edit_date.set(false); + event_details.restart(); + } + }, + svg { class: "w-4 h-4", fill: "none", stroke: "currentColor", view_box: "0 0 24 24", path { stroke_linecap: "round", stroke_linejoin: "round", stroke_width: "2", d: "M5 13l4 4L19 7" } } + } + button { + class: "p-1.5 bg-red-500/20 text-red-400 rounded hover:bg-red-500/30 transition-colors", + onclick: move |_| edit_date.set(false), + svg { class: "w-4 h-4", fill: "none", stroke: "currentColor", view_box: "0 0 24 24", path { stroke_linecap: "round", stroke_linejoin: "round", stroke_width: "2", d: "M6 18L18 6M6 6l12 12" } } + } + } + } else { button { - class: "px-2 py-1 text-xs bg-blue-600 text-white rounded hover:bg-blue-700", + class: "text-slate-500 hover:text-indigo-400 transition-colors", onclick: move |_| edit_date.set(true), "Bearbeiten" } @@ -143,90 +176,105 @@ pub fn EventPage(id: i32) -> Element { } } } - } - // Danger Zone - div { - class: "mt-4 pt-4 border-t border-blue-200", - h4 { class: "text-sm font-medium text-red-700 mb-2", "Gefahrenzone" } - button { - class: "px-3 py-2 text-sm bg-red-600 text-white rounded hover:bg-red-700 transition-colors", - onclick: move |_| async move { - if let Ok(_) = server_fns::delete_event(id).await { - navigator.push(Route::Dashboard {}); - } - }, - "Event löschen" - } - } - } - } - - // Add Participant Form - div { - class: "flex gap-2 mb-4", - input { - class: "border p-2 rounded", - placeholder: "Name", - value: "{new_participant_name}", - oninput: move |e| new_participant_name.set(e.value()) - } - input { - class: "border p-2 rounded", - placeholder: "E-Mail (Optional)", - value: "{new_participant_email}", - oninput: move |e| new_participant_email.set(e.value()) - } - button { - class: "bg-blue-500 text-white p-2 rounded", - onclick: move |_| async move { - let email = if new_participant_email().is_empty() { None } else { Some(new_participant_email()) }; - if server_fns::add_participant(id, new_participant_name(), email).await.is_ok() { - participants.restart(); - new_participant_name.set("".to_string()); - new_participant_email.set("".to_string()); - } - }, - "Hinzufügen" - } - } - - // Participants List - h2 { class: "text-xl font-bold mb-2", "Teilnehmer" } - match participants().as_ref() { - Some(Ok(list)) => rsx! { - div { - class: "w-96 mb-4", - for p in list { - div { - key: "{p.id}", - class: "flex justify-between items-center border-b p-2", - div { - class: "flex-1", - p { class: "font-medium", "{p.name}" } - if let Some(email) = &p.email { - p { class: "text-sm text-gray-600", "{email}" } + // Danger Zone + div { + class: "mt-6 pt-6 border-t border-indigo-500/20", + button { + class: "text-sm text-red-400 hover:text-red-300 hover:underline transition-colors", + onclick: move |_| async move { + if let Ok(_) = server_fns::delete_event(id).await { + navigator.push(Route::Dashboard {}); } - } + }, + "Event löschen" } } } - }, - Some(Err(e)) => rsx! { p { class: "text-red-500", "Error: {e}" } }, - None => rsx! { "Loading..." } - } + } - // Draw Button - button { - class: "bg-purple-500 text-white p-2 rounded hover:bg-purple-600", - onclick: move |_| async move { - if let Err(e) = server_fns::draw_names(id).await { - println!("Error drawing names: {}", e); - } else { - println!("Names drawn!"); + // Participants Section + div { + class: "bg-slate-800/50 backdrop-blur-sm border border-white/10 rounded-2xl p-6 shadow-xl mb-8", + h2 { class: "text-xl font-bold text-white mb-6 flex items-center gap-2", + span { class: "w-1 h-6 bg-gradient-to-b from-indigo-500 to-purple-500 rounded-full block" } + "Teilnehmer" } - }, - "Namen auslosen" + + // Add Form + div { + class: "flex gap-3 mb-6", + input { + class: "flex-1 bg-slate-900/50 border border-slate-700 rounded-xl px-4 py-3 text-white placeholder-slate-500 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 outline-none transition-all", + placeholder: "Name", + value: "{new_participant_name}", + oninput: move |e| new_participant_name.set(e.value()) + } + input { + class: "flex-1 bg-slate-900/50 border border-slate-700 rounded-xl px-4 py-3 text-white placeholder-slate-500 focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 outline-none transition-all", + placeholder: "E-Mail (Optional)", + value: "{new_participant_email}", + oninput: move |e| new_participant_email.set(e.value()) + } + button { + class: "bg-indigo-600 hover:bg-indigo-500 text-white px-6 py-3 rounded-xl font-medium shadow-lg shadow-indigo-600/20 transition-all", + onclick: move |_| async move { + let email = if new_participant_email().is_empty() { None } else { Some(new_participant_email()) }; + if server_fns::add_participant(id, new_participant_name(), email).await.is_ok() { + participants.restart(); + new_participant_name.set("".to_string()); + new_participant_email.set("".to_string()); + } + }, + "Hinzufügen" + } + } + + // List + match participants().as_ref() { + Some(Ok(list)) => rsx! { + div { + class: "space-y-3", + for p in list { + div { + key: "{p.id}", + class: "group flex items-center justify-between p-4 bg-slate-700/30 border border-white/5 rounded-xl hover:bg-slate-700/50 transition-all", + div { + class: "flex items-center gap-4", + div { + class: "w-10 h-10 rounded-full bg-gradient-to-br from-slate-600 to-slate-700 flex items-center justify-center text-white font-bold border border-white/10", + "{p.name.chars().next().unwrap_or('?')}" + } + div { + p { class: "font-medium text-white", "{p.name}" } + if let Some(email) = &p.email { + p { class: "text-sm text-slate-400", "{email}" } + } + } + } + } + } + } + }, + Some(Err(e)) => rsx! { p { class: "text-red-400", "Error: {e}" } }, + None => rsx! { + div { class: "flex justify-center py-8", div { class: "animate-spin rounded-full h-8 w-8 border-b-2 border-indigo-500" } } + } + } + } + + // Draw Button + button { + class: "w-full py-4 bg-gradient-to-r from-purple-600 to-pink-600 hover:from-purple-500 hover:to-pink-500 text-white text-lg font-bold rounded-2xl shadow-lg shadow-purple-600/20 hover:shadow-purple-600/40 transform hover:-translate-y-0.5 transition-all", + onclick: move |_| async move { + if let Err(e) = server_fns::draw_names(id).await { + println!("Error drawing names: {}", e); + } else { + println!("Names drawn!"); + } + }, + "🎲 Namen auslosen" + } } } } diff --git a/src/views/home.rs b/src/views/home.rs index db5da67..e883c4e 100644 --- a/src/views/home.rs +++ b/src/views/home.rs @@ -5,126 +5,51 @@ use dioxus::prelude::*; #[component] pub fn Home() -> Element { let user_state = use_context::>>(); - let navigator = use_navigator(); rsx! { div { - class: "min-h-screen bg-gradient-to-br from-indigo-50 via-white to-cyan-50", - div { - class: "container mx-auto px-6 py-16", - div { - class: "max-w-4xl mx-auto text-center", - h1 { - class: "text-5xl md:text-6xl font-bold text-gray-900 mb-6", - "Willkommen bei ", - span { class: "text-indigo-600", "Wichtl" } - } - p { - class: "text-xl text-gray-600 mb-8 max-w-2xl mx-auto", - "Die moderne Art, Wichteln zu organisieren. Erstelle Events, lade Freunde ein und lose Namen einfach aus." - } + class: "relative overflow-hidden", + // Background decoration + div { class: "absolute top-0 left-1/2 -translate-x-1/2 w-[1000px] h-[600px] bg-indigo-600/20 rounded-full blur-3xl -z-10" } + div { class: "absolute bottom-0 right-0 w-[800px] h-[600px] bg-purple-600/10 rounded-full blur-3xl -z-10" } - if let Some(user) = user_state() { - div { - class: "space-y-4", - p { class: "text-lg text-gray-700", "Willkommen zurück, {user.username}!" } - div { - class: "flex flex-col sm:flex-row gap-4 justify-center", - Link { - to: Route::Dashboard {}, - class: "bg-indigo-600 text-white px-8 py-3 rounded-lg font-semibold hover:bg-indigo-700 transition-colors", - "Zum Dashboard" - } - Link { - to: Route::CreateEvent {}, - class: "bg-white text-indigo-600 border-2 border-indigo-600 px-8 py-3 rounded-lg font-semibold hover:bg-indigo-50 transition-colors", - "Neues Event erstellen" - } - } - } - } else { - div { - class: "space-y-4", - div { - class: "flex flex-col sm:flex-row gap-4 justify-center", - Link { - to: Route::Auth {}, - class: "bg-indigo-600 text-white px-8 py-3 rounded-lg font-semibold hover:bg-indigo-700 transition-colors", - "Loslegen" - } - Link { - to: Route::Auth {}, - class: "bg-white text-indigo-600 border-2 border-indigo-600 px-8 py-3 rounded-lg font-semibold hover:bg-indigo-50 transition-colors", - "Anmelden" - } - } - p { class: "text-sm text-gray-500", "Kein Konto? Die Registrierung dauert nur 30 Sekunden." } + div { + class: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-20 pb-16 text-center lg:pt-32", + h1 { + class: "mx-auto max-w-4xl font-display text-5xl font-medium tracking-tight text-slate-50 sm:text-7xl", + "Wichteln " + span { class: "relative whitespace-nowrap text-indigo-400", + svg { + class: "absolute -bottom-2 -left-2 -right-2 -top-2 text-indigo-900/50", + view_box: "0 0 400 100", + fill: "currentColor", + path { d: "M0 50 Q200 100 400 50 T800 50" } // Simple wave } + span { class: "relative", "leicht gemacht" } } } - - // Features section + p { class: "mx-auto mt-6 max-w-2xl text-lg tracking-tight text-slate-400", + "Organisiere deine Wichtel-Runden stressfrei und elegant. Erstelle Events, lade Freunde ein und lass den Zufall entscheiden." + } div { - class: "mt-20 grid md:grid-cols-3 gap-8 max-w-5xl mx-auto", - div { - class: "text-center p-6", - div { - class: "w-16 h-16 bg-indigo-100 rounded-full flex items-center justify-center mx-auto mb-4", - svg { - class: "w-8 h-8 text-indigo-600", - fill: "none", - stroke: "currentColor", - view_box: "0 0 24 24", - path { - stroke_linecap: "round", - stroke_linejoin: "round", - stroke_width: "2", - d: "M12 6v6m0 0v6m0-6h6m-6 0H6" - } - } + class: "mt-10 flex justify-center gap-x-6", + if let Some(_) = user_state() { + Link { + to: Route::Dashboard {}, + class: "group inline-flex items-center justify-center rounded-full py-3 px-8 text-sm font-semibold focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 bg-slate-50 text-slate-900 hover:bg-slate-200 hover:text-slate-700 active:bg-slate-300 active:text-slate-900 focus-visible:outline-white transition-all shadow-lg hover:shadow-xl", + "Zum Dashboard" } - h3 { class: "text-lg font-semibold text-gray-900 mb-2", "Einfache Event-Erstellung" } - p { class: "text-gray-600", "Erstelle dein Wichtel-Event in Sekunden mit unserer intuitiven Oberfläche." } - } - div { - class: "text-center p-6", - div { - class: "w-16 h-16 bg-indigo-100 rounded-full flex items-center justify-center mx-auto mb-4", - svg { - class: "w-8 h-8 text-indigo-600", - fill: "none", - stroke: "currentColor", - view_box: "0 0 24 24", - path { - stroke_linecap: "round", - stroke_linejoin: "round", - stroke_width: "2", - d: "M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" - } - } + } else { + Link { + to: Route::Auth {}, + class: "group inline-flex items-center justify-center rounded-full py-3 px-8 text-sm font-semibold focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 bg-slate-50 text-slate-900 hover:bg-slate-200 hover:text-slate-700 active:bg-slate-300 active:text-slate-900 focus-visible:outline-white transition-all shadow-lg hover:shadow-xl", + "Jetzt loslegen" } - h3 { class: "text-lg font-semibold text-gray-900 mb-2", "Intelligente Auslosung" } - p { class: "text-gray-600", "Unser Algorithmus sorgt für faire und zufällige Zuweisungen mit optionalen Ausschlüssen." } - } - div { - class: "text-center p-6", - div { - class: "w-16 h-16 bg-indigo-100 rounded-full flex items-center justify-center mx-auto mb-4", - svg { - class: "w-8 h-8 text-indigo-600", - fill: "none", - stroke: "currentColor", - view_box: "0 0 24 24", - path { - stroke_linecap: "round", - stroke_linejoin: "round", - stroke_width: "2", - d: "M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z" - } - } + Link { + to: Route::Auth {}, + class: "group inline-flex ring-1 ring-slate-700 ring-inset items-center justify-center rounded-full py-3 px-8 text-sm font-semibold focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2 bg-slate-800/50 text-white hover:bg-slate-800 hover:ring-slate-600 active:bg-slate-800 active:text-slate-300 focus-visible:outline-slate-900 transition-all backdrop-blur-sm", + "Anmelden" } - h3 { class: "text-lg font-semibold text-gray-900 mb-2", "Teilen & Einladen" } - p { class: "text-gray-600", "Erstelle teilbare Links, um Teilnehmer zu deinem Wichteln einzuladen." } } } } diff --git a/wichtl.db b/wichtl.db index 7254b6a..fab51eb 100644 Binary files a/wichtl.db and b/wichtl.db differ