Add admin panel, cart, checkout, and digital key delivery
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+334
-18
@@ -87,6 +87,21 @@ main,
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.cart-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 1.4rem;
|
||||
height: 1.4rem;
|
||||
margin-left: 0.25rem;
|
||||
padding: 0 0.35rem;
|
||||
border-radius: 999px;
|
||||
background: var(--accent-hot);
|
||||
color: #fff;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.hero {
|
||||
min-height: calc(100svh - 72px);
|
||||
display: grid;
|
||||
@@ -154,6 +169,12 @@ main,
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.btn:disabled {
|
||||
opacity: 0.45;
|
||||
cursor: not-allowed;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: var(--ink);
|
||||
color: #f4faf6;
|
||||
@@ -172,6 +193,11 @@ main,
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.btn-tiny {
|
||||
padding: 0.4rem 0.75rem;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.hero-visual {
|
||||
position: relative;
|
||||
min-height: min(62vh, 560px);
|
||||
@@ -181,7 +207,6 @@ main,
|
||||
.hero-plane {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border-radius: 0;
|
||||
background:
|
||||
linear-gradient(135deg, rgba(15, 122, 76, 0.85), rgba(18, 32, 26, 0.92)),
|
||||
repeating-linear-gradient(
|
||||
@@ -216,17 +241,23 @@ main,
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
section {
|
||||
section,
|
||||
.page-section {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: clamp(2.5rem, 6vw, 5rem) clamp(1.2rem, 4vw, 3rem);
|
||||
}
|
||||
|
||||
.page-section.narrow {
|
||||
max-width: 640px;
|
||||
}
|
||||
|
||||
.section-head {
|
||||
margin-bottom: 1.8rem;
|
||||
}
|
||||
|
||||
.section-head h2 {
|
||||
.section-head h2,
|
||||
.section-head h3 {
|
||||
margin: 0 0 0.35rem;
|
||||
font-family: var(--font-display);
|
||||
font-size: clamp(1.8rem, 3vw, 2.4rem);
|
||||
@@ -296,10 +327,15 @@ section {
|
||||
}
|
||||
|
||||
.product-media {
|
||||
display: block;
|
||||
min-height: 140px;
|
||||
background: linear-gradient(135deg, #0f7a4c, #1b4332);
|
||||
}
|
||||
|
||||
.product-media.tall {
|
||||
min-height: 360px;
|
||||
}
|
||||
|
||||
.gradient-mint .product-media {
|
||||
background: linear-gradient(135deg, #2d6a4f, #95d5b2);
|
||||
}
|
||||
@@ -331,6 +367,11 @@ section {
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
.product-body h3 a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.product-body p {
|
||||
margin: 0;
|
||||
color: var(--ink-soft);
|
||||
@@ -360,6 +401,10 @@ section {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.price.big {
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
|
||||
.steps {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
@@ -416,20 +461,6 @@ section {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.toast {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
bottom: 1.4rem;
|
||||
transform: translateX(-50%);
|
||||
z-index: 20;
|
||||
padding: 0.85rem 1.2rem;
|
||||
border-radius: 999px;
|
||||
background: var(--ink);
|
||||
color: #f4faf6;
|
||||
font-weight: 600;
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
|
||||
.reveal {
|
||||
opacity: 0;
|
||||
transform: translateY(18px);
|
||||
@@ -446,6 +477,280 @@ section {
|
||||
color: var(--ink-soft);
|
||||
}
|
||||
|
||||
.back-link {
|
||||
display: inline-block;
|
||||
margin-bottom: 1.2rem;
|
||||
color: var(--ink-soft);
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.product-layout {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 2rem;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.product-info h1 {
|
||||
margin: 0 0 0.8rem;
|
||||
font-family: var(--font-display);
|
||||
font-size: clamp(1.8rem, 4vw, 2.6rem);
|
||||
letter-spacing: -0.03em;
|
||||
}
|
||||
|
||||
.lead {
|
||||
font-size: 1.05rem;
|
||||
color: var(--ink-soft);
|
||||
}
|
||||
|
||||
.stock-line {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.buy-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 1rem;
|
||||
align-items: center;
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.inline-form {
|
||||
display: inline-flex;
|
||||
gap: 0.5rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.qty-label {
|
||||
display: inline-flex;
|
||||
gap: 0.4rem;
|
||||
align-items: center;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
input[type="number"],
|
||||
input[type="email"],
|
||||
input[type="text"],
|
||||
input[type="password"],
|
||||
textarea,
|
||||
select {
|
||||
width: 100%;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 12px;
|
||||
padding: 0.7rem 0.85rem;
|
||||
font: inherit;
|
||||
background: rgba(255, 255, 255, 0.7);
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.inline-form input[type="number"] {
|
||||
width: 4.5rem;
|
||||
}
|
||||
|
||||
.stack-form {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.stack-form label {
|
||||
display: grid;
|
||||
gap: 0.4rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.stack-form .check {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.55rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.stack-form .check input {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.table-wrap {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.data-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
background: var(--surface);
|
||||
}
|
||||
|
||||
.data-table th,
|
||||
.data-table td {
|
||||
text-align: left;
|
||||
padding: 0.85rem 0.75rem;
|
||||
border-bottom: 1px solid var(--line);
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.data-table th {
|
||||
font-size: 0.85rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
color: var(--ink-soft);
|
||||
}
|
||||
|
||||
.muted {
|
||||
color: var(--ink-soft);
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.cart-summary {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.checkout-list {
|
||||
list-style: none;
|
||||
margin: 0 0 1.2rem;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.checkout-list li {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
padding: 0.7rem 0;
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.flash {
|
||||
padding: 0.85rem 1rem;
|
||||
border-radius: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.flash.error {
|
||||
background: rgba(232, 93, 4, 0.12);
|
||||
color: #9a3412;
|
||||
}
|
||||
|
||||
.flash.ok {
|
||||
background: rgba(15, 122, 76, 0.12);
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.order-item {
|
||||
margin: 1.2rem 0;
|
||||
padding: 1rem 0;
|
||||
border-top: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.codes pre,
|
||||
pre.codes {
|
||||
margin: 0.5rem 0 0;
|
||||
padding: 0.9rem 1rem;
|
||||
border-radius: 12px;
|
||||
background: #12201a;
|
||||
color: #e8efe9;
|
||||
overflow-x: auto;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
.admin-body {
|
||||
background:
|
||||
radial-gradient(900px 500px at 0% 0%, #c8e6d3 0%, transparent 50%),
|
||||
linear-gradient(165deg, #e8efe9, #d5e2d8);
|
||||
}
|
||||
|
||||
.admin-shell {
|
||||
display: grid;
|
||||
grid-template-columns: 220px 1fr;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.admin-nav {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.85rem;
|
||||
padding: 1.4rem 1.1rem;
|
||||
border-right: 1px solid var(--line);
|
||||
background: rgba(255, 255, 255, 0.35);
|
||||
}
|
||||
|
||||
.admin-nav a {
|
||||
color: var(--ink);
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.admin-main {
|
||||
padding: 1.5rem clamp(1rem, 3vw, 2rem);
|
||||
}
|
||||
|
||||
.admin-login {
|
||||
margin-top: 12vh;
|
||||
}
|
||||
|
||||
.admin-stats {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 1rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.stat {
|
||||
padding: 1rem;
|
||||
border-top: 2px solid var(--ink);
|
||||
background: var(--surface);
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
display: block;
|
||||
color: var(--ink-soft);
|
||||
font-size: 0.85rem;
|
||||
margin-bottom: 0.35rem;
|
||||
}
|
||||
|
||||
.stat strong {
|
||||
font-family: var(--font-display);
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.row-head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: end;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.section-head.compact {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.6rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.actions a,
|
||||
.linkish {
|
||||
color: var(--accent);
|
||||
background: none;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
font: inherit;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.logout-form {
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
@keyframes rise {
|
||||
from {
|
||||
opacity: 0;
|
||||
@@ -473,8 +778,14 @@ section {
|
||||
}
|
||||
|
||||
@media (max-width: 960px) {
|
||||
.hero {
|
||||
.hero,
|
||||
.product-layout,
|
||||
.admin-shell,
|
||||
.admin-stats {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.hero {
|
||||
min-height: auto;
|
||||
}
|
||||
|
||||
@@ -489,6 +800,11 @@ section {
|
||||
.steps {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
|
||||
.admin-nav {
|
||||
border-right: 0;
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
|
||||
@@ -1,24 +1,4 @@
|
||||
(() => {
|
||||
const toast = document.getElementById("toast");
|
||||
let toastTimer;
|
||||
|
||||
const showToast = (message) => {
|
||||
if (!toast) return;
|
||||
toast.hidden = false;
|
||||
toast.textContent = message;
|
||||
clearTimeout(toastTimer);
|
||||
toastTimer = setTimeout(() => {
|
||||
toast.hidden = true;
|
||||
}, 2600);
|
||||
};
|
||||
|
||||
document.querySelectorAll("[data-buy]").forEach((button) => {
|
||||
button.addEventListener("click", () => {
|
||||
const slug = button.getAttribute("data-buy");
|
||||
showToast(`«${slug}» — оплата скоро будет подключена`);
|
||||
});
|
||||
});
|
||||
|
||||
const reveals = document.querySelectorAll(".reveal");
|
||||
if ("IntersectionObserver" in window) {
|
||||
const observer = new IntersectionObserver(
|
||||
|
||||
Reference in New Issue
Block a user