hulai-website/assets/less/global.less
Mimingguang ee078b61bc feat: 后台管理系统完整重构 + 前后台数据联通
- 后台全面引入 Naive UI 组件库,统一 UI 规范
- 前台 usePublicApi 切换到 API 调用(GET /api/content/[key])
- 前后台数据源统一(site_content 表)
- 产品线统一管理(tour/camp/course 三套编辑器)
- 产品数据归一化(itinerary/faq/pricing 格式统一)
- 表单提交 API 改写入 submissions 表
- 新增 submissions 标记已读 API
- site-content PUT 支持 upsert
- 修复前台 bug(stories 路由冲突、占位符警告、selector breadcrumb)
- 消除 PageHero 类型警告(useSEO reactive 修复)
- 25 个前台页面全部 HTTP 200,展示效果不变

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 17:48:02 +08:00

275 行
4.9 KiB
Plaintext

此文件含有模棱两可的 Unicode 字符

此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。

// ============================================
// 呼籁旅行官网 - 全局样式
// ============================================
// ---------- 重置 ----------
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
font-size: @font-size-base;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
scroll-behavior: smooth;
}
body {
font-family: @font-family-base;
font-size: @font-size-base;
line-height: @line-height-base;
color: @color-text-primary;
background-color: #FAFAF8;
}
// ---------- 排版 ----------
h1, h2, h3, h4, h5, h6 {
font-weight: @font-weight-bold;
line-height: @line-height-tight;
color: @color-text-primary;
}
h1 {
font-size: 28px;
.respond-md({
font-size: @font-size-hero;
});
.respond-lg({
font-size: @font-size-display;
});
}
h2 {
font-size: @font-size-xl;
.respond-md({
font-size: @font-size-2xl;
});
}
h3 {
font-size: @font-size-lg;
.respond-md({
font-size: @font-size-xl;
});
}
p {
margin-bottom: @space-md;
color: @color-text-secondary;
}
a {
color: @color-primary;
text-decoration: none;
transition: color @transition-fast;
&:hover {
color: @color-primary-light;
}
}
ul, ol {
list-style: none;
}
img {
max-width: 100%;
height: auto;
display: block;
}
// ---------- 容器 ----------
.container {
.container();
}
// ---------- 段落区块 ----------
.section {
.section-padding();
}
.section--gray {
background-color: @color-bg-gray;
}
.section--warm {
background-color: @color-bg-warm;
}
.section--green {
background-color: @color-primary-bg;
}
.section--accent {
background-color: @color-accent-bg;
}
.section--dark {
background-color: @color-primary-dark;
color: rgba(255, 255, 255, 0.9);
}
.section--accent {
background-color: @color-accent-bg;
}
.section--dark {
background-color: @color-primary-dark;
color: rgba(255, 255, 255, 0.9);
}
// ---------- 辅助类 ----------
.text-center {
text-align: center;
}
.text-left {
text-align: left;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border-width: 0;
}
// ---------- 页面过渡 ----------
.page-enter-active,
.page-leave-active {
transition: opacity @transition-base;
}
.page-enter-from,
.page-leave-to {
opacity: 0;
}
// ---------- 滚动入场动画 ----------
.reveal {
opacity: 0;
transform: translateY(16px);
transition: opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1), transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
&.is-visible {
opacity: 1;
transform: translateY(0);
}
}
// 子元素交错入场(用于网格)
.reveal-stagger {
.reveal();
&:nth-child(2) { transition-delay: 0.08s; }
&:nth-child(3) { transition-delay: 0.16s; }
&:nth-child(4) { transition-delay: 0.24s; }
&:nth-child(5) { transition-delay: 0.32s; }
&:nth-child(6) { transition-delay: 0.40s; }
}
// ---------- 页面摘要 TL;DRGEO/SEO 语义摘要块)----------
// 每个页面开头的精准摘要,帮助 AI 和搜索引擎理解"这个页面回答了什么问题"
.page-tldr {
background: @color-bg-gray;
border-bottom: 1px solid @color-border;
.page-tldr-inner {
max-width: 800px;
margin: 0 auto;
padding: @space-md @space-lg;
border-left: 3px solid @color-primary;
background: @color-bg-white;
border-radius: 0 @border-radius-md @border-radius-md 0;
.respond-md({
padding: @space-lg @space-xl;
});
p {
font-size: @font-size-sm;
color: @color-text-secondary;
line-height: @line-height-loose;
margin: 0;
}
}
// 容器内居中 + 内边距
.container {
padding-top: @space-sm;
padding-bottom: @space-sm;
.respond-md({
padding-top: @space-md;
padding-bottom: @space-md;
});
}
}
// ---------- 全局卡片升级样式 ----------
.card-elevated {
background: @color-bg-white;
border: 1px solid @color-border;
border-radius: @border-radius-lg;
box-shadow: @shadow-card;
transition: box-shadow @transition-base, transform @transition-base, border-color @transition-base;
&:hover {
box-shadow: @shadow-card-hover;
transform: translateY(-4px);
border-color: @color-primary-lighter;
}
}
// 图片容器通用样式
.img-cover {
overflow: hidden;
border-radius: @border-radius-lg @border-radius-lg 0 0;
img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform @transition-slow;
}
&:hover img,
.card-elevated:hover & img {
transform: scale(1.05);
}
}
// ---------- 无障碍:减少动效偏好 ----------
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}