Add theme + language toolbar to index, register, login pages
This commit is contained in:
1 parent
025af147cd
commit
7aec61d1a5
3 files changed
+49
-2
No files matched your search
@@ -9,6 +9,8 @@ import { prisma } from "@/lib/prisma";
|
|||||||
import { captchaConfig } from "@/lib/services/captcha";
|
import { captchaConfig } from "@/lib/services/captcha";
|
||||||
import { resolveHotelName } from "@/lib/hotel-name";
|
import { resolveHotelName } from "@/lib/hotel-name";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
import { ThemeSwitcher } from "@/components/theme-switcher";
|
||||||
|
import { LanguageSwitcher } from "@/components/language-switcher";
|
||||||
|
|
||||||
export default async function LoginPage() {
|
export default async function LoginPage() {
|
||||||
const t = await getTranslations("pages.login");
|
const t = await getTranslations("pages.login");
|
||||||
@@ -45,7 +47,20 @@ export default async function LoginPage() {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col lg:flex-row gap-10">
|
<div className="flex flex-col gap-6">
|
||||||
|
<div
|
||||||
|
className="flex items-center justify-end gap-2 rounded-2xl border px-4 py-2.5"
|
||||||
|
style={{
|
||||||
|
background: "color-mix(in srgb, var(--color-surface) 50%, transparent)",
|
||||||
|
backdropFilter: "blur(8px)",
|
||||||
|
WebkitBackdropFilter: "blur(8px)",
|
||||||
|
borderColor: "color-mix(in srgb, var(--color-text-muted) 8%, transparent)",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<LanguageSwitcher />
|
||||||
|
<ThemeSwitcher />
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col lg:flex-row gap-10">
|
||||||
{/* Left panel */}
|
{/* Left panel */}
|
||||||
<div className="lg:w-80 shrink-0 space-y-4">
|
<div className="lg:w-80 shrink-0 space-y-4">
|
||||||
<div
|
<div
|
||||||
@@ -238,6 +253,7 @@ export default async function LoginPage() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -9,6 +9,8 @@ import { prisma } from "@/lib/prisma";
|
|||||||
import { resolveHotelName } from "@/lib/hotel-name";
|
import { resolveHotelName } from "@/lib/hotel-name";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
import { auth } from "@/lib/auth";
|
import { auth } from "@/lib/auth";
|
||||||
|
import { ThemeSwitcher } from "@/components/theme-switcher";
|
||||||
|
import { LanguageSwitcher } from "@/components/language-switcher";
|
||||||
|
|
||||||
export const revalidate = 120;
|
export const revalidate = 120;
|
||||||
|
|
||||||
@@ -84,6 +86,19 @@ export default async function Home() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col gap-14 pb-14">
|
<div className="flex flex-col gap-14 pb-14">
|
||||||
|
{/* ── Toolbar ── */}
|
||||||
|
<div
|
||||||
|
className="flex items-center justify-end gap-2 rounded-2xl border px-4 py-2.5"
|
||||||
|
style={{
|
||||||
|
background: "color-mix(in srgb, var(--color-surface) 50%, transparent)",
|
||||||
|
backdropFilter: "blur(8px)",
|
||||||
|
WebkitBackdropFilter: "blur(8px)",
|
||||||
|
borderColor: "color-mix(in srgb, var(--color-text-muted) 8%, transparent)",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<LanguageSwitcher />
|
||||||
|
<ThemeSwitcher />
|
||||||
|
</div>
|
||||||
{/* ── 1. Hero ── */}
|
{/* ── 1. Hero ── */}
|
||||||
<div
|
<div
|
||||||
className="relative overflow-hidden rounded-3xl border px-6 py-10 md:px-10 md:py-14 lg:py-16"
|
className="relative overflow-hidden rounded-3xl border px-6 py-10 md:px-10 md:py-14 lg:py-16"
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ import { prisma } from "@/lib/prisma";
|
|||||||
import { captchaConfig } from "@/lib/services/captcha";
|
import { captchaConfig } from "@/lib/services/captcha";
|
||||||
import { resolveHotelName } from "@/lib/hotel-name";
|
import { resolveHotelName } from "@/lib/hotel-name";
|
||||||
import { siteSettings } from "@/lib/services/site-settings";
|
import { siteSettings } from "@/lib/services/site-settings";
|
||||||
|
import { ThemeSwitcher } from "@/components/theme-switcher";
|
||||||
|
import { LanguageSwitcher } from "@/components/language-switcher";
|
||||||
|
|
||||||
export default async function RegisterPage() {
|
export default async function RegisterPage() {
|
||||||
const th = await getTranslations("header");
|
const th = await getTranslations("header");
|
||||||
@@ -45,7 +47,20 @@ export default async function RegisterPage() {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col lg:flex-row gap-10">
|
<div className="flex flex-col gap-6">
|
||||||
|
<div
|
||||||
|
className="flex items-center justify-end gap-2 rounded-2xl border px-4 py-2.5"
|
||||||
|
style={{
|
||||||
|
background: "color-mix(in srgb, var(--color-surface) 50%, transparent)",
|
||||||
|
backdropFilter: "blur(8px)",
|
||||||
|
WebkitBackdropFilter: "blur(8px)",
|
||||||
|
borderColor: "color-mix(in srgb, var(--color-text-muted) 8%, transparent)",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<LanguageSwitcher />
|
||||||
|
<ThemeSwitcher />
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-col lg:flex-row gap-10">
|
||||||
{/* Left panel */}
|
{/* Left panel */}
|
||||||
<div className="lg:w-80 shrink-0 space-y-4">
|
<div className="lg:w-80 shrink-0 space-y-4">
|
||||||
<div
|
<div
|
||||||
@@ -228,6 +243,7 @@ export default async function RegisterPage() {
|
|||||||
nonce={nonce}
|
nonce={nonce}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user