Complete UI professional makeover: premium design, animations, consistent shadcn components, polished admin dashboard, modern login/auth pages, enhanced navigation
Local Build and Deploy / deploy (push) Successful in 46s

This commit is contained in:
openhands committed 2026-07-16 19:37:22 +02:00
1 parent ac1b412756
commit 3c4aa50fea
12 files changed
+773 -780

No files matched your search

+57 -68
View File
@@ -14,10 +14,11 @@
--radius-md: 12px;
--radius-lg: 16px;
--shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
--shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.06);
--shadow-card-hover: 0 8px 30px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
--shadow-elevated: 0 20px 60px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
--shadow-glow: 0 0 20px color-mix(in srgb, var(--color-primary) 30%, transparent), 0 0 60px color-mix(in srgb, var(--color-primary) 10%, transparent);
}
/* Default theme variables. ThemeVars may override these at runtime. */
:root {
--color-primary: #eeb425;
--color-primary-hover: #d4a01f;
@@ -86,7 +87,6 @@
--border-subtle: color-mix(in srgb, var(--color-text-muted) 18%, transparent);
}
/* Dark mode colors + readable contrast vars are generated by ThemeVars. */
html.dark input,
html.dark select,
html.dark textarea {
@@ -114,7 +114,6 @@ body {
-moz-osx-font-smoothing: grayscale;
}
/* Mobile-friendly improvements for every screen */
button,
a,
input,
@@ -126,12 +125,10 @@ summary,
touch-action: manipulation;
}
/* Momentum scrolling on iOS */
* {
-webkit-overflow-scrolling: touch;
}
/* Prevent iOS zoom on input focus */
@media (max-width: 48rem) {
input,
select,
@@ -140,7 +137,6 @@ summary,
}
}
/* Semantic colors: safe across every complete light/dark preset. */
.theme-text-muted {
color: var(--color-text-muted-readable);
}
@@ -192,7 +188,6 @@ summary,
background: transparent;
}
/* ── Atom theme components ────────────────────────────────── */
@layer components {
.nav-item {
@apply flex h-auto md:h-[54px] items-center text-[13px] font-bold px-3 md:px-4 relative;
@@ -202,12 +197,14 @@ summary,
white-space: nowrap;
transition:
color 0.15s ease-in-out,
background-color 0.15s ease-in-out;
background-color 0.15s ease-in-out,
transform 0.15s ease;
border-radius: 0.5rem;
}
.nav-item:hover {
color: var(--color-primary-readable, var(--color-primary));
background-color: color-mix(in srgb, var(--color-primary) 8%, transparent);
transform: translateY(-1px);
}
.nav-item[aria-current="page"] {
color: var(--color-primary-readable, var(--color-primary));
@@ -222,11 +219,13 @@ summary,
color: var(--color-dropdown-text-readable, var(--color-text-readable));
transition:
background-color 0.1s ease-in-out,
color 0.1s ease-in-out;
color 0.1s ease-in-out,
transform 0.1s ease;
}
.dropdown-item:hover {
background-color: color-mix(in srgb, var(--color-primary) 12%, transparent);
color: var(--color-primary-readable, var(--color-primary));
transform: translateX(2px);
}
.dropdown-item:focus-visible {
outline: 2px solid var(--color-primary-readable, var(--color-primary));
@@ -237,10 +236,10 @@ summary,
border: 1px solid
color-mix(in srgb, var(--color-text-muted) 14%, transparent);
box-shadow: 0 8px 32px color-mix(in srgb, rgb(0, 0, 0) 20%, transparent);
border-radius: 16px;
}
}
/* ── Site background ── */
.site-bg {
background:
linear-gradient(
@@ -262,7 +261,6 @@ html.dark .site-bg {
background-blend-mode: overlay;
}
/* Admin must not inherit the public wallpaper — solid HK canvas only. */
body.site-bg:has([data-admin]),
html.dark body.site-bg:has([data-admin]) {
background: var(--admin-canvas);
@@ -270,14 +268,13 @@ html.dark body.site-bg:has([data-admin]) {
background-blend-mode: normal;
}
.article-body {
line-height: 1.7;
}
.article-body img {
max-width: 100%;
height: auto;
border-radius: 8px;
border-radius: 12px;
}
.article-body p {
margin: 0 0 0.85rem;
@@ -307,15 +304,17 @@ html.dark body.site-bg:has([data-admin]) {
transform: translateY(-2px);
box-shadow: var(--shadow-card-hover);
}
/* ── App component classes (used across the converted pages) ── */
h1 {
font-size: var(--size-heading-h1, 30px);
font-weight: 800;
margin: 0.2em 0 0.5em;
letter-spacing: -0.02em;
}
h2 {
font-size: var(--size-heading-h2, 22px);
font-weight: 700;
letter-spacing: -0.01em;
}
h3 {
font-size: var(--size-heading-h3, 18px);
@@ -343,6 +342,7 @@ a:hover {
padding: 2rem 2.25rem;
box-shadow: var(--shadow-card);
margin-bottom: 1.5rem;
backdrop-filter: blur(8px);
}
.card {
background: var(--color-surface);
@@ -507,25 +507,21 @@ tbody tr:hover {
background-size: contain;
outline: 1px solid #6caff4;
}
/* ── Admin panel (Housekeeping) ─────────────────────────────────
Modern, consistent styling for all admin content pages. */
.admin-page {
scroll-margin-top: 1rem;
}
/* Hub chrome already shows the section title — soften page-level heroes. */
.admin-hub-panel > .space-y-6 > div:first-child > h1.text-3xl {
font-size: 1.15rem;
letter-spacing: -0.01em;
}
/* Page heading */
.admin-page main > h1:first-child,
.admin-page > h1:first-child {
margin-top: 0;
}
/* Cards used inside admin pages */
.admin-card {
background: var(--admin-surface);
color: var(--admin-text);
@@ -533,10 +529,12 @@ tbody tr:hover {
border-radius: 16px;
box-shadow: var(--shadow-card);
padding: 1.25rem;
transition: box-shadow 0.2s ease;
transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.admin-card:hover {
box-shadow: var(--shadow-card-hover);
}
/* Card with filter/search bar — compact horizontal layout */
.admin-filter-bar {
display: flex;
flex-wrap: wrap;
@@ -550,7 +548,6 @@ tbody tr:hover {
min-width: 200px;
}
/* Compact stat row for list pages (counts, summaries) */
.admin-stat-row {
display: flex;
flex-wrap: wrap;
@@ -569,7 +566,6 @@ tbody tr:hover {
font-weight: 600;
}
/* Tables */
.admin-page table {
width: 100%;
background: var(--admin-surface);
@@ -610,7 +606,6 @@ tbody tr:hover {
border-radius: 0 16px 0 0;
}
/* Section heading inside admin pages */
.admin-section-title {
font-size: 0.9rem;
font-weight: 700;
@@ -627,16 +622,13 @@ tbody tr:hover {
gap: 0.15rem;
}
/* Empty state */
.admin-empty {
text-align: center;
padding: 2.5rem 1rem;
color: var(--admin-text-muted);
font-size: 0.85rem;
}
/* ── Public design system (faithful to the atom theme) ──────────
content-card = surface card with a primary-tinted header (icon +
title + subtitle) and a padded body — the signature atom block. */
.content-card {
display: flex;
flex-direction: column;
@@ -647,10 +639,11 @@ tbody tr:hover {
border-radius: var(--radius-lg);
box-shadow: var(--shadow-card);
overflow: hidden;
transition: box-shadow 0.2s ease;
transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.content-card:hover {
box-shadow: var(--shadow-card-hover);
transform: translateY(-2px);
}
.content-card-head {
display: flex;
@@ -704,7 +697,6 @@ tbody tr:hover {
padding: 1.1rem;
}
/* Responsive card grids (atom: 1 / sm2 / md3 / lg4). */
.card-grid {
display: grid;
gap: 1rem;
@@ -732,7 +724,6 @@ tbody tr:hover {
}
}
/* Stat tiles (value in the primary colour + muted label). */
.stat-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
@@ -744,6 +735,11 @@ tbody tr:hover {
border-radius: 12px;
padding: 0.85rem 1rem;
text-align: center;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-block:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-card-hover);
}
.stat-block-value {
font-size: 1.6rem;
@@ -757,7 +753,6 @@ tbody tr:hover {
color: var(--color-text-muted-readable, var(--color-text-muted));
}
/* Empty states */
.empty-state {
text-align: center;
padding: 2rem 1rem;
@@ -767,7 +762,6 @@ tbody tr:hover {
margin-bottom: 0.4rem;
}
/* Online / offline pill */
.online-badge {
display: inline-flex;
align-items: center;
@@ -795,7 +789,6 @@ tbody tr:hover {
color-mix(in srgb, var(--color-success) 22%, transparent);
}
/* Leaderboard rank chip */
.rank-badge {
display: inline-grid;
place-items: center;
@@ -821,7 +814,6 @@ tbody tr:hover {
border-color: #f97316;
}
/* ── Radio sidebar ──────────────────────────────────────────── */
.radio-layout {
display: flex;
gap: 1.5rem;
@@ -865,20 +857,37 @@ tbody tr:hover {
}
}
/* ── Skeleton shimmer animation ─────────────────────────────── */
@keyframes shimmer {
0% {
opacity: 0.6;
}
50% {
opacity: 1;
}
100% {
opacity: 0.6;
}
0% { opacity: 0.6; }
50% { opacity: 1; }
100% { opacity: 0.6; }
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
from { opacity: 0; transform: translateY(12px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-glow {
0%, 100% { box-shadow: 0 0 8px color-mix(in srgb, var(--color-primary) 20%, transparent); }
50% { box-shadow: 0 0 20px color-mix(in srgb, var(--color-primary) 40%, transparent); }
}
.animate-fade-in {
animation: fadeIn 0.4s ease-out;
}
.animate-slide-up {
animation: slideUp 0.5s ease-out;
}
.animate-pulse-glow {
animation: pulse-glow 2s ease-in-out infinite;
}
/* Footer CMS info popup */
.cms-info-trigger {
appearance: none;
border: 0;
@@ -918,7 +927,7 @@ tbody tr:hover {
width: min(440px, 100%);
border: 1px solid
color-mix(in srgb, var(--color-primary) 30%, color-mix(in srgb, var(--color-text-muted) 22%, transparent));
border-radius: 8px;
border-radius: 16px;
background:
linear-gradient(
135deg,
@@ -1049,7 +1058,6 @@ tbody tr:hover {
}
}
/* ── Mobile responsive overrides ──────────────────────────── */
@media (max-width: 48rem) {
h1 {
font-size: clamp(1.25rem, 5vw, var(--size-heading-h1, 30px));
@@ -1103,7 +1111,6 @@ tbody tr:hover {
}
}
/* make tables scroll on small screens */
@media (max-width: 640px) {
table {
display: block;
@@ -1112,21 +1119,7 @@ tbody tr:hover {
}
}
/* ── Admin (HK) semantic token remap ──────────────────────────────────────
Shared shadcn UI primitives (Button, Badge, Input, Select, Card, Table,
Tabs, Dialog, Switch, Checkbox, Tooltip, …) are built on the site's
semantic tokens (--color-background, --color-primary, --color-popover,
--color-border, --color-ring, --color-muted-foreground, …). On admin
pages we remap those tokens onto the admin palette so every embedded
component renders with the admin theme and guaranteed contrast, without
touching any component file.
Gated by `body:has([data-admin])` so the public site is completely
unaffected. This also covers Radix portals (Dialog/Select/Dropdown/
Popover/Tooltip) which mount under <body>. */
body:has([data-admin]) {
/* Full public→admin token remap so shadcn + body + leftover
public utilities all inherit the admin palette with contrast. */
--color-background: var(--admin-canvas);
--color-foreground: var(--admin-text);
--color-card: var(--admin-surface);
@@ -1155,7 +1148,6 @@ body:has([data-admin]) {
--color-border: var(--admin-border);
--color-input: var(--admin-border);
--color-ring: var(--admin-accent);
/* Public Atom tokens still referenced by body / .muted / inputs */
--color-text: var(--admin-text);
--color-text-readable: var(--admin-text);
--color-text-muted: var(--admin-text-muted);
@@ -1173,7 +1165,6 @@ body:has([data-admin]) {
font-family: var(--font-family);
}
/* Admin forms / boxes follow admin tokens in both light and dark. */
body:has([data-admin]) input:not([type="checkbox"]):not([type="radio"]):not(
[type="range"]
):not([type="file"]):not([type="color"]),
@@ -1209,7 +1200,6 @@ body:has([data-admin]) .btn-outline:hover {
background: color-mix(in srgb, var(--admin-accent) 12%, transparent);
color: var(--admin-text);
}
/* Override public html.dark input hardcodes inside admin. */
html.dark body:has([data-admin]) input:not([type="checkbox"]):not(
[type="radio"]
):not([type="range"]):not([type="file"]):not([type="color"]),
@@ -1219,7 +1209,6 @@ html.dark body:has([data-admin]) textarea {
color: var(--admin-text);
}
/* ── Details/summary open states for nav ──────────────────── */
details[open] > summary .details-open\:hidden {
display: none;
}