Adopt GL glass capsules and layered canvas background
This commit is contained in:
@@ -7,7 +7,9 @@ const isLoginPage = computed(() => route.path === '/login');
|
||||
<div class="lk-shell" data-theme="aqua">
|
||||
<UiAppHeader v-if="!isLoginPage" />
|
||||
<main class="mx-auto w-full max-w-[1440px] p-4 pt-[92px] md:p-6 md:pt-[96px] lg:p-8 lg:pt-[96px]">
|
||||
<div class="lk-content-canvas">
|
||||
<NuxtPage />
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -49,24 +49,69 @@ body {
|
||||
font-family: 'Manrope', 'Segoe UI', sans-serif;
|
||||
@apply text-base-content;
|
||||
background:
|
||||
radial-gradient(circle at 8% 10%, color-mix(in oklab, var(--color-primary) 20%, transparent), transparent 35%),
|
||||
radial-gradient(circle at 92% 0%, color-mix(in oklab, var(--color-secondary) 14%, transparent), transparent 28%),
|
||||
linear-gradient(160deg, var(--color-base-100) 0%, var(--color-base-200) 56%, var(--color-base-100) 100%);
|
||||
linear-gradient(
|
||||
135deg,
|
||||
color-mix(in oklab, var(--color-primary) 14%, #f5fcf8) 0%,
|
||||
color-mix(in oklab, #f7fff9 84%, white) 28%,
|
||||
color-mix(in oklab, var(--color-success) 16%, #f2fbf6) 52%,
|
||||
color-mix(in oklab, #f4fff8 82%, white) 76%,
|
||||
color-mix(in oklab, var(--color-accent) 8%, #f7fff8) 100%
|
||||
);
|
||||
background-size: 220% 220%;
|
||||
animation: fregat-aurora 22s ease-in-out infinite;
|
||||
color: var(--color-base-content);
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.lk-shell {
|
||||
@apply min-h-screen;
|
||||
position: relative;
|
||||
isolation: isolate;
|
||||
}
|
||||
|
||||
.lk-shell::before,
|
||||
.lk-shell::after {
|
||||
content: '';
|
||||
position: fixed;
|
||||
inset: -30%;
|
||||
pointer-events: none;
|
||||
z-index: -1;
|
||||
filter: blur(52px);
|
||||
}
|
||||
|
||||
.lk-shell::before {
|
||||
background:
|
||||
radial-gradient(circle at 18% 22%, rgba(132, 227, 174, 0.34) 0%, rgba(132, 227, 174, 0) 40%),
|
||||
radial-gradient(circle at 78% 16%, rgba(186, 248, 214, 0.26) 0%, rgba(186, 248, 214, 0) 45%);
|
||||
animation: fregat-float-a 18s ease-in-out infinite alternate;
|
||||
}
|
||||
|
||||
.lk-shell::after {
|
||||
background:
|
||||
radial-gradient(circle at 85% 82%, rgba(95, 194, 140, 0.2) 0%, rgba(95, 194, 140, 0) 42%),
|
||||
radial-gradient(circle at 30% 78%, rgba(200, 255, 228, 0.24) 0%, rgba(200, 255, 228, 0) 40%);
|
||||
animation: fregat-float-b 24s ease-in-out infinite alternate;
|
||||
}
|
||||
|
||||
.lk-content-canvas {
|
||||
border: 1px solid rgba(255, 255, 255, 0.52);
|
||||
border-radius: 2rem;
|
||||
background:
|
||||
linear-gradient(160deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.36));
|
||||
box-shadow:
|
||||
0 22px 60px rgba(16, 73, 44, 0.16),
|
||||
inset 0 1px 0 rgba(255, 255, 255, 0.72);
|
||||
-webkit-backdrop-filter: blur(16px) saturate(170%);
|
||||
backdrop-filter: blur(16px) saturate(170%);
|
||||
padding: clamp(1rem, 1.2vw, 1.5rem);
|
||||
}
|
||||
|
||||
.surface-card {
|
||||
border: 1px solid color-mix(in oklab, var(--color-base-content) 10%, var(--color-base-100));
|
||||
background: linear-gradient(
|
||||
160deg,
|
||||
color-mix(in oklab, var(--color-base-100) 90%, white),
|
||||
color-mix(in oklab, var(--color-base-200) 86%, white)
|
||||
);
|
||||
box-shadow: 0 20px 48px color-mix(in oklab, var(--color-primary) 14%, transparent);
|
||||
border: 1px solid color-mix(in oklab, var(--color-base-content) 12%, white);
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
box-shadow:
|
||||
0 16px 36px rgba(24, 66, 44, 0.1),
|
||||
0 1px 0 rgba(255, 255, 255, 0.62) inset;
|
||||
}
|
||||
|
||||
.fregat-header-glass {
|
||||
@@ -76,12 +121,12 @@ body {
|
||||
.fregat-header-backdrop {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
height: 300%;
|
||||
height: 350%;
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
-webkit-backdrop-filter: blur(16px) saturate(180%);
|
||||
backdrop-filter: blur(16px) saturate(180%);
|
||||
-webkit-mask-image: linear-gradient(to bottom, black 0%, black 22%, rgba(0, 0, 0, 0.35) 46%, rgba(0, 0, 0, 0.1) 70%, transparent 100%);
|
||||
mask-image: linear-gradient(to bottom, black 0%, black 22%, rgba(0, 0, 0, 0.35) 46%, rgba(0, 0, 0, 0.1) 70%, transparent 100%);
|
||||
-webkit-mask-image: linear-gradient(to bottom, black 0%, black 20%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.1) 65%, transparent 100%);
|
||||
mask-image: linear-gradient(to bottom, black 0%, black 20%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0.1) 65%, transparent 100%);
|
||||
pointer-events: none;
|
||||
z-index: 0;
|
||||
}
|
||||
@@ -100,13 +145,13 @@ body {
|
||||
.fregat-pill-glass {
|
||||
position: relative;
|
||||
isolation: isolate;
|
||||
background: rgba(255, 255, 255, 0.16);
|
||||
border: 1px solid rgba(255, 255, 255, 0.22);
|
||||
background: rgba(255, 255, 255, 0.12);
|
||||
border: 1px solid rgba(255, 255, 255, 0.16);
|
||||
-webkit-backdrop-filter: blur(20px) saturate(180%);
|
||||
backdrop-filter: blur(20px) saturate(180%);
|
||||
box-shadow:
|
||||
0 8px 32px rgba(31, 38, 135, 0.16),
|
||||
inset 0 4px 20px rgba(255, 255, 255, 0.2);
|
||||
0 8px 32px rgba(31, 38, 135, 0.2),
|
||||
inset 0 4px 20px rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
.fregat-pill-glass::after {
|
||||
@@ -119,8 +164,8 @@ body {
|
||||
box-shadow:
|
||||
inset -10px -8px 0 -11px rgba(255, 255, 255, 1),
|
||||
inset 0 -9px 0 -8px rgba(255, 255, 255, 1);
|
||||
opacity: 0.35;
|
||||
filter: blur(1px) brightness(112%);
|
||||
opacity: 0.45;
|
||||
filter: blur(1px) brightness(115%);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@@ -129,7 +174,6 @@ body {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.fregat-pill-left,
|
||||
.fregat-pill-right {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
@@ -138,6 +182,10 @@ body {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.fregat-pill-brand {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.lk-nav-link {
|
||||
@apply inline-flex items-center gap-2 rounded-full px-4 py-2 text-sm font-semibold transition-all duration-200;
|
||||
color: color-mix(in oklab, var(--color-base-content) 78%, transparent);
|
||||
@@ -161,7 +209,6 @@ body {
|
||||
}
|
||||
|
||||
.fregat-pill-brand,
|
||||
.fregat-pill-left,
|
||||
.fregat-pill-center,
|
||||
.fregat-pill-right {
|
||||
position: absolute;
|
||||
@@ -172,14 +219,10 @@ body {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.fregat-pill-left {
|
||||
left: 7.25rem;
|
||||
}
|
||||
|
||||
.fregat-pill-center {
|
||||
left: 50%;
|
||||
width: max-content;
|
||||
max-width: min(58vw, 900px);
|
||||
max-width: min(54vw, 900px);
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
@@ -188,10 +231,37 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1023px) {
|
||||
.fregat-pill-brand {
|
||||
padding-inline: 0.75rem;
|
||||
}
|
||||
|
||||
.lk-nav-link {
|
||||
padding-inline: 0.7rem;
|
||||
padding-block: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.product-card-anim {
|
||||
animation: product-card-in 0.55s ease-out both;
|
||||
}
|
||||
|
||||
@keyframes fregat-aurora {
|
||||
0% { background-position: 0% 30%; }
|
||||
50% { background-position: 100% 70%; }
|
||||
100% { background-position: 0% 30%; }
|
||||
}
|
||||
|
||||
@keyframes fregat-float-a {
|
||||
from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
|
||||
to { transform: translate3d(2.5%, 1.8%, 0) scale(1.05); }
|
||||
}
|
||||
|
||||
@keyframes fregat-float-b {
|
||||
from { transform: translate3d(2%, 2%, 0) scale(1.02); }
|
||||
to { transform: translate3d(-2%, -1%, 0) scale(1.06); }
|
||||
}
|
||||
|
||||
@keyframes product-card-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
|
||||
@@ -8,10 +8,6 @@ type NavItem = {
|
||||
const route = useRoute();
|
||||
const { totalItems } = useClientCart();
|
||||
|
||||
const leftCapsule: NavItem[] = [
|
||||
{ to: '/profile', label: 'Профиль', icon: 'user' },
|
||||
];
|
||||
|
||||
const centerCapsule: NavItem[] = [
|
||||
{ to: '/products', label: 'Каталог', icon: 'grid' },
|
||||
{ to: '/orders', label: 'Мои заказы', icon: 'stack' },
|
||||
@@ -19,6 +15,7 @@ const centerCapsule: NavItem[] = [
|
||||
|
||||
const rightCapsule: NavItem[] = [
|
||||
{ to: '/cart', label: 'Корзина', icon: 'cart' },
|
||||
{ to: '/profile', label: 'Профиль', icon: 'user' },
|
||||
];
|
||||
|
||||
function isActive(path: string) {
|
||||
@@ -37,25 +34,12 @@ function isActive(path: string) {
|
||||
<div class="fregat-header-row relative flex min-h-[3rem] items-center">
|
||||
<NuxtLink
|
||||
to="/"
|
||||
class="fregat-pill-glass fregat-pill-shell fregat-pill-brand hidden items-center rounded-full px-4 py-2 text-sm font-extrabold text-base-content lg:inline-flex"
|
||||
class="fregat-pill-glass fregat-pill-shell fregat-pill-brand inline-flex items-center gap-2 rounded-full px-4 py-2 text-sm font-extrabold text-base-content"
|
||||
>
|
||||
<span class="inline-flex h-2.5 w-2.5 rounded-full bg-[#139957]" />
|
||||
Fregat
|
||||
</NuxtLink>
|
||||
|
||||
<div class="fregat-pill-glass fregat-pill-shell fregat-pill-left flex min-w-0 items-center gap-1 rounded-full p-1 lg:absolute lg:left-0 lg:w-auto">
|
||||
<NuxtLink
|
||||
v-for="item in leftCapsule"
|
||||
:key="item.to"
|
||||
:to="item.to"
|
||||
:class="['lk-nav-link', { 'lk-nav-link-active': isActive(item.to) }]"
|
||||
>
|
||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none">
|
||||
<path d="M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4Zm0 2c-4.42 0-8 2.24-8 5v1h16v-1c0-2.76-3.58-5-8-5Z" fill="currentColor" />
|
||||
</svg>
|
||||
{{ item.label }}
|
||||
</NuxtLink>
|
||||
</div>
|
||||
|
||||
<div class="fregat-pill-glass fregat-pill-shell fregat-pill-center flex min-w-0 flex-1 items-center gap-1 rounded-full p-1 lg:absolute lg:left-1/2 lg:w-auto lg:-translate-x-1/2">
|
||||
<NuxtLink
|
||||
v-for="item in centerCapsule"
|
||||
@@ -80,10 +64,13 @@ function isActive(path: string) {
|
||||
:to="item.to"
|
||||
:class="['lk-nav-link', { 'lk-nav-link-active': isActive(item.to) }]"
|
||||
>
|
||||
<svg class="h-4 w-4" viewBox="0 0 24 24" fill="none">
|
||||
<svg v-if="item.icon === 'cart'" class="h-4 w-4" viewBox="0 0 24 24" fill="none">
|
||||
<path d="M7 4h-2l-1 2v2h1l2.2 9h10.6l2.2-7H8.3L7.8 8H21V6h-12l-1-2Zm2 16a2 2 0 1 0 0 .01V20Zm8 0a2 2 0 1 0 0 .01V20Z" fill="currentColor" />
|
||||
</svg>
|
||||
{{ item.label }}
|
||||
<svg v-else class="h-4 w-4" viewBox="0 0 24 24" fill="none">
|
||||
<path d="M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4Zm0 2c-4.42 0-8 2.24-8 5v1h16v-1c0-2.76-3.58-5-8-5Z" fill="currentColor" />
|
||||
</svg>
|
||||
<span class="hidden sm:inline">{{ item.label }}</span>
|
||||
<span v-if="item.to === '/cart' && totalItems > 0" class="badge badge-sm border-0 bg-[#139957] text-white">
|
||||
{{ totalItems }}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user