前段页面调整

This commit is contained in:
2026-10-20 09:11:52 +08:00
parent 85cc02ac76
commit 4f9e448432
18 changed files with 1084 additions and 221 deletions
+164 -49
View File
@@ -2,7 +2,7 @@
import { computed } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { clearAuth, getUser } from '@/utils/auth'
import logoUrl from '@/assets/logo.png'
import logoUrl from '@/assets/logo-green.png'
import noticeUrl from '@/assets/icon-notice.png'
import settingUrl from '@/assets/icon-setting.png'
import avatarUrl from '@/assets/avatar.png'
@@ -13,9 +13,10 @@ const user = computed(() => getUser())
const menus = [
{ path: '/dashboard', title: '首页' },
{ path: '/search', title: '版本资源检索' },
{ path: '/special', title: '特藏版本推荐' },
{ path: '/deposit', title: '版本资源呈缴' },
{ path: '/search', title: '资源检索' },
{ path: '/hotwords', title: '热词检索' },
{ path: '/special', title: '特藏推荐' },
{ path: '/deposit', title: '资源呈缴' },
{ path: '/analysis', title: '数据统计' },
{ path: '/resource', title: '资源管理' },
{ path: '/collect', title: '数据采集' },
@@ -30,10 +31,13 @@ function logout() {
<template>
<div class="site">
<header class="site-header">
<header class="site-header" :class="{ 'on-hero': route.path === '/dashboard' }">
<div class="logo" @click="router.push('/')">
<img class="logo-img" :src="logoUrl" alt="logo" />
<span class="logo-text">版本资源联合服务平台</span>
<div class="logo-texts">
<span class="logo-text">版本资源联合服务平台</span>
<span class="logo-sub">VERSION RESOURCE UNION SERVICE</span>
</div>
</div>
<nav class="nav">
<a
@@ -67,77 +71,125 @@ function logout() {
}
.site-header {
height: 64px;
height: 72px;
display: flex;
align-items: center;
gap: 32px;
padding: 0 24px;
background: var(--header-bg);
gap: 36px;
padding: 0 36px;
background: rgba(36, 72, 55, 0.95);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
color: #fff;
position: relative;
transition: background 0.45s ease;
&::before {
/* 首页:导航浮在实景背景上 */
&.on-hero {
background: rgba(18, 40, 30, 0.34);
}
/* 底部金线:呼应版本馆的描金装饰 */
&::after {
content: '';
position: absolute;
inset: 0;
background: var(--nav-bg-img) center / cover no-repeat;
filter: var(--hero-filter);
z-index: 0;
left: 0;
right: 0;
bottom: 0;
height: 2px;
background: linear-gradient(90deg, transparent, var(--brand-gold), transparent);
opacity: 0.6;
}
> * {
position: relative;
z-index: 1;
}
}
.logo-img {
width: 30px;
height: 30px;
border-radius: 6px;
}
.hicon {
width: 20px;
height: 20px;
cursor: pointer;
filter: brightness(0) invert(1);
opacity: 0.9;
}
.avatar {
width: 30px;
height: 30px;
border-radius: 50%;
}
.logo {
display: flex;
align-items: center;
gap: 8px;
gap: 12px;
flex: none;
padding-right: 34px;
cursor: pointer;
position: relative;
&::after {
content: '';
position: absolute;
right: 0;
top: 50%;
width: 1px;
height: 30px;
transform: translateY(-50%);
background: rgba(210, 229, 214, 0.35);
}
}
.logo-img {
width: 36px;
height: 36px;
}
.logo-texts {
display: flex;
flex-direction: column;
gap: 4px;
}
.logo-text {
font-size: 16px;
font-weight: 600;
font-family: 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong',
'SimSun', serif;
font-size: 19px;
font-weight: 700;
letter-spacing: 2px;
line-height: 1;
color: #eef6f0;
}
.logo-sub {
font-size: 9px;
line-height: 1;
letter-spacing: 1px;
color: rgba(210, 229, 214, 0.72);
}
.nav {
display: flex;
gap: 28px;
flex: 1;
justify-content: center;
gap: 2px;
height: 100%;
a {
color: rgba(255, 255, 255, 0.82);
cursor: pointer;
position: relative;
display: flex;
align-items: center;
height: 100%;
padding: 0 11px;
color: rgba(255, 255, 255, 0.78);
font-size: 14px;
letter-spacing: 0.5px;
white-space: nowrap;
flex: none;
cursor: pointer;
transition: color 0.2s;
&::after {
content: '';
position: absolute;
left: 11px;
right: 11px;
bottom: 0;
height: 2px;
background: var(--brand-gold);
transform: scaleX(0);
transition: transform 0.22s;
}
&.active,
&:hover {
color: #fff;
font-weight: 600;
&::after {
transform: scaleX(1);
}
}
}
}
@@ -145,16 +197,79 @@ function logout() {
.right {
display: flex;
align-items: center;
gap: 16px;
gap: 14px;
flex: none;
padding-left: 26px;
font-size: 13px;
color: rgba(255, 255, 255, 0.85);
position: relative;
&::before {
content: '';
position: absolute;
left: 0;
top: 50%;
width: 1px;
height: 30px;
transform: translateY(-50%);
background: rgba(210, 229, 214, 0.3);
}
}
.hicon {
width: 19px;
height: 19px;
cursor: pointer;
opacity: 0.8;
filter: brightness(0) invert(1);
transition: opacity 0.2s;
&:hover {
opacity: 1;
}
}
.avatar {
width: 30px;
height: 30px;
border-radius: 50%;
border: 1px solid rgba(210, 229, 214, 0.5);
}
.user {
color: #eef6f0;
}
.quit {
color: rgba(255, 255, 255, 0.85);
color: rgba(255, 255, 255, 0.7);
cursor: pointer;
&:hover {
color: var(--brand-gold-light);
}
}
.site-main {
padding: 20px 24px 40px;
}
/* 窄屏收敛:隐藏英文副标题与用户名,保证导航不折行 */
@media (max-width: 1320px) {
.site-header {
gap: 20px;
padding: 0 24px;
}
.logo {
padding-right: 22px;
}
.logo-sub {
display: none;
}
.user {
display: none;
}
}
</style>