fix first online resevation

This commit is contained in:
root
2026-05-09 20:01:51 -04:00
parent c4a45c8b21
commit 09b0e3b55f
75 changed files with 6394 additions and 2190 deletions
+83
View File
@@ -2,6 +2,14 @@
@tailwind components;
@tailwind utilities;
html.light {
color-scheme: light;
}
html.dark {
color-scheme: dark;
}
body {
@apply bg-white text-slate-900 antialiased;
}
@@ -13,3 +21,78 @@ body {
.card {
@apply rounded-2xl border border-slate-200 bg-white shadow-sm;
}
@layer base {
body {
@apply transition-colors dark:bg-slate-950 dark:text-slate-100;
}
.card {
@apply transition-colors dark:border-slate-800 dark:bg-slate-900;
}
}
@layer utilities {
.dark .bg-slate-50 {
background-color: rgb(2 6 23);
}
.dark .bg-slate-100 {
background-color: rgb(15 23 42);
}
.dark .bg-white {
background-color: rgb(15 23 42);
}
.dark .bg-white\/90 {
background-color: rgb(15 23 42 / 0.9);
}
.dark .border-slate-200,
.dark .border-stone-200,
.dark .border-slate-300 {
border-color: rgb(30 41 59);
}
.dark .text-slate-900 {
color: rgb(241 245 249);
}
.dark .text-slate-700 {
color: rgb(203 213 225);
}
.dark .text-slate-600,
.dark .text-stone-500 {
color: rgb(148 163 184);
}
.dark .text-slate-500,
.dark .text-slate-400,
.dark .text-stone-400 {
color: rgb(100 116 139);
}
.dark .text-sky-700 {
color: rgb(125 211 252);
}
.dark .bg-sky-100 {
background-color: rgb(12 74 110);
}
.dark .text-sky-800 {
color: rgb(224 242 254);
}
.dark .hover\:bg-slate-100:hover,
.dark .hover\:bg-stone-100:hover {
background-color: rgb(30 41 59);
}
.dark .hover\:text-slate-900:hover,
.dark .hover\:text-stone-900:hover {
color: rgb(248 250 252);
}
}
+21 -11
View File
@@ -5,6 +5,7 @@ import { DEFAULT_COMPANY_SLUG, siteFetchOrDefault } from '@/lib/api'
import { getPublicSiteLanguage } from '@/lib/i18n.server'
import { getPublicSiteDictionary } from '@/lib/i18n'
import PublicLanguageSwitcher from '@/components/PublicLanguageSwitcher'
import PublicThemeSwitcher from '@/components/PublicThemeSwitcher'
import type { PublicSitePageSections } from '@rentaldrivego/types'
export const metadata: Metadata = {
@@ -69,13 +70,21 @@ export default async function RootLayout({ children }: { children: React.ReactNo
const bookCarLabel = resolveText(menuConfig?.bookCarLabel, dict.nav.bookCar)
return (
<html lang={dict.lang} dir={dict.dir}>
<body>
<header className="sticky top-0 z-30 border-b border-slate-200 bg-white/90 backdrop-blur-sm">
<html lang={dict.lang} dir={dict.dir} className="light" suppressHydrationWarning>
<head>
<script
dangerouslySetInnerHTML={{
__html:
"(function(){try{var theme=localStorage.getItem('public-site-theme');if(theme!=='light'&&theme!=='dark'){theme=window.matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light'}document.documentElement.classList.remove('light','dark');document.documentElement.classList.add(theme);document.documentElement.style.colorScheme=theme}catch(e){}})();",
}}
/>
</head>
<body suppressHydrationWarning>
<header className="sticky top-0 z-30 border-b border-slate-200 bg-white/90 backdrop-blur-sm transition-colors dark:border-slate-800 dark:bg-slate-950/90">
<div className="shell flex h-14 items-center justify-between gap-6">
<Link
href="/"
className="flex items-center gap-2 font-black text-slate-900 tracking-tight text-lg"
className="flex items-center gap-2 text-lg font-black tracking-tight text-slate-900 dark:text-slate-100"
>
<span className="inline-flex h-7 w-7 items-center justify-center rounded-lg bg-sky-600 text-white text-xs font-black select-none">
{companyName.charAt(0).toUpperCase()}
@@ -91,9 +100,10 @@ export default async function RootLayout({ children }: { children: React.ReactNo
<div className="flex items-center gap-3">
<PublicLanguageSwitcher currentLanguage={language} />
<PublicThemeSwitcher currentLanguage={language} />
<Link
href="/vehicles"
className="hidden rounded-full bg-slate-900 px-5 py-2 text-sm font-semibold text-white transition-colors hover:bg-slate-700 sm:inline-flex"
className="hidden rounded-full bg-slate-900 px-5 py-2 text-sm font-semibold text-white transition-colors hover:bg-slate-700 dark:bg-slate-100 dark:text-slate-950 dark:hover:bg-slate-200 sm:inline-flex"
>
{bookCarLabel}
</Link>
@@ -103,20 +113,20 @@ export default async function RootLayout({ children }: { children: React.ReactNo
{children}
<footer className="mt-16 border-t border-stone-200 bg-white/90 px-4 py-4 backdrop-blur-md transition-colors">
<footer className="mt-16 border-t border-stone-200 bg-white/90 px-4 py-4 backdrop-blur-md transition-colors dark:border-stone-800 dark:bg-slate-950/90">
<div className="shell flex flex-col items-center justify-between gap-3 lg:flex-row">
<p className="text-xs font-medium uppercase tracking-[0.16em] text-stone-400">
<p className="text-xs font-medium uppercase tracking-[0.16em] text-stone-400 dark:text-stone-500">
{footerLabel}
</p>
<div className="flex flex-col items-center gap-3 sm:flex-row">
<nav className="flex flex-wrap items-center justify-center gap-2 text-sm text-stone-500">
<nav className="flex flex-wrap items-center justify-center gap-2 text-sm text-stone-500 dark:text-stone-400">
{headerMenuItems.filter((item) => item.visible).map((item) => (
<Link key={item.href} href={item.href} className="rounded-full px-3 py-1.5 transition hover:bg-stone-100 hover:text-stone-900">
<Link key={item.href} href={item.href} className="rounded-full px-3 py-1.5 transition hover:bg-stone-100 hover:text-stone-900 dark:hover:bg-stone-800 dark:hover:text-stone-100">
{item.label}
</Link>
))}
</nav>
<p className="text-sm text-stone-500">
<p className="text-sm text-stone-500 dark:text-stone-400">
&copy; {new Date().getFullYear()} {companyName}
</p>
</div>
@@ -131,7 +141,7 @@ function NavLink({ href, children }: { href: string; children: React.ReactNode }
return (
<Link
href={href}
className="rounded-lg px-3 py-2 text-sm font-medium text-slate-600 hover:bg-slate-100 hover:text-slate-900 transition-colors"
className="rounded-lg px-3 py-2 text-sm font-medium text-slate-600 transition-colors hover:bg-slate-100 hover:text-slate-900 dark:text-slate-300 dark:hover:bg-slate-800 dark:hover:text-slate-100"
>
{children}
</Link>