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 { resolveHotelName } from "@/lib/hotel-name";
|
||||
import { siteSettings } from "@/lib/services/site-settings";
|
||||
import { ThemeSwitcher } from "@/components/theme-switcher";
|
||||
import { LanguageSwitcher } from "@/components/language-switcher";
|
||||
|
||||
export default async function LoginPage() {
|
||||
const t = await getTranslations("pages.login");
|
||||
@@ -45,7 +47,20 @@ export default async function LoginPage() {
|
||||
]);
|
||||
|
||||
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 */}
|
||||
<div className="lg:w-80 shrink-0 space-y-4">
|
||||
<div
|
||||
@@ -238,6 +253,7 @@ export default async function LoginPage() {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -9,6 +9,8 @@ import { prisma } from "@/lib/prisma";
|
||||
import { resolveHotelName } from "@/lib/hotel-name";
|
||||
import { siteSettings } from "@/lib/services/site-settings";
|
||||
import { auth } from "@/lib/auth";
|
||||
import { ThemeSwitcher } from "@/components/theme-switcher";
|
||||
import { LanguageSwitcher } from "@/components/language-switcher";
|
||||
|
||||
export const revalidate = 120;
|
||||
|
||||
@@ -84,6 +86,19 @@ export default async function Home() {
|
||||
|
||||
return (
|
||||
<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 ── */}
|
||||
<div
|
||||
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 { resolveHotelName } from "@/lib/hotel-name";
|
||||
import { siteSettings } from "@/lib/services/site-settings";
|
||||
import { ThemeSwitcher } from "@/components/theme-switcher";
|
||||
import { LanguageSwitcher } from "@/components/language-switcher";
|
||||
|
||||
export default async function RegisterPage() {
|
||||
const th = await getTranslations("header");
|
||||
@@ -45,7 +47,20 @@ export default async function RegisterPage() {
|
||||
]);
|
||||
|
||||
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 */}
|
||||
<div className="lg:w-80 shrink-0 space-y-4">
|
||||
<div
|
||||
@@ -228,6 +243,7 @@ export default async function RegisterPage() {
|
||||
nonce={nonce}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user