Polish responsive design across all screen sizes and refine card blocks
- Enhance SurfaceCard with refined borders, layered shadows, and polished primary-tinted header with an icon container - Update homepage blocks (hero, features, stats, login, news, photos) for proper mobile/tablet/desktop responsiveness and tighter mobile spacing - Improve content-card, stat-block, card-grid and card styling with subtle depth (layered shadow + inner hairline) and smoother hover states - Refine site header, footer, top header and site layout spacing for small screens while keeping a consistent professional look on large screens - Add min-tap-height targets and responsive typography on mobile
This commit is contained in:
1 parent
b1ddda66ff
commit
903d175f2d
7 files changed
+194
-107
No files matched your search
@@ -28,7 +28,7 @@ export default async function SiteLayout({
|
||||
</>
|
||||
) : null}
|
||||
<main>
|
||||
<div className="mx-auto mt-6 grid max-w-7xl grid-cols-12 gap-x-3 gap-y-6 px-4 py-4 md:mt-0 md:p-6">
|
||||
<div className="mx-auto mt-4 grid max-w-7xl grid-cols-12 gap-x-3 gap-y-5 px-3 py-3 sm:px-4 sm:py-4 md:mt-0 md:px-6 md:py-6 md:gap-y-6">
|
||||
<div className="col-span-12 min-w-0">
|
||||
<MotionPageWrapper>{children}</MotionPageWrapper>
|
||||
</div>
|
||||
|
||||
+44
-42
@@ -118,11 +118,11 @@ export default async function Home() {
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="mx-auto w-full max-w-6xl flex flex-col gap-8 pb-16">
|
||||
<div className="mx-auto w-full max-w-6xl flex flex-col gap-6 px-1 sm:px-0 md:gap-8 pb-12 md:pb-16">
|
||||
{/* ── Top Bar ── */}
|
||||
<Reveal>
|
||||
<div
|
||||
className="relative flex items-center justify-between rounded-xl border px-5 py-3"
|
||||
className="relative flex items-center justify-between rounded-xl border px-3 py-2.5 sm:px-5 sm:py-3"
|
||||
style={{
|
||||
background:
|
||||
"color-mix(in srgb, var(--color-surface) 60%, transparent)",
|
||||
@@ -130,9 +130,11 @@ export default async function Home() {
|
||||
WebkitBackdropFilter: "blur(14px)",
|
||||
borderColor:
|
||||
"color-mix(in srgb, var(--color-text-muted) 8%, transparent)",
|
||||
boxShadow:
|
||||
"0 1px 3px rgba(0,0,0,0.04), 0 0 0 0.5px color-mix(in srgb, var(--color-text-muted) 6%, transparent)",
|
||||
}}
|
||||
>
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="flex items-center gap-2 sm:gap-3">
|
||||
{logo ? (
|
||||
<Image
|
||||
src={logo}
|
||||
@@ -154,14 +156,14 @@ export default async function Home() {
|
||||
/>
|
||||
)}
|
||||
<span
|
||||
className="text-sm font-extrabold uppercase tracking-wide"
|
||||
className="hidden sm:inline text-sm font-extrabold uppercase tracking-wide"
|
||||
style={{ color: "var(--color-text-readable)" }}
|
||||
>
|
||||
{hotelName}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
className="flex items-center gap-1.5 rounded-lg px-2 py-1"
|
||||
className="flex items-center gap-1 sm:gap-1.5 rounded-lg px-1.5 py-1 sm:px-2"
|
||||
style={{
|
||||
background:
|
||||
"color-mix(in srgb, var(--color-text-muted) 4%, transparent)",
|
||||
@@ -169,7 +171,7 @@ export default async function Home() {
|
||||
>
|
||||
<LanguageSwitcher />
|
||||
<div
|
||||
className="w-px h-5"
|
||||
className="hidden sm:block w-px h-5"
|
||||
style={{
|
||||
background:
|
||||
"color-mix(in srgb, var(--color-text-muted) 12%, transparent)",
|
||||
@@ -191,10 +193,12 @@ export default async function Home() {
|
||||
{/* ── Hero ── */}
|
||||
<Reveal>
|
||||
<div
|
||||
className="relative overflow-hidden rounded-3xl border"
|
||||
className="relative overflow-hidden rounded-2xl sm:rounded-3xl border"
|
||||
style={{
|
||||
borderColor:
|
||||
"color-mix(in srgb, var(--color-text-muted) 8%, transparent)",
|
||||
boxShadow:
|
||||
"0 4px 24px rgba(0,0,0,0.08), 0 0 0 0.5px color-mix(in srgb, var(--color-text-muted) 6%, transparent)",
|
||||
}}
|
||||
>
|
||||
<Image
|
||||
@@ -214,11 +218,11 @@ export default async function Home() {
|
||||
/>
|
||||
<AmbientOrbs />
|
||||
<div
|
||||
className="relative flex flex-col items-center gap-8 px-6 py-12 text-center md:px-12 md:py-20"
|
||||
className="relative flex flex-col items-center gap-5 px-4 py-10 text-center sm:gap-8 sm:px-6 sm:py-12 md:px-12 md:py-20"
|
||||
style={{ zIndex: 2 }}
|
||||
>
|
||||
<div
|
||||
className="inline-flex items-center gap-2 px-4 py-1.5 rounded-full text-xs font-bold uppercase tracking-widest mb-2 border backdrop-blur-sm"
|
||||
className="inline-flex items-center gap-2 px-3 py-1 sm:px-4 sm:py-1.5 rounded-full text-[10px] sm:text-xs font-bold uppercase tracking-widest mb-1 border backdrop-blur-sm"
|
||||
style={{
|
||||
background:
|
||||
"color-mix(in srgb, var(--color-primary) 12%, transparent)",
|
||||
@@ -234,7 +238,7 @@ export default async function Home() {
|
||||
{th("online", { count: online, hotel: hotelName })}
|
||||
</div>
|
||||
<h1
|
||||
className="text-4xl font-black leading-[1.05] tracking-tight mb-3 md:text-5xl lg:text-6xl"
|
||||
className="text-2xl font-black leading-[1.05] tracking-tight mb-2 sm:text-3xl md:text-5xl lg:text-6xl"
|
||||
style={{
|
||||
color: "var(--color-text-readable)",
|
||||
fontFamily: "var(--font-nunito)",
|
||||
@@ -243,15 +247,15 @@ export default async function Home() {
|
||||
<TypewriterText text={tp("welcome", { hotelName })} />
|
||||
</h1>
|
||||
<p
|
||||
className="text-base leading-relaxed max-w-2xl mb-8 md:text-lg"
|
||||
className="text-sm leading-relaxed max-w-2xl mb-5 sm:text-base md:text-lg md:mb-8"
|
||||
style={{ color: "var(--color-text-muted)" }}
|
||||
>
|
||||
{tp("welcomeBody")}
|
||||
</p>
|
||||
<div className="flex flex-wrap gap-3 justify-center">
|
||||
<div className="flex flex-wrap gap-2.5 sm:gap-3 justify-center">
|
||||
<Link
|
||||
href="/register"
|
||||
className="inline-flex items-center gap-2.5 font-extrabold text-sm px-8 py-4 rounded-xl transition-all duration-200 hover:scale-[1.03] active:scale-95 shadow-lg"
|
||||
className="inline-flex items-center gap-2 sm:gap-2.5 font-extrabold text-xs sm:text-sm px-5 sm:px-8 py-3 sm:py-4 rounded-xl transition-all duration-200 hover:scale-[1.03] active:scale-95 shadow-lg"
|
||||
style={{
|
||||
background: "var(--color-primary)",
|
||||
color: "var(--color-primary-foreground)",
|
||||
@@ -270,7 +274,7 @@ export default async function Home() {
|
||||
</Link>
|
||||
<Link
|
||||
href="/login"
|
||||
className="inline-flex items-center gap-2 font-bold text-sm px-8 py-4 rounded-xl border-2 transition-all duration-200 hover:scale-[1.03] active:scale-95 backdrop-blur-sm"
|
||||
className="inline-flex items-center gap-2 font-bold text-xs sm:text-sm px-5 sm:px-8 py-3 sm:py-4 rounded-xl border-2 transition-all duration-200 hover:scale-[1.03] active:scale-95 backdrop-blur-sm"
|
||||
style={{
|
||||
borderColor:
|
||||
"color-mix(in srgb, var(--color-text-muted) 20%, transparent)",
|
||||
@@ -288,23 +292,25 @@ export default async function Home() {
|
||||
|
||||
{/* ── Features ── */}
|
||||
<Reveal>
|
||||
<div className="grid grid-cols-1 gap-4 sm:grid-cols-3">
|
||||
<div className="grid grid-cols-1 gap-3 sm:grid-cols-3 sm:gap-4">
|
||||
{features.map((f) => (
|
||||
<SurfaceCard
|
||||
key={f.title}
|
||||
className="relative p-5 text-center transition-all duration-300 hover:-translate-y-1 hover:shadow-xl"
|
||||
className="relative p-4 sm:p-5 text-center transition-all duration-300 hover:-translate-y-1 hover:shadow-lg"
|
||||
>
|
||||
<div
|
||||
className="mx-auto mb-3 flex h-12 w-12 items-center justify-center rounded-xl"
|
||||
className="mx-auto mb-3 flex h-11 w-11 sm:h-12 sm:w-12 items-center justify-center rounded-xl"
|
||||
style={{
|
||||
background:
|
||||
"color-mix(in srgb, var(--color-primary) 14%, transparent)",
|
||||
boxShadow:
|
||||
"inset 0 0 0 1px color-mix(in srgb, var(--color-primary) 10%, transparent)",
|
||||
}}
|
||||
>
|
||||
<Image src={f.icon} alt="" width={26} height={26} unoptimized />
|
||||
<Image src={f.icon} alt="" width={24} height={24} unoptimized />
|
||||
</div>
|
||||
<h3
|
||||
className="text-base font-extrabold mb-1"
|
||||
className="text-sm sm:text-base font-extrabold mb-1"
|
||||
style={{
|
||||
color: "var(--color-text-readable)",
|
||||
fontFamily: "var(--font-nunito)",
|
||||
@@ -313,7 +319,7 @@ export default async function Home() {
|
||||
{f.title}
|
||||
</h3>
|
||||
<p
|
||||
className="text-sm leading-relaxed"
|
||||
className="text-xs sm:text-sm leading-relaxed"
|
||||
style={{ color: "var(--color-text-muted)" }}
|
||||
>
|
||||
{f.desc}
|
||||
@@ -325,7 +331,7 @@ export default async function Home() {
|
||||
|
||||
{/* ── Stats + Login ── */}
|
||||
<Reveal>
|
||||
<div className="grid grid-cols-1 gap-4 md:grid-cols-4">
|
||||
<div className="grid grid-cols-2 gap-3 sm:gap-4 md:grid-cols-4">
|
||||
{[
|
||||
{
|
||||
value: users,
|
||||
@@ -350,13 +356,13 @@ export default async function Home() {
|
||||
].map((s) => (
|
||||
<SurfaceCard
|
||||
key={s.label}
|
||||
className="relative p-5 text-center transition-all duration-300 hover:-translate-y-1 hover:shadow-xl"
|
||||
className="relative p-3 sm:p-5 text-center transition-all duration-300 hover:-translate-y-1 hover:shadow-lg"
|
||||
>
|
||||
<div className="mb-0.5 text-3xl font-black tracking-tight md:text-4xl">
|
||||
<div className="mb-0.5 text-2xl sm:text-3xl font-black tracking-tight md:text-4xl">
|
||||
<AnimatedCounter value={s.value} />
|
||||
</div>
|
||||
<div
|
||||
className="text-xs font-bold uppercase tracking-widest flex items-center justify-center gap-1.5"
|
||||
className="text-[10px] sm:text-xs font-bold uppercase tracking-widest flex items-center justify-center gap-1 sm:gap-1.5"
|
||||
style={{ color: "var(--color-text-muted)" }}
|
||||
>
|
||||
<Image src={s.icon} alt="" width={14} height={14} unoptimized />
|
||||
@@ -373,7 +379,7 @@ export default async function Home() {
|
||||
<SurfaceCard
|
||||
title={th("login")}
|
||||
icon="/assets/images/icons/navigation/me.png"
|
||||
bodyClassName="p-4"
|
||||
bodyClassName="p-3.5 sm:p-4"
|
||||
>
|
||||
<HomeLoginForm
|
||||
captcha={{
|
||||
@@ -391,17 +397,13 @@ export default async function Home() {
|
||||
icon="/assets/images/icons/navigation/goody.png"
|
||||
actionHref="/community"
|
||||
actionLabel={tp("allUsers")}
|
||||
bodyClassName="p-4"
|
||||
bodyClassName="p-3.5 sm:p-4"
|
||||
>
|
||||
<div className="grid grid-cols-4 gap-2">
|
||||
<div className="grid grid-cols-4 gap-1.5 sm:gap-2">
|
||||
{recentUsers.map((u) => (
|
||||
<div
|
||||
key={u.username}
|
||||
className="flex flex-col items-center gap-0.5 rounded-lg px-1 py-1"
|
||||
style={{
|
||||
background:
|
||||
"color-mix(in srgb, var(--color-primary) 5%, transparent)",
|
||||
}}
|
||||
className="flex flex-col items-center gap-0.5 rounded-lg px-1 py-1.5 transition-colors hover:bg-[color-mix(in_srgb,var(--color-primary)_5%,transparent)]"
|
||||
>
|
||||
<UserAvatarThumbnail
|
||||
figure={u.look}
|
||||
@@ -410,7 +412,7 @@ export default async function Home() {
|
||||
className="rounded-md"
|
||||
/>
|
||||
<span
|
||||
className="max-w-[64px] truncate text-center text-[10px] font-bold leading-tight"
|
||||
className="max-w-[64px] truncate text-center text-[9px] sm:text-[10px] font-bold leading-tight"
|
||||
style={{ color: "var(--color-text-readable)" }}
|
||||
>
|
||||
{u.username}
|
||||
@@ -431,14 +433,14 @@ export default async function Home() {
|
||||
actionLabel={tp("allNews")}
|
||||
>
|
||||
{articles.length > 0 ? (
|
||||
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2">
|
||||
<div className="grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4">
|
||||
{articles.slice(0, 4).map((a) => (
|
||||
<Link
|
||||
key={a.slug}
|
||||
href={`/news/${a.slug}`}
|
||||
className="group relative w-full overflow-hidden rounded-xl transition-all duration-300 hover:-translate-y-0.5 hover:shadow-lg"
|
||||
style={{
|
||||
height: "200px",
|
||||
height: "clamp(160px, 20vw, 200px)",
|
||||
backgroundColor: "var(--color-background)",
|
||||
border:
|
||||
"1px solid color-mix(in srgb, var(--color-text-muted) 10%, transparent)",
|
||||
@@ -449,24 +451,24 @@ export default async function Home() {
|
||||
src={a.image}
|
||||
alt={a.title}
|
||||
fill
|
||||
sizes="(max-width: 768px) 100vw, 400px"
|
||||
sizes="(max-width: 640px) 100vw, 400px"
|
||||
className="rounded-xl object-cover transition-all duration-300 group-hover:scale-105"
|
||||
/>
|
||||
<div className="absolute right-2.5 top-2.5 flex h-8 w-8 translate-x-1 items-center justify-center rounded-full bg-black/50 opacity-0 backdrop-blur-sm transition-all duration-300 group-hover:translate-x-0 group-hover:opacity-100">
|
||||
<span className="text-sm font-bold text-white">→</span>
|
||||
</div>
|
||||
<div
|
||||
className="absolute bottom-0 left-0 w-full p-2.5"
|
||||
className="absolute bottom-0 left-0 w-full p-2.5 sm:p-3"
|
||||
style={{
|
||||
background:
|
||||
"linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%)",
|
||||
"linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, transparent 100%)",
|
||||
}}
|
||||
>
|
||||
<h3 className="truncate text-base font-bold text-white text-shadow-sm">
|
||||
<h3 className="truncate text-sm sm:text-base font-bold text-white text-shadow-sm">
|
||||
{a.title}
|
||||
</h3>
|
||||
<p
|
||||
className="mt-0.5 text-[11px] font-semibold opacity-80"
|
||||
className="mt-0.5 text-[10px] sm:text-[11px] font-semibold opacity-80"
|
||||
style={{ color: "var(--color-text-muted)" }}
|
||||
>
|
||||
{formatDate(a.createdAt, "date", "")}
|
||||
@@ -500,7 +502,7 @@ export default async function Home() {
|
||||
<Link
|
||||
key={p.id}
|
||||
href="/photos"
|
||||
className="block aspect-square overflow-hidden rounded-xl border transition-all duration-200 hover:shadow-md"
|
||||
className="block aspect-square overflow-hidden rounded-xl border transition-all duration-200 hover:shadow-md hover:scale-[1.02]"
|
||||
style={{
|
||||
borderColor:
|
||||
"color-mix(in srgb, var(--color-text-muted) 8%, transparent)",
|
||||
@@ -511,7 +513,7 @@ export default async function Home() {
|
||||
alt=""
|
||||
width={200}
|
||||
height={200}
|
||||
className="h-full w-full object-cover transition-transform duration-300 hover:scale-105"
|
||||
className="h-full w-full object-cover"
|
||||
unoptimized
|
||||
/>
|
||||
</Link>
|
||||
|
||||
Reference in new issue
Block a user