feat: major update - MySQL, chat, wishlist, PWA, admin overhaul
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=Source+Sans+3:wght@300;400;600&display=swap');
|
||||
|
||||
:root {
|
||||
--bg-1: #f8f5f2;
|
||||
@@ -12,17 +11,27 @@
|
||||
--accent: #b49acb;
|
||||
--accent-2: #91a8d0;
|
||||
--shadow: 0 20px 50px rgba(33, 33, 40, 0.12);
|
||||
--radius: 14px;
|
||||
--radius: 8px;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Hide scrollbar but keep scroll functionality */
|
||||
html {
|
||||
scrollbar-width: none; /* Firefox */
|
||||
}
|
||||
|
||||
html::-webkit-scrollbar {
|
||||
display: none; /* Chrome, Safari, Edge */
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
min-height: 100vh;
|
||||
font-family: 'Source Sans 3', sans-serif;
|
||||
font-family: 'KaiTi', 'STKaiti', '楷体', '楷体_GB2312', serif;
|
||||
font-size: 18px;
|
||||
color: var(--text);
|
||||
background: radial-gradient(circle at top, var(--bg-2), transparent 60%),
|
||||
radial-gradient(circle at 10% 20%, var(--bg-3), transparent 55%),
|
||||
@@ -33,7 +42,7 @@ h1,
|
||||
h2,
|
||||
h3,
|
||||
h4 {
|
||||
font-family: 'Playfair Display', serif;
|
||||
font-family: 'KaiTi', 'STKaiti', '楷体', '楷体_GB2312', serif;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@@ -96,7 +105,7 @@ p {
|
||||
padding: 36px 32px 28px;
|
||||
background: var(--glass-strong);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 20px;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 24px 60px rgba(33, 33, 40, 0.22);
|
||||
backdrop-filter: blur(20px);
|
||||
text-align: center;
|
||||
@@ -112,7 +121,7 @@ p {
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
padding: 4px 8px;
|
||||
border-radius: 8px;
|
||||
border-radius: 5px;
|
||||
line-height: 1;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
@@ -128,19 +137,19 @@ p {
|
||||
justify-content: center;
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border-radius: 16px;
|
||||
border-radius: 10px;
|
||||
background: linear-gradient(135deg, var(--accent), var(--accent-2));
|
||||
color: white;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.admin-modal h3 {
|
||||
font-size: 20px;
|
||||
font-size: 22px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.admin-modal-hint {
|
||||
font-size: 13px;
|
||||
font-size: 15px;
|
||||
color: var(--muted);
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
@@ -148,11 +157,11 @@ p {
|
||||
.admin-modal-input {
|
||||
width: 100%;
|
||||
padding: 12px 16px;
|
||||
border-radius: 12px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--line);
|
||||
background: rgba(255, 255, 255, 0.65);
|
||||
font-family: 'Source Sans 3', sans-serif;
|
||||
font-size: 15px;
|
||||
font-family: 'KaiTi', 'STKaiti', '楷体', '楷体_GB2312', serif;
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
letter-spacing: 2px;
|
||||
outline: none;
|
||||
@@ -165,7 +174,7 @@ p {
|
||||
}
|
||||
|
||||
.admin-modal-error {
|
||||
font-size: 13px;
|
||||
font-size: 15px;
|
||||
color: #d4566a;
|
||||
margin-top: 8px;
|
||||
}
|
||||
@@ -174,7 +183,7 @@ p {
|
||||
width: 100%;
|
||||
margin-top: 16px;
|
||||
padding: 12px;
|
||||
font-size: 15px;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.admin-modal-btn:disabled {
|
||||
@@ -209,19 +218,19 @@ p {
|
||||
}
|
||||
|
||||
.brand h1 {
|
||||
font-size: 26px;
|
||||
font-size: 28px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.brand p {
|
||||
color: var(--muted);
|
||||
font-size: 14px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.brand-mark {
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
border-radius: 16px;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
border: 1px solid rgba(255, 255, 255, 0.6);
|
||||
background: var(--glass-strong);
|
||||
@@ -273,14 +282,14 @@ p {
|
||||
justify-content: center;
|
||||
background: linear-gradient(135deg, var(--accent), var(--accent-2));
|
||||
color: white;
|
||||
font-size: 13px;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.user-name {
|
||||
font-size: 13px;
|
||||
font-size: 17px;
|
||||
color: var(--text);
|
||||
font-weight: 500;
|
||||
font-weight: 700;
|
||||
max-width: 100px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -291,12 +300,12 @@ p {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 10px 18px;
|
||||
border-radius: 12px;
|
||||
border-radius: 8px;
|
||||
background: linear-gradient(135deg, var(--accent), var(--accent-2));
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
font-family: 'Source Sans 3', sans-serif;
|
||||
font-size: 14px;
|
||||
font-family: 'KaiTi', 'STKaiti', '楷体', '楷体_GB2312', serif;
|
||||
font-size: 17px;
|
||||
box-shadow: 0 10px 30px rgba(145, 168, 208, 0.35);
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
@@ -308,9 +317,9 @@ p {
|
||||
button {
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font-family: 'Source Sans 3', sans-serif;
|
||||
font-family: 'KaiTi', 'STKaiti', '楷体', '楷体_GB2312', serif;
|
||||
padding: 10px 18px;
|
||||
border-radius: 12px;
|
||||
border-radius: 8px;
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
@@ -328,6 +337,8 @@ button.ghost {
|
||||
background: rgba(255, 255, 255, 0.6);
|
||||
color: var(--text);
|
||||
border: 1px solid var(--line);
|
||||
font-size: 17px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
@@ -362,15 +373,15 @@ button.ghost {
|
||||
.footer-logo {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 8px;
|
||||
border-radius: 5px;
|
||||
object-fit: contain;
|
||||
border: 1px solid rgba(255, 255, 255, 0.5);
|
||||
box-shadow: 0 4px 12px rgba(33, 33, 40, 0.1);
|
||||
}
|
||||
|
||||
.footer-title {
|
||||
font-family: 'Playfair Display', serif;
|
||||
font-size: 17px;
|
||||
font-family: 'KaiTi', 'STKaiti', '楷体', '楷体_GB2312', serif;
|
||||
font-size: 19px;
|
||||
font-weight: 600;
|
||||
color: var(--text);
|
||||
letter-spacing: 0.5px;
|
||||
@@ -398,10 +409,10 @@ button.ghost {
|
||||
gap: 6px;
|
||||
color: var(--accent-2);
|
||||
text-decoration: none;
|
||||
font-size: 13px;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
padding: 5px 12px;
|
||||
border-radius: 8px;
|
||||
border-radius: 5px;
|
||||
background: rgba(145, 168, 208, 0.08);
|
||||
transition: background 0.2s ease, color 0.2s ease;
|
||||
}
|
||||
@@ -415,11 +426,11 @@ button.ghost {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 13px;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: var(--accent);
|
||||
padding: 5px 12px;
|
||||
border-radius: 8px;
|
||||
border-radius: 5px;
|
||||
background: rgba(180, 154, 203, 0.08);
|
||||
}
|
||||
|
||||
@@ -429,7 +440,7 @@ button.ghost {
|
||||
}
|
||||
|
||||
.footer-copy {
|
||||
font-size: 12px;
|
||||
font-size: 14px;
|
||||
color: var(--muted);
|
||||
opacity: 0.7;
|
||||
letter-spacing: 0.3px;
|
||||
@@ -456,7 +467,7 @@ button.ghost {
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
padding: 18px;
|
||||
border-radius: 14px;
|
||||
border-radius: 8px;
|
||||
background: var(--glass-strong);
|
||||
border: 1px solid var(--line);
|
||||
box-shadow: 0 12px 30px rgba(33, 33, 40, 0.1);
|
||||
@@ -467,7 +478,7 @@ button.ghost {
|
||||
width: 100%;
|
||||
height: 140px;
|
||||
object-fit: cover;
|
||||
border-radius: 12px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.product-meta {
|
||||
@@ -489,11 +500,11 @@ button.ghost {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
padding: 8px 14px;
|
||||
border-radius: 10px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.6);
|
||||
background: rgba(255, 255, 255, 0.6);
|
||||
color: var(--text);
|
||||
font-size: 13px;
|
||||
font-size: 15px;
|
||||
transition: background 0.2s ease;
|
||||
}
|
||||
|
||||
@@ -503,8 +514,8 @@ button.ghost {
|
||||
|
||||
.badge {
|
||||
padding: 4px 10px;
|
||||
border-radius: 10px;
|
||||
font-size: 12px;
|
||||
border-radius: 6px;
|
||||
font-size: 14px;
|
||||
background: rgba(255, 255, 255, 0.7);
|
||||
}
|
||||
|
||||
@@ -524,7 +535,7 @@ button.ghost {
|
||||
width: 100%;
|
||||
height: 360px;
|
||||
object-fit: cover;
|
||||
border-radius: 16px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.detail-actions {
|
||||
@@ -537,7 +548,7 @@ button.ghost {
|
||||
background: linear-gradient(135deg, var(--accent), var(--accent-2));
|
||||
color: white;
|
||||
padding: 12px 22px;
|
||||
border-radius: 12px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.form-field {
|
||||
@@ -549,11 +560,11 @@ button.ghost {
|
||||
|
||||
.form-field input,
|
||||
.form-field textarea {
|
||||
border-radius: 14px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--line);
|
||||
background: rgba(255, 255, 255, 0.7);
|
||||
padding: 10px 12px;
|
||||
font-family: 'Source Sans 3', sans-serif;
|
||||
font-family: 'KaiTi', 'STKaiti', '楷体', '楷体_GB2312', serif;
|
||||
}
|
||||
|
||||
.form-field textarea {
|
||||
@@ -576,7 +587,7 @@ button.ghost {
|
||||
.table td {
|
||||
text-align: left;
|
||||
padding: 12px;
|
||||
font-size: 14px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.table tr {
|
||||
@@ -584,12 +595,12 @@ button.ghost {
|
||||
}
|
||||
|
||||
.tag {
|
||||
font-size: 12px;
|
||||
font-size: 14px;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.markdown {
|
||||
font-size: 13px;
|
||||
font-size: 15px;
|
||||
color: var(--muted);
|
||||
line-height: 1.6;
|
||||
display: -webkit-box;
|
||||
@@ -600,19 +611,86 @@ button.ghost {
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.app-body {
|
||||
padding: 18px 4vw 28px;
|
||||
padding: 12px 2vw 20px;
|
||||
}
|
||||
|
||||
/* ── Navigation: keep everything on one row, compress ── */
|
||||
.top-bar {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
padding: 14px 4vw;
|
||||
gap: 12px;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 8px 3vw;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.brand {
|
||||
gap: 8px;
|
||||
flex-shrink: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.brand h1 {
|
||||
font-size: 16px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.brand-mark {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.top-actions {
|
||||
gap: 3px;
|
||||
flex-shrink: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Compress nav buttons on mobile */
|
||||
button.ghost {
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
padding: 5px 7px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.login-btn {
|
||||
font-size: 12px;
|
||||
padding: 5px 8px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.user-badge {
|
||||
padding: 3px 6px 3px 4px;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.user-name {
|
||||
font-size: 12px;
|
||||
max-width: 50px;
|
||||
}
|
||||
|
||||
.user-avatar {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.wishlist-icon {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.wishlist-badge {
|
||||
min-width: 14px;
|
||||
height: 14px;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
/* ── Product grid: tighter ── */
|
||||
.grid {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 14px;
|
||||
gap: 10px;
|
||||
padding: 0 2px;
|
||||
}
|
||||
|
||||
.admin-grid {
|
||||
@@ -628,27 +706,97 @@ button.ghost {
|
||||
}
|
||||
|
||||
.footer {
|
||||
padding: 20px 18px;
|
||||
padding: 20px 14px;
|
||||
}
|
||||
|
||||
.footer-links {
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px 16px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.page-card {
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
.product-card {
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.product-card {
|
||||
padding: 10px 8px;
|
||||
}
|
||||
|
||||
.product-card img {
|
||||
height: 120px;
|
||||
height: 110px;
|
||||
}
|
||||
|
||||
.markdown {
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Wishlist navigation ── */
|
||||
.wishlist-nav {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.wishlist-icon {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.wishlist-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 18px;
|
||||
height: 18px;
|
||||
padding: 0 4px;
|
||||
border-radius: 999px;
|
||||
background: linear-gradient(135deg, var(--accent), var(--accent-2));
|
||||
color: #fff;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
/* PWA update toast */
|
||||
.pwa-update-toast {
|
||||
position: fixed;
|
||||
bottom: 80px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 9999;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 10px 18px;
|
||||
border-radius: 24px;
|
||||
background: #1a1a1a;
|
||||
color: #fff;
|
||||
font-size: 13px;
|
||||
box-shadow: 0 4px 24px rgba(0,0,0,0.25);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.pwa-update-toast button {
|
||||
background: #4ade80;
|
||||
color: #111;
|
||||
border: none;
|
||||
border-radius: 12px;
|
||||
padding: 4px 14px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.pwa-toast-enter-active,
|
||||
.pwa-toast-leave-active {
|
||||
transition: opacity 0.3s, transform 0.3s;
|
||||
}
|
||||
|
||||
.pwa-toast-enter-from,
|
||||
.pwa-toast-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateX(-50%) translateY(16px);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user