From 4f8edce1cf2d0631f4deb516376587e77f497424 Mon Sep 17 00:00:00 2001 From: yml Date: Mon, 16 Nov 2026 20:03:00 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20=E6=8B=86=E5=88=86=E5=8F=8C?= =?UTF-8?q?=E7=AB=99=E7=82=B9=E5=93=81=E7=89=8C=E4=B8=8E=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/InAppBrowserPrompt.vue | 4 +- .../components/AnnouncementPopup.vue | 47 ++--- .../views/AnnouncementDetailView.vue | 6 +- .../announcement/views/AnnouncementsView.vue | 8 +- .../views/MobileAnnouncementDetailView.vue | 16 +- .../views/MobileAnnouncementsView.vue | 32 ++-- .../src/features/auth/views/LoginView.vue | 106 ++++++------ .../features/auth/views/MobileLoginView.vue | 32 ++-- .../auth/views/MobileNotificationsView.vue | 18 +- .../features/auth/views/MobileProfileView.css | 22 +-- .../features/auth/views/MobileProfileView.vue | 4 +- .../auth/views/MobileRegisterView.vue | 63 +++---- .../auth/views/PostRentalNoticeView.vue | 8 +- .../src/features/auth/views/ProfileView.vue | 38 ++--- .../src/features/auth/views/RealnameView.vue | 44 ++--- .../benefits/views/BenefitsCenterView.vue | 42 ++--- .../views/MobileBenefitsCenterView.vue | 4 +- .../chats/components/NotificationSettings.vue | 6 +- .../src/features/chats/views/ChatView.vue | 4 +- .../src/features/chats/views/MessagesView.vue | 36 ++-- .../chats/views/MobileMessagesView.vue | 4 +- .../guide/views/MobileAddHomeGuideView.vue | 31 ++-- .../invitation/views/UserInvitationView.vue | 124 +++++++------- .../listings/components/HomeBanner.vue | 14 +- .../listings/components/HomeStats.vue | 4 +- .../listings/components/HomeZones.vue | 10 +- .../listings/components/ListingCard.vue | 50 +++--- .../src/features/listings/views/HomeView.vue | 134 ++++++++++++--- .../listings/views/ListingCollectionsView.vue | 8 +- .../listings/views/ListingDetailView.css | 160 +++++++++--------- .../listings/views/MobileHomeFilterSheet.vue | 18 +- .../listings/views/MobileHomeView.css | 154 +++++++++++------ .../listings/views/MobileHomeView.vue | 19 ++- .../views/MobileListingCollectionsView.vue | 4 +- .../views/MobileListingDetailView.css | 124 +++++++------- .../mohong/components/MohongCartPanel.vue | 21 ++- .../mohong/components/MohongProductCard.vue | 12 +- .../mohong/views/MobileMohongDetailView.vue | 22 ++- .../mohong/views/MobileMohongListView.vue | 22 +-- .../views/MobileMohongOrderDetailView.vue | 12 +- .../mohong/views/MobileMohongOrdersView.vue | 4 +- .../mohong/views/MohongDetailView.vue | 38 ++--- .../features/mohong/views/MohongListView.vue | 30 ++-- .../mohong/views/MohongOrderDetailView.vue | 30 ++-- .../mohong/views/MohongOrdersView.vue | 22 +-- .../components/CheckoutTrialPreview.vue | 6 +- .../components/MobilePayWaySelectPopup.vue | 4 +- .../components/MobilePaymentCashierPopup.vue | 6 +- .../components/OrderAccountSnapshot.vue | 8 +- .../components/OrderCheckoutSummary.vue | 10 +- .../components/OrderHandoffTimeline.vue | 8 +- .../components/OrderResourceUsageEditor.vue | 22 +-- .../orders/components/PayWaySelectDialog.vue | 2 +- .../orders/views/MobileOrderDetailView.css | 16 +- .../orders/views/MobileOrdersView.vue | 4 +- .../features/orders/views/OrderDetailView.css | 32 ++-- .../src/features/orders/views/OrdersView.css | 70 ++++---- .../features/points/views/PointsMallView.vue | 40 ++--- .../QualityOwnerAgreementContent.vue | 2 +- .../views/MobileSellerListingCreateView.css | 68 ++++---- .../views/MobileSellerListingCreateView.vue | 4 +- .../views/MobileSellerListingDetailView.vue | 16 +- .../seller/views/MobileSellerListingsView.vue | 16 +- .../seller/views/SellerListingCreateView.css | 28 +-- .../seller/views/SellerListingDetailView.vue | 20 +-- .../seller/views/SellerListingsView.vue | 24 +-- .../seller/views/components/OptionChips.vue | 4 +- .../components/PaymentAccountDialog.vue | 10 +- .../wallet/views/PaymentAccountsView.vue | 2 +- .../src/features/wallet/views/WalletView.vue | 8 +- frontend/src/layouts/AppLayout.css | 106 +++++++----- frontend/src/layouts/AppLayout.vue | 11 +- frontend/src/main.ts | 15 +- .../shared/components/business/AuthImage.vue | 2 +- frontend/src/sites/SiteBrandLogo.vue | 40 +++++ frontend/src/sites/SiteMobileBottomNav.vue | 17 ++ .../dachui}/MobileBottomNav.vue | 38 ++--- frontend/src/sites/dachui/index.ts | 17 ++ frontend/src/sites/dachui/theme.css | 20 +++ frontend/src/sites/index.ts | 19 +++ frontend/src/sites/jieyou/MobileBottomNav.vue | 144 ++++++++++++++++ frontend/src/sites/jieyou/assets/favicon.svg | 8 + .../src/sites/jieyou/assets/logo-dark.svg | 10 ++ .../src/sites/jieyou/assets/logo-jieyou.png | Bin 0 -> 5527 bytes .../src/sites/jieyou/assets/logo-light.svg | 10 ++ .../src/sites/jieyou/assets/logo-seal.svg | 8 + frontend/src/sites/jieyou/index.ts | 25 +++ frontend/src/sites/jieyou/theme.css | 159 +++++++++++++++++ frontend/src/sites/siteBrand.spec.ts | 18 ++ frontend/src/sites/theme.ts | 15 ++ frontend/src/sites/types.ts | 15 ++ frontend/src/stores/distributionSite.ts | 17 +- frontend/src/styles/base.css | 50 ++++-- frontend/src/styles/home-filters.css | 76 +++++---- frontend/src/styles/pc.css | 12 +- 95 files changed, 1831 insertions(+), 1062 deletions(-) create mode 100644 frontend/src/sites/SiteBrandLogo.vue create mode 100644 frontend/src/sites/SiteMobileBottomNav.vue rename frontend/src/{components => sites/dachui}/MobileBottomNav.vue (89%) create mode 100644 frontend/src/sites/dachui/index.ts create mode 100644 frontend/src/sites/dachui/theme.css create mode 100644 frontend/src/sites/index.ts create mode 100644 frontend/src/sites/jieyou/MobileBottomNav.vue create mode 100644 frontend/src/sites/jieyou/assets/favicon.svg create mode 100644 frontend/src/sites/jieyou/assets/logo-dark.svg create mode 100644 frontend/src/sites/jieyou/assets/logo-jieyou.png create mode 100644 frontend/src/sites/jieyou/assets/logo-light.svg create mode 100644 frontend/src/sites/jieyou/assets/logo-seal.svg create mode 100644 frontend/src/sites/jieyou/index.ts create mode 100644 frontend/src/sites/jieyou/theme.css create mode 100644 frontend/src/sites/siteBrand.spec.ts create mode 100644 frontend/src/sites/theme.ts create mode 100644 frontend/src/sites/types.ts diff --git a/frontend/src/components/InAppBrowserPrompt.vue b/frontend/src/components/InAppBrowserPrompt.vue index 65b632ba..21a5b30a 100644 --- a/frontend/src/components/InAppBrowserPrompt.vue +++ b/frontend/src/components/InAppBrowserPrompt.vue @@ -139,7 +139,7 @@ onMounted(() => { margin: 14px 0 18px; padding: 8px 13px; border-radius: 12px; - background: #f6f8fb; + background: var(--brand-canvas); color: #4b5563; font-size: 12px; line-height: 1.35; @@ -164,7 +164,7 @@ onMounted(() => { width: 100%; min-height: 48px; border: 0; - background: linear-gradient(135deg, #ff7a1a, #ef5b00); + background: linear-gradient(135deg, var(--brand-primary-hover), #ef5b00); color: #fff; font: inherit; font-size: 15px; diff --git a/frontend/src/features/announcement/components/AnnouncementPopup.vue b/frontend/src/features/announcement/components/AnnouncementPopup.vue index 3ded7270..61823db1 100644 --- a/frontend/src/features/announcement/components/AnnouncementPopup.vue +++ b/frontend/src/features/announcement/components/AnnouncementPopup.vue @@ -156,7 +156,12 @@ function handleClose() { width: 100%; height: 4px; flex-shrink: 0; - background: linear-gradient(90deg, #ff7a1a 0%, #ea580c 50%, #f97316 100%); + background: linear-gradient( + 90deg, + var(--brand-primary-hover) 0%, + var(--brand-primary-strong) 50%, + #f97316 100% + ); } /* ===== 头部:雅致浅色顶栏 + 品牌橙徽标 + 标题与标签 ===== */ @@ -180,10 +185,10 @@ function handleClose() { width: 46px; height: 46px; border-radius: 50%; - background: #fff7ed; - border: 1px solid #fed7aa; + background: var(--brand-primary-soft); + border: 1px solid var(--brand-border); box-shadow: 0 2px 8px rgba(234, 88, 12, 0.1); - color: #ea580c; + color: var(--brand-primary-strong); } .popup-icon-svg { @@ -198,7 +203,7 @@ function handleClose() { .popup-title { margin: 0; - color: #0f172a; + color: var(--brand-ink); font-size: 18px; font-weight: 700; line-height: 1.4; @@ -208,7 +213,7 @@ function handleClose() { .popup-subtitle { margin: 4px 0 0; - color: #64748b; + color: var(--brand-muted); font-size: 13px; line-height: 1.4; } @@ -217,10 +222,10 @@ function handleClose() { .popup-badge { flex-shrink: 0; padding: 4px 11px; - border: 1px solid #fed7aa; + border: 1px solid var(--brand-border); border-radius: 999px; - background: #fff7ed; - color: #ea580c; + background: var(--brand-primary-soft); + color: var(--brand-primary-strong); font-size: 12px; font-weight: 600; letter-spacing: 0.3px; @@ -242,7 +247,7 @@ function handleClose() { padding: 20px 22px; border: 1px solid #eef2f6; border-radius: 14px; - background: #f8fafc; + background: var(--brand-canvas); } .popup-content { @@ -261,7 +266,7 @@ function handleClose() { } .popup-content :deep(a) { - color: #ea580c; + color: var(--brand-primary-strong); font-weight: 600; text-decoration: none; } @@ -271,7 +276,7 @@ function handleClose() { } .popup-content :deep(strong) { - color: #0f172a; + color: var(--brand-ink); font-weight: 700; } @@ -279,7 +284,7 @@ function handleClose() { .popup-content :deep(h2), .popup-content :deep(h3) { margin: 18px 0 10px; - color: #0f172a; + color: var(--brand-ink); font-size: 16px; font-weight: 700; line-height: 1.5; @@ -306,7 +311,7 @@ function handleClose() { } .popup-content :deep(li::marker) { - color: #ea580c; + color: var(--brand-primary-strong); } .popup-content :deep(blockquote) { @@ -314,16 +319,16 @@ function handleClose() { padding: 10px 16px; border-left: 3px solid #f97316; border-radius: 0 8px 8px 0; - background: #fff7ed; + background: var(--brand-primary-soft); color: #9a3412; } .popup-content :deep(code) { padding: 2px 6px; - border: 1px solid #fed7aa; + border: 1px solid var(--brand-border); border-radius: 5px; - background: #fff7ed; - color: #ea580c; + background: var(--brand-primary-soft); + color: var(--brand-primary-strong); font-size: 13.5px; } @@ -369,7 +374,11 @@ function handleClose() { min-height: 48px; border: none; border-radius: 12px; - background: linear-gradient(135deg, #ff7a1a 0%, #ea580c 100%); + background: linear-gradient( + 135deg, + var(--brand-primary-hover) 0%, + var(--brand-primary-strong) 100% + ); color: #ffffff; font-size: 15.5px; font-weight: 700; diff --git a/frontend/src/features/announcement/views/AnnouncementDetailView.vue b/frontend/src/features/announcement/views/AnnouncementDetailView.vue index 4ffdfd76..927511da 100644 --- a/frontend/src/features/announcement/views/AnnouncementDetailView.vue +++ b/frontend/src/features/announcement/views/AnnouncementDetailView.vue @@ -142,7 +142,7 @@ function getCategoryLabel(category: string) { border: 1px solid #e2e8f0; border-radius: 10px; background: #ffffff; - color: #64748b; + color: var(--brand-muted); font-size: 14px; font-weight: 700; cursor: pointer; @@ -196,7 +196,7 @@ function getCategoryLabel(category: string) { display: flex; align-items: center; gap: 6px; - color: #64748b; + color: var(--brand-muted); font-size: 14px; } @@ -339,7 +339,7 @@ function getCategoryLabel(category: string) { } .detail-content :deep(table th) { - background: #f8fafc; + background: var(--brand-canvas); font-weight: 700; } diff --git a/frontend/src/features/announcement/views/AnnouncementsView.vue b/frontend/src/features/announcement/views/AnnouncementsView.vue index eac9e911..f045ef5d 100644 --- a/frontend/src/features/announcement/views/AnnouncementsView.vue +++ b/frontend/src/features/announcement/views/AnnouncementsView.vue @@ -22,7 +22,7 @@ const total = ref(0) const activeCategory = ref('') const categories = [ - { value: '', label: '全部', icon: Tickets, color: '#64748b' }, + { value: '', label: '全部', icon: Tickets, color: 'var(--brand-muted)' }, { value: 'notice', label: '通知公告', icon: Bell, color: '#3b82f6' }, { value: 'tutorial', label: '使用教程', icon: Document, color: '#10b981' }, { value: 'rule', label: '规则说明', icon: Warning, color: '#f59e0b' }, @@ -200,8 +200,8 @@ function getCategoryLabel(category: string) { padding: 10px 18px; border: 1px solid #e2e8f0; border-radius: 10px; - background: #f8fafc; - color: #64748b; + background: var(--brand-canvas); + color: var(--brand-muted); font-size: 14px; font-weight: 700; cursor: pointer; @@ -279,7 +279,7 @@ function getCategoryLabel(category: string) { .announcement-preview { margin: 0 0 16px; - color: #64748b; + color: var(--brand-muted); font-size: 14px; line-height: 1.7; } diff --git a/frontend/src/features/announcement/views/MobileAnnouncementDetailView.vue b/frontend/src/features/announcement/views/MobileAnnouncementDetailView.vue index ad68a792..2bd0dbb9 100644 --- a/frontend/src/features/announcement/views/MobileAnnouncementDetailView.vue +++ b/frontend/src/features/announcement/views/MobileAnnouncementDetailView.vue @@ -86,8 +86,8 @@ function getCategoryLabel(category: string) { diff --git a/frontend/src/features/mohong/components/MohongProductCard.vue b/frontend/src/features/mohong/components/MohongProductCard.vue index 514cdb8f..b39e7316 100644 --- a/frontend/src/features/mohong/components/MohongProductCard.vue +++ b/frontend/src/features/mohong/components/MohongProductCard.vue @@ -68,7 +68,7 @@ const stockLabel = computed(() => { .mohong-card:hover { border-color: #ffb27a; - box-shadow: 0 10px 24px rgba(255, 106, 0, 0.12); + box-shadow: 0 10px 24px rgb(var(--brand-primary-rgb) / 0.12); transform: translateY(-2px); } @@ -94,8 +94,8 @@ const stockLabel = computed(() => { justify-content: center; width: 100%; height: 100%; - background: linear-gradient(145deg, #fff7ed, #ffe4cc); - color: #ff6a00; + background: linear-gradient(145deg, var(--brand-primary-soft), #ffe4cc); + color: var(--brand-primary); font-size: 28px; font-weight: 900; } @@ -149,7 +149,7 @@ const stockLabel = computed(() => { } .price strong { - color: #ff6a00; + color: var(--brand-primary); font-size: 18px; font-weight: 800; line-height: 1; @@ -165,13 +165,13 @@ const stockLabel = computed(() => { flex-shrink: 0; padding: 5px 10px; border-radius: 8px; - background: #ff6a00; + background: var(--brand-primary); color: #fff; font-size: 12px; font-weight: 700; } .mohong-card:hover .buy { - background: #ea580c; + background: var(--brand-primary-strong); } diff --git a/frontend/src/features/mohong/views/MobileMohongDetailView.vue b/frontend/src/features/mohong/views/MobileMohongDetailView.vue index 34403db4..feb831cd 100644 --- a/frontend/src/features/mohong/views/MobileMohongDetailView.vue +++ b/frontend/src/features/mohong/views/MobileMohongDetailView.vue @@ -187,12 +187,18 @@ async function handleBuy() {
合计 ¥{{ totalPrice }}
- + 加购 - + @@ -335,11 +335,11 @@ async function handleSupportClick() { .orders-btn { border: 0; background: transparent; - color: #17233d; + color: var(--brand-ink); flex-shrink: 0; } .orders-btn { - color: #ff6a00; + color: var(--brand-primary); font-size: 14px; font-weight: 600; } @@ -362,7 +362,7 @@ async function handleSupportClick() { outline: none; background: transparent; font-size: 14px; - color: #17233d; + color: var(--brand-ink); } .shop-body { flex: 1; @@ -388,15 +388,15 @@ async function handleSupportClick() { border: 0; border-left: 3px solid transparent; background: transparent; - color: #64748b; + color: var(--brand-muted); font-size: 13px; text-align: center; cursor: pointer; } .cat-item.active { background: #fff; - border-left-color: #ff6a00; - color: #ff6a00; + border-left-color: var(--brand-primary); + color: var(--brand-primary); font-weight: 700; } .list-panel { @@ -447,15 +447,15 @@ async function handleSupportClick() { height: 100%; align-items: center; justify-content: center; - background: linear-gradient(145deg, #fff7ed, #ffe4cc); - color: #ff6a00; + background: linear-gradient(145deg, var(--brand-primary-soft), #ffe4cc); + color: var(--brand-primary); font-size: 22px; font-weight: 900; } .info h2 { margin: 0 0 8px; font-size: 15px; - color: #17233d; + color: var(--brand-ink); font-weight: 700; overflow: hidden; text-overflow: ellipsis; diff --git a/frontend/src/features/mohong/views/MobileMohongOrderDetailView.vue b/frontend/src/features/mohong/views/MobileMohongOrderDetailView.vue index 21ce290b..8c478fc0 100644 --- a/frontend/src/features/mohong/views/MobileMohongOrderDetailView.vue +++ b/frontend/src/features/mohong/views/MobileMohongOrderDetailView.vue @@ -158,7 +158,7 @@ async function copyText() { Boolean(snapshot.value)) gap: 4px; padding: 10px 12px; border-radius: 8px; - background: #f8fafc; + background: var(--brand-canvas); } .kv-item span { color: #94a3b8; font-size: 12px; } .kv-item strong { - color: #0f172a; + color: var(--brand-ink); font-size: 13px; font-weight: 600; word-break: break-word; @@ -415,7 +415,7 @@ const hasContent = computed(() => Boolean(snapshot.value)) display: inline-block; padding: 6px 10px; border-radius: 999px; - background: #fff7ed; + background: var(--brand-primary-soft); color: #9a3412; font-size: 12px; margin-bottom: 6px; @@ -497,7 +497,7 @@ const hasContent = computed(() => Boolean(snapshot.value)) } .kv-row em { font-style: normal; - color: #0f172a; + color: var(--brand-ink); text-align: right; word-break: break-word; } diff --git a/frontend/src/features/orders/components/OrderCheckoutSummary.vue b/frontend/src/features/orders/components/OrderCheckoutSummary.vue index d602f162..6b1e3dca 100644 --- a/frontend/src/features/orders/components/OrderCheckoutSummary.vue +++ b/frontend/src/features/orders/components/OrderCheckoutSummary.vue @@ -289,7 +289,7 @@ const checkoutContent = computed(() => splitCheckoutContent(props.order.checkout .summary-row span { font-size: 12px; - color: #64748b; + color: var(--brand-muted); line-height: 1.35; } @@ -323,12 +323,12 @@ const checkoutContent = computed(() => splitCheckoutContent(props.order.checkout .summary-note { margin-top: 4px; padding: 8px 10px; - background: #f8fafc; + background: var(--brand-canvas); border-radius: 6px; } .summary-note.warning { - background: #fff7ed; + background: var(--brand-primary-soft); } .summary-note.system { @@ -338,7 +338,7 @@ const checkoutContent = computed(() => splitCheckoutContent(props.order.checkout .summary-note label { display: block; margin-bottom: 2px; - color: #64748b; + color: var(--brand-muted); font-size: 11px; font-weight: 700; } @@ -370,7 +370,7 @@ const checkoutContent = computed(() => splitCheckoutContent(props.order.checkout padding: 8px 10px; border: 1px solid #eef1f5; border-radius: 6px; - background: #f8fafc; + background: var(--brand-canvas); } .note-block.system { diff --git a/frontend/src/features/orders/components/OrderHandoffTimeline.vue b/frontend/src/features/orders/components/OrderHandoffTimeline.vue index 58d12310..f85b5da1 100644 --- a/frontend/src/features/orders/components/OrderHandoffTimeline.vue +++ b/frontend/src/features/orders/components/OrderHandoffTimeline.vue @@ -141,7 +141,7 @@ const recordEntries = computed(() => width: 7px; height: 7px; border-radius: 50%; - background: #ff6a00; + background: var(--brand-primary); } .timeline-time { @@ -161,7 +161,7 @@ const recordEntries = computed(() => display: grid; gap: 6px; font-size: 13px; - color: #64748b; + color: var(--brand-muted); line-height: 1.55; } @@ -176,7 +176,7 @@ const recordEntries = computed(() => .remark-block { border-color: #e2e8f0; - background: #f8fafc; + background: var(--brand-canvas); } .system-block { @@ -250,7 +250,7 @@ const recordEntries = computed(() => height: 11px; border: 2px solid #ffffff; border-radius: 50%; - background: #ff6a00; + background: var(--brand-primary); } .log-content-wrap { diff --git a/frontend/src/features/orders/components/OrderResourceUsageEditor.vue b/frontend/src/features/orders/components/OrderResourceUsageEditor.vue index 347e45a7..6579b757 100644 --- a/frontend/src/features/orders/components/OrderResourceUsageEditor.vue +++ b/frontend/src/features/orders/components/OrderResourceUsageEditor.vue @@ -319,7 +319,7 @@ function updateNumberField(field: 'coin_consumed_m' | 'otherAmountYuan', event: } .section-header.compact span { - color: #64748b; + color: var(--brand-muted); font-size: 12px; } @@ -364,7 +364,7 @@ function updateNumberField(field: 'coin_consumed_m' | 'otherAmountYuan', event: padding: 2px 8px; border-radius: 999px; background: #f1f5f9; - color: #64748b; + color: var(--brand-muted); font-size: 12px; font-weight: 700; } @@ -400,7 +400,7 @@ function updateNumberField(field: 'coin_consumed_m' | 'otherAmountYuan', event: } .amount-highlight { - color: #ff6a00; + color: var(--brand-primary); font-weight: 700; font-size: 13px; } @@ -444,7 +444,7 @@ function updateNumberField(field: 'coin_consumed_m' | 'otherAmountYuan', event: .checkout-resource-amount { min-width: 72px; text-align: right; - color: #ff6a00; + color: var(--brand-primary); font-weight: 700; font-size: 15px; } @@ -479,7 +479,7 @@ function updateNumberField(field: 'coin_consumed_m' | 'otherAmountYuan', event: } .checkout-number-card.deposit { - border-color: #fed7aa; + border-color: var(--brand-border); background: #fffaf3; } @@ -512,13 +512,13 @@ function updateNumberField(field: 'coin_consumed_m' | 'otherAmountYuan', event: } .checkout-number-card.deposit .checkout-number-title span { - color: #c2410c; + color: var(--brand-primary-strong); background: #ffedd5; } .checkout-number-copy p { margin: 0; - color: #64748b; + color: var(--brand-muted); font-size: 12px; line-height: 1.5; } @@ -576,7 +576,7 @@ function updateNumberField(field: 'coin_consumed_m' | 'otherAmountYuan', event: .checkout-deduct-preview strong, .checkout-fee-preview strong { - color: #ff6a00; + color: var(--brand-primary); font-size: 16px; font-weight: 800; } @@ -723,10 +723,10 @@ function updateNumberField(field: 'coin_consumed_m' | 'otherAmountYuan', event: .deposit-deduct-warning { padding: 8px 10px; - border: 1px solid #fed7aa; + border: 1px solid var(--brand-border); border-radius: 6px; - background: #fff7ed; - color: #c2410c; + background: var(--brand-primary-soft); + color: var(--brand-primary-strong); font-size: 12px; line-height: 1.5; } diff --git a/frontend/src/features/orders/components/PayWaySelectDialog.vue b/frontend/src/features/orders/components/PayWaySelectDialog.vue index 8f8ff347..f8f4b6f3 100644 --- a/frontend/src/features/orders/components/PayWaySelectDialog.vue +++ b/frontend/src/features/orders/components/PayWaySelectDialog.vue @@ -55,7 +55,7 @@ function choose(payWay: PaymentPayWay) { diff --git a/frontend/src/sites/dachui/index.ts b/frontend/src/sites/dachui/index.ts new file mode 100644 index 00000000..11c966d5 --- /dev/null +++ b/frontend/src/sites/dachui/index.ts @@ -0,0 +1,17 @@ +import { defaultStorefrontText } from '@/shared/utils/storefrontText' + +import type { SiteBrand } from '../types' + +export const dachuiSite: SiteBrand = { + key: 'dachui', + name: '大锤商行', + mark: '锤', + themeColor: '#ff6a00', + favicon: '', + storefrontText: defaultStorefrontText, + logos: { + light: '', + dark: '', + seal: '', + }, +} diff --git a/frontend/src/sites/dachui/theme.css b/frontend/src/sites/dachui/theme.css new file mode 100644 index 00000000..e09f100b --- /dev/null +++ b/frontend/src/sites/dachui/theme.css @@ -0,0 +1,20 @@ +:root, +html[data-site='dachui'] { + --brand-primary: #ff6a00; + --brand-primary-rgb: 255 106 0; + --brand-primary-hover: #ff8533; + --brand-primary-light: #ff914d; + --brand-primary-strong: #ff5200; + --brand-primary-soft: #fff3e8; + --brand-on-primary: #ffffff; + --brand-accent: #f59e0b; + --brand-canvas: #f6f8fb; + --brand-surface: #ffffff; + --brand-surface-muted: #f2f5f9; + --brand-ink: #17233d; + --brand-muted: #64748b; + --brand-border: #fed7aa; + --brand-shadow: rgb(255 106 0 / 0.24); + --brand-font-body: Inter, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif; + --brand-font-display: Inter, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif; +} diff --git a/frontend/src/sites/index.ts b/frontend/src/sites/index.ts new file mode 100644 index 00000000..55f8570a --- /dev/null +++ b/frontend/src/sites/index.ts @@ -0,0 +1,19 @@ +import { dachuiSite } from './dachui' +import { jieyouSite } from './jieyou' + +import type { SiteBrand, SiteKey } from './types' + +export const siteBrands: Record = { + dachui: dachuiSite, + jieyou: jieyouSite, +} + +export function resolveSiteKey(tenantCode?: string): SiteKey { + return (tenantCode || '').trim().toLowerCase() === 'jieyou' ? 'jieyou' : 'dachui' +} + +export function siteBrandFor(tenantCode?: string): SiteBrand { + return siteBrands[resolveSiteKey(tenantCode)] +} + +export type { BrandLogoVariant, SiteBrand, SiteKey } from './types' diff --git a/frontend/src/sites/jieyou/MobileBottomNav.vue b/frontend/src/sites/jieyou/MobileBottomNav.vue new file mode 100644 index 00000000..701732cb --- /dev/null +++ b/frontend/src/sites/jieyou/MobileBottomNav.vue @@ -0,0 +1,144 @@ + + + + + diff --git a/frontend/src/sites/jieyou/assets/favicon.svg b/frontend/src/sites/jieyou/assets/favicon.svg new file mode 100644 index 00000000..c18f85f8 --- /dev/null +++ b/frontend/src/sites/jieyou/assets/favicon.svg @@ -0,0 +1,8 @@ + + 解忧商行印章 + 解忧商行方形朱砂印章 + + + 解 + 忧 + diff --git a/frontend/src/sites/jieyou/assets/logo-dark.svg b/frontend/src/sites/jieyou/assets/logo-dark.svg new file mode 100644 index 00000000..a2954ed1 --- /dev/null +++ b/frontend/src/sites/jieyou/assets/logo-dark.svg @@ -0,0 +1,10 @@ + + 解忧商行 + 解忧商行横版 logo,深色背景反白使用 + + + 解 + 忧 + 解忧商行 + JIEYOU TRADING HOUSE + diff --git a/frontend/src/sites/jieyou/assets/logo-jieyou.png b/frontend/src/sites/jieyou/assets/logo-jieyou.png new file mode 100644 index 0000000000000000000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}Qn-Ajkmy z#^L_#Of3N17bRB{cQ(y637JR8p0Mo;kLuuZ#Y~b88n9m2jm~90-{MBiD(p||_20|a zjqX<*9K~!rv~R6#KUdP3r!#XxclIMbI9!NZAjA$RDqFtp?nu+Nt$9?f&Ob_CjIHl< zh22D3e3?Efc{Wj{TzQhc#fQ3)K)6eU18ci`Bl_JUtb&TXkU{Z-k5FFm8{P@mP)q&f zFA7p^EpC8@?Me zag%`Lpe;w2AlfM-h5Ras}3?&m0(iI z(&ut&Zf*dHhxJ1NVyEIjdp`2 zt}XWlY^7Y`ZJl$~X+mAevW;_}{~Pk*S#?tv1Ujsvzh5s2dJ+dd|1^TXky-ePkFe_m zuPBOqs$ug$;P{-Fc0^I8zFSix0K;fztyR@?C;?+k)Ckf1hcv>1rgCvztUS#C6)E zK)%M&5zxJ9#;KlvIXBc8DPplw)>}0d=oxz$@WI+ouc}S0+*#92?X^60sz-HL}!FjB?y(Gq9c3m#&~nS6)!;Y6gccBlh}lq)_l zRL*+SRpwYbkZ3<&qCCs^Z$yDkL(e_K6eGmmY(@0;8J#?Xto!43^YfyE^SpHCd-;?E z+Cv76?$cOR&qfC$q7&MS;MuitGQ5!ekALrj#wlUtv9wo4jnCT1iXt&UtcFU$Eno~z1X71 z50{N^1AMeByGyVG+lqK + 解忧商行 + 解忧商行横版 logo,浅色背景使用 + + + 解 + 忧 + 解忧商行 + JIEYOU TRADING HOUSE + diff --git a/frontend/src/sites/jieyou/assets/logo-seal.svg b/frontend/src/sites/jieyou/assets/logo-seal.svg new file mode 100644 index 00000000..c18f85f8 --- /dev/null +++ b/frontend/src/sites/jieyou/assets/logo-seal.svg @@ -0,0 +1,8 @@ + + 解忧商行印章 + 解忧商行方形朱砂印章 + + + 解 + 忧 + diff --git a/frontend/src/sites/jieyou/index.ts b/frontend/src/sites/jieyou/index.ts new file mode 100644 index 00000000..ec623f57 --- /dev/null +++ b/frontend/src/sites/jieyou/index.ts @@ -0,0 +1,25 @@ +import logoDark from './assets/logo-dark.svg' +import logoLight from './assets/logo-light.svg' +import logoSeal from './assets/logo-seal.svg' +import favicon from './assets/favicon.svg' + +import type { SiteBrand } from '../types' + +export const jieyouSite: SiteBrand = { + key: 'jieyou', + name: '解忧商行', + mark: '解', + themeColor: '#a64332', + favicon, + storefrontText: { + tagline: '解忧商号 · 安心租号', + hero_badge: '解忧严选', + hero_desc: '解忧商行严选三角洲账号,逐号核验、独立订单与专属售后,让每次租用更安心。', + card_sub: '逐号验真 · 独立订单 · 解忧售后', + }, + logos: { + light: logoLight, + dark: logoDark, + seal: logoSeal, + }, +} diff --git a/frontend/src/sites/jieyou/theme.css b/frontend/src/sites/jieyou/theme.css new file mode 100644 index 00000000..243e60c8 --- /dev/null +++ b/frontend/src/sites/jieyou/theme.css @@ -0,0 +1,159 @@ +html[data-site='jieyou'] { + --brand-primary: #a64332; + --brand-primary-rgb: 166 67 50; + --brand-primary-hover: #bd5845; + --brand-primary-light: #c97868; + --brand-primary-strong: #853326; + --brand-primary-soft: #f7ebe4; + --brand-on-primary: #fffdf8; + --brand-accent: #1e4d42; + --brand-canvas: #f4efe5; + --brand-surface: #fffdf8; + --brand-surface-muted: #f1e9dc; + --brand-ink: #1d2c28; + --brand-muted: #6f7f79; + --brand-border: #e7d2b5; + --brand-shadow: rgb(166 67 50 / 0.24); + --brand-font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif; + --brand-font-display: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', serif; +} + +html[data-site='jieyou'] body { + background: var(--brand-canvas); + color: var(--brand-ink); +} + +html[data-site='jieyou'] .pc-app-shell { + background: var(--brand-canvas); +} + +html[data-site='jieyou'] .pc-topbar { + border-bottom-color: rgb(166 67 50 / 0.14); + background: rgb(255 253 248 / 0.94); + box-shadow: 0 2px 18px rgb(30 77 66 / 0.08); +} + +html[data-site='jieyou'] .pc-brand-text, +html[data-site='jieyou'] .pc-brand-sub { + font-family: var(--brand-font-display); +} + +html[data-site='jieyou'] .pc-brand-text { + color: var(--brand-accent); + letter-spacing: 0.04em; +} + +html[data-site='jieyou'] .pc-brand-sub { + color: var(--brand-muted); + letter-spacing: 0.08em; +} + +html[data-site='jieyou'] .pc-search { + border-color: var(--brand-border); + background: var(--brand-surface); +} + +html[data-site='jieyou'] .pc-post-link, +html[data-site='jieyou'] .pc-login-link { + border-radius: 8px; +} + +html[data-site='jieyou'] .pc-nav-link.router-link-active { + background: var(--brand-primary-soft); + color: var(--brand-primary-strong); +} + +html[data-site='jieyou'] .pc-home-redesign { + background: + linear-gradient(rgb(166 67 50 / 0.025) 1px, transparent 1px), + linear-gradient(90deg, rgb(166 67 50 / 0.025) 1px, transparent 1px), var(--brand-canvas); + background-size: 28px 28px; +} + +html[data-site='jieyou'] .pc-footer { + border-top-color: var(--brand-border); + background: var(--brand-surface); +} + +html[data-site='jieyou'] .mobile-shell { + background: var(--brand-canvas); + color: var(--brand-ink); +} + +html[data-site='jieyou'] .mobile-hero { + border-bottom: 1px solid var(--brand-border); + background: var(--brand-surface); + box-shadow: 0 1px 0 rgb(166 67 50 / 0.08); +} + +html[data-site='jieyou'] .mobile-brand strong, +html[data-site='jieyou'] .mobile-brand-title-row strong { + color: var(--brand-accent); + font-family: var(--brand-font-display); + letter-spacing: 0.04em; +} + +html[data-site='jieyou'] .mobile-brand small { + color: var(--brand-muted); +} + +html[data-site='jieyou'] .mobile-service, +html[data-site='jieyou'] .add-home-strip { + border-color: var(--brand-border); + background: var(--brand-surface); + color: var(--brand-primary-strong); +} + +html[data-site='jieyou'] .add-home-strip { + background: var(--brand-primary-soft); +} + +html[data-site='jieyou'] .login-page { + background-color: var(--brand-canvas); +} + +html[data-site='jieyou'] .login-card { + border: 1px solid var(--brand-border); + border-radius: 12px; + box-shadow: 0 24px 64px rgb(30 77 66 / 0.12); +} + +html[data-site='jieyou'] .card-hero { + background: + radial-gradient(circle at 82% 72%, rgb(166 67 50 / 0.3) 0%, transparent 52%), + linear-gradient(155deg, #10241f 0%, #173a32 52%, #1e4d42 100%); +} + +html[data-site='jieyou'] .card-hero::after { + position: absolute; + right: -24px; + bottom: -20px; + width: 240px; + height: 240px; + background: url('./assets/logo-seal.svg') center / contain no-repeat; + content: ''; + opacity: 0.16; + pointer-events: none; + transform: rotate(-8deg); + z-index: 0; +} + +html[data-site='jieyou'] .hero-shield-art { + display: none; +} + +html[data-site='jieyou'] .hero-title, +html[data-site='jieyou'] .brand-name, +html[data-site='jieyou'] .brand-lockup strong { + font-family: var(--brand-font-display); + letter-spacing: 0.08em; +} + +html[data-site='jieyou'] .mobile-login-shell { + background: + radial-gradient(circle at 50% 8%, rgb(166 67 50 / 0.1), transparent 34%), var(--brand-canvas); +} + +html[data-site='jieyou'] .tenant-brand-banner { + display: grid; +} diff --git a/frontend/src/sites/siteBrand.spec.ts b/frontend/src/sites/siteBrand.spec.ts new file mode 100644 index 00000000..8f1a0f1f --- /dev/null +++ b/frontend/src/sites/siteBrand.spec.ts @@ -0,0 +1,18 @@ +import { describe, expect, it } from 'vitest' + +import { resolveSiteKey, siteBrandFor } from '.' + +describe('site branding registry', () => { + it('resolves the Jieyou brand from the tenant code', () => { + expect(resolveSiteKey('jieyou')).toBe('jieyou') + expect(siteBrandFor('jieyou').name).toBe('解忧商行') + expect(siteBrandFor('jieyou').logos.seal).toMatch(/^data:image\/svg\+xml/) + }) + + it('falls back to Dachui for main, legacy distribution and ops contexts', () => { + expect(resolveSiteKey('dachui')).toBe('dachui') + expect(resolveSiteKey('')).toBe('dachui') + expect(resolveSiteKey('legacy_site')).toBe('dachui') + expect(siteBrandFor('').mark).toBe('锤') + }) +}) diff --git a/frontend/src/sites/theme.ts b/frontend/src/sites/theme.ts new file mode 100644 index 00000000..d5b76fe7 --- /dev/null +++ b/frontend/src/sites/theme.ts @@ -0,0 +1,15 @@ +import { siteBrandFor, type SiteKey } from '.' + +export function applySiteTheme(siteKey: SiteKey) { + if (typeof document === 'undefined') return + const brand = siteBrandFor(siteKey) + document.documentElement.dataset.site = siteKey + + let meta = document.querySelector('meta[name="theme-color"]') as HTMLMetaElement | null + if (!meta) { + meta = document.createElement('meta') + meta.name = 'theme-color' + document.head.appendChild(meta) + } + meta.content = brand.themeColor +} diff --git a/frontend/src/sites/types.ts b/frontend/src/sites/types.ts new file mode 100644 index 00000000..cb55113a --- /dev/null +++ b/frontend/src/sites/types.ts @@ -0,0 +1,15 @@ +import type { StorefrontText } from '@/shared/utils/storefrontText' + +export type SiteKey = 'dachui' | 'jieyou' + +export type BrandLogoVariant = 'light' | 'dark' | 'seal' + +export interface SiteBrand { + key: SiteKey + name: string + mark: string + themeColor: string + favicon: string + storefrontText: StorefrontText + logos: Record +} diff --git a/frontend/src/stores/distributionSite.ts b/frontend/src/stores/distributionSite.ts index 6dfe74d1..fc68448b 100644 --- a/frontend/src/stores/distributionSite.ts +++ b/frontend/src/stores/distributionSite.ts @@ -1,5 +1,7 @@ import { defineStore } from 'pinia' import { apiClient } from '@/shared/api/client' +import { siteBrandFor } from '@/sites' +import type { SiteKey } from '@/sites/types' import type { ApiResponse } from '@/shared/types/types' import { normalizeAnnouncements } from '@/shared/utils/announcements' import { @@ -251,6 +253,11 @@ export const useDistributionSiteStore = defineStore('distributionSite', { }, getters: { + siteKey(state): SiteKey { + return state.siteMode === 'tenant' && state.tenantCode.trim().toLowerCase() === 'jieyou' + ? 'jieyou' + : 'dachui' + }, /** 品牌标识字符:分站取站名首字,主站沿用「锤」。 */ brandMark(state): string { if (state.siteMode === 'ops') return '运' @@ -489,14 +496,18 @@ export const useDistributionSiteStore = defineStore('distributionSite', { : null this.logoUrl = text(profile.logo_url) this.faviconUrl = text(profile.favicon_url) + if (!this.faviconUrl) { + this.faviconUrl = siteBrandFor(this.tenantCode).favicon + } this.banners = parseJSONArray(profile.banners_json) this.announcements = normalizeAnnouncements( parseJSONArray(profile.announcements_json) ) this.footerInfo = parseJSONObject(profile.footer_info_json) - this.storefrontText = mergeStorefrontText( - parseJSONObject>(profile.storefront_text_json) - ) + this.storefrontText = mergeStorefrontText({ + ...siteBrandFor(this.tenantCode).storefrontText, + ...parseJSONObject>(profile.storefront_text_json), + }) this.receiveRatioDelta = Math.max(0, Number(profile.receive_ratio_delta || 0)) this.receiveCostDelta = Math.max(0, Number(profile.receive_cost_delta || 0)) diff --git a/frontend/src/styles/base.css b/frontend/src/styles/base.css index 1a4aba45..f3a1ef97 100644 --- a/frontend/src/styles/base.css +++ b/frontend/src/styles/base.css @@ -1,15 +1,13 @@ :root { + --el-color-primary: var(--brand-primary); + --el-color-primary-light-3: var(--brand-primary-hover); + --el-color-primary-light-5: var(--brand-primary-light); + --el-color-primary-light-8: var(--brand-primary-soft); + --el-color-primary-dark-2: var(--brand-primary-strong); + --van-primary-color: var(--brand-primary); color: #1f2933; - background: #f6f8fb; - font-family: - Inter, - 'PingFang SC', - 'Microsoft YaHei', - system-ui, - -apple-system, - BlinkMacSystemFont, - 'Segoe UI', - sans-serif; + background: var(--brand-canvas); + font-family: var(--brand-font-body); font-synthesis: none; text-rendering: optimizeLegibility; } @@ -27,6 +25,11 @@ body { overflow-x: clip; } +body { + background: var(--brand-canvas); + color: var(--brand-ink); +} + #app { max-width: 100%; overflow-x: clip; @@ -37,6 +40,33 @@ a { text-decoration: none; } +.site-brand-logo { + display: block; + width: auto; + max-width: min(220px, 42vw); + object-fit: contain; +} + +.site-brand-mark { + display: grid; + flex: 0 0 auto; + place-items: center; + border-radius: 10px; + background: linear-gradient(135deg, var(--brand-primary-hover), var(--brand-primary-strong)); + box-shadow: 0 8px 20px var(--brand-shadow); + color: var(--brand-on-primary); + font-family: var(--brand-font-display); + font-size: 1.15em; + font-weight: 900; +} + +html[data-site='jieyou'] h1, +html[data-site='jieyou'] h2, +html[data-site='jieyou'] h3, +html[data-site='jieyou'] .brand-lockup strong { + font-family: var(--brand-font-display); +} + /* * iOS Safari 在 input/textarea/select 的 font-size < 16px 时, * 聚焦会自动放大页面,导致 UI 被轻微放大且需手动缩小才能恢复。 diff --git a/frontend/src/styles/home-filters.css b/frontend/src/styles/home-filters.css index d7b3175c..3f5af0bf 100644 --- a/frontend/src/styles/home-filters.css +++ b/frontend/src/styles/home-filters.css @@ -31,14 +31,14 @@ width: 4px; height: 16px; border-radius: 999px; - background: #ff6a00 !important; - box-shadow: 0 0 0 1px rgba(255, 106, 0, 0.12); + background: var(--brand-primary) !important; + box-shadow: 0 0 0 1px rgb(var(--brand-primary-rgb) / 0.12); } .filter-title strong { font-size: 15px; font-weight: 800; - color: #17233d; + color: var(--brand-ink); } .filter-title span { @@ -47,7 +47,7 @@ background: #f1f5f9; font-size: 12px; font-weight: 700; - color: #64748b; + color: var(--brand-muted); } /* 重置全部条件:橙色胶囊按钮,默认浅色描边,悬停填充品牌橙,按下加深,突出主题色。 @@ -58,12 +58,12 @@ padding: 0 16px; border: 1px solid #ffc79b !important; border-radius: 999px; - background: linear-gradient(135deg, #fff7ed 0%, #ffeedd 100%) !important; - color: #ff6a00 !important; + background: linear-gradient(135deg, var(--brand-primary-soft) 0%, #ffeedd 100%) !important; + color: var(--brand-primary) !important; font-size: 13px; font-weight: 800; letter-spacing: 0.2px; - box-shadow: 0 2px 6px rgba(255, 106, 0, 0.14); + box-shadow: 0 2px 6px rgb(var(--brand-primary-rgb) / 0.14); transition: background 0.2s ease, border-color 0.2s ease, @@ -79,10 +79,14 @@ .filter-header .reset-conditions-btn:hover, .filter-header .reset-conditions-btn:focus-visible { - border-color: #ff6a00 !important; - background: linear-gradient(135deg, #ff6a00 0%, #ff8533 100%) !important; + border-color: var(--brand-primary) !important; + background: linear-gradient( + 135deg, + var(--brand-primary) 0%, + var(--brand-primary-hover) 100% + ) !important; color: #ffffff !important; - box-shadow: 0 8px 18px rgba(255, 106, 0, 0.3) !important; + box-shadow: 0 8px 18px rgb(var(--brand-primary-rgb) / 0.3) !important; transform: translateY(-1px); } @@ -91,7 +95,7 @@ background: linear-gradient(135deg, #e85f00 0%, #ff7a20 100%) !important; color: #ffffff !important; transform: translateY(0); - box-shadow: 0 3px 8px rgba(255, 106, 0, 0.3) !important; + box-shadow: 0 3px 8px rgb(var(--brand-primary-rgb) / 0.3) !important; } /* PC 点击式快速筛选:上下两块(快速筛选 / 高级筛选)共用同一套两列网格。 @@ -161,8 +165,8 @@ /* 悬浮/按下统一走主题橙,避免灰蓝色调与品牌色脱节(active 更实,便于区分已选) */ .pill-chip:hover { background: #fff4ea; - color: #ff6a00; - box-shadow: inset 0 0 0 1px rgba(255, 106, 0, 0.28); + color: var(--brand-primary); + box-shadow: inset 0 0 0 1px rgb(var(--brand-primary-rgb) / 0.28); } .pill-chip:active { @@ -173,9 +177,9 @@ .pill-chip.active { background: #ffe8d5; - color: #ff6a00; + color: var(--brand-primary); font-weight: 700; - box-shadow: inset 0 0 0 1px #ff6a00; + box-shadow: inset 0 0 0 1px var(--brand-primary); } .pill-empty { @@ -197,14 +201,14 @@ padding: 6px 12px; border: none; background: transparent; - color: #64748b; + color: var(--brand-muted); font-size: 13px; font-weight: 600; cursor: pointer; } .advanced-toggle:hover { - color: #ff6a00; + color: var(--brand-primary); } .advanced-toggle em { @@ -212,7 +216,7 @@ height: 18px; padding: 0 5px; border-radius: 999px; - background: #ff6a00; + background: var(--brand-primary); color: #fff; font-size: 11px; font-style: normal; @@ -235,7 +239,7 @@ .advanced-filter-panel { margin-top: 12px; padding-top: 14px; - border-top: 1px dashed rgba(255, 106, 0, 0.4); + border-top: 1px dashed rgb(var(--brand-primary-rgb) / 0.4); } @media (max-width: 960px) { @@ -270,14 +274,14 @@ } .filter-chip:hover { - border-color: #ff6a00; - background: #fff7ed; + border-color: var(--brand-primary); + background: var(--brand-primary-soft); } .filter-chip.active { - border-color: #ff6a00; - background: #fff7ed; - color: #ff6a00; + border-color: var(--brand-primary); + background: var(--brand-primary-soft); + color: var(--brand-primary); } .filter-chip.wide { @@ -318,8 +322,8 @@ .filter-menu button.active, .range-menu button.active { - background: #fff7ed; - color: #ff6a00; + background: var(--brand-primary-soft); + color: var(--brand-primary); font-weight: 700; } @@ -340,8 +344,8 @@ } .filter-option-check.checked { - border-color: #ff6a00; - background: #ff6a00; + border-color: var(--brand-primary); + background: var(--brand-primary); box-shadow: inset 0 0 0 2px #ffffff; } @@ -390,8 +394,8 @@ } .skin-reset.active { - background: #fff7ed; - color: #ff6a00; + background: var(--brand-primary-soft); + color: var(--brand-primary); font-weight: 700; } @@ -411,7 +415,7 @@ .skin-filter-title strong { font-size: 13px; font-weight: 700; - color: #17233d; + color: var(--brand-ink); } .skin-filter-title button { @@ -421,7 +425,7 @@ background: transparent; font-size: 11px; font-weight: 600; - color: #64748b; + color: var(--brand-muted); cursor: pointer; transition: all 0.15s; } @@ -431,8 +435,8 @@ } .skin-filter-title button.active { - background: #fff7ed; - color: #ff6a00; + background: var(--brand-primary-soft); + color: var(--brand-primary); } .skin-filter-options { @@ -459,7 +463,7 @@ } .skin-filter-options button.active { - background: #fff7ed; - color: #ff6a00; + background: var(--brand-primary-soft); + color: var(--brand-primary); font-weight: 700; } diff --git a/frontend/src/styles/pc.css b/frontend/src/styles/pc.css index ac756850..332dc8fa 100644 --- a/frontend/src/styles/pc.css +++ b/frontend/src/styles/pc.css @@ -511,7 +511,7 @@ h1 { height: 38px; border-radius: 12px; background: #fff3e8; - color: #ff6a00; + color: var(--brand-primary); font-size: 13px; font-weight: 900; } @@ -540,7 +540,7 @@ h1 { .pc-nav-link.router-link-active, .pc-nav-link:hover { background: #fff3e8; - color: #ff6a00; + color: var(--brand-primary); } .pc-search { @@ -593,10 +593,10 @@ h1 { .pc-post-link { gap: 6px; - background: #ff6a00; + background: var(--brand-primary); padding: 0 16px; color: #ffffff; - box-shadow: 0 10px 22px rgba(255, 106, 0, 0.18); + box-shadow: 0 10px 22px rgb(var(--brand-primary-rgb) / 0.18); } .pc-post-link.large { @@ -755,8 +755,8 @@ h1 { width: 42px; height: 42px; border-radius: 14px; - background: #fff7ed; - color: #ea580c; + background: var(--brand-primary-soft); + color: var(--brand-primary-strong); font-size: 20px; }