feat: 完成navbar隐藏优化和侧边栏冻结功能

- 优化navbar滚动隐藏逻辑,更敏感响应
- 添加返回顶部按钮,固定在右下角
- 实现profile页面侧边栏真正冻结效果
- 修复首页滑动指示器位置
- 优化整体布局确保首屏内容完整显示
This commit is contained in:
Wuying Created Local Users
2025-12-04 20:05:13 +08:00
parent 570e864e06
commit 5f90f48a1c
25 changed files with 7493 additions and 118 deletions

View File

@@ -1,15 +1,13 @@
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import "tailwindcss";
@tailwind base;
@tailwind components;
@tailwind utilities;
:root {
--background: #ffffff;
--foreground: #171717;
}
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--font-sans: var(--font-geist-sans);
--font-mono: var(--font-geist-mono);
--navbar-height: 64px; /* 与pt-16对应 */
}
@media (prefers-color-scheme: dark) {
@@ -20,7 +18,90 @@
}
body {
background: var(--background);
color: var(--foreground);
font-family: Arial, Helvetica, sans-serif;
background: var(--background);
font-family: 'Inter', Arial, Helvetica, sans-serif;
}
/* Custom utility classes */
.text-balance {
text-wrap: balance;
}
/* Custom component classes */
.btn-carrot {
background-color: #f97316;
color: white;
font-weight: 500;
padding: 0.5rem 1rem;
border-radius: 0.5rem;
transition: background-color 0.2s;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.btn-carrot:hover {
background-color: #ea580c;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
.btn-carrot-outline {
border: 2px solid #f97316;
color: #f97316;
font-weight: 500;
padding: 0.5rem 1rem;
border-radius: 0.5rem;
transition: all 0.2s;
}
.btn-carrot-outline:hover {
background-color: #f97316;
color: white;
}
.card-minecraft {
background-color: white;
border: 2px solid #fed7aa;
border-radius: 0.5rem;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
transition: all 0.2s;
}
.card-minecraft:hover {
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
@media (prefers-color-scheme: dark) {
.card-minecraft {
background-color: #1f2937;
border-color: #c2410c;
}
}
.text-gradient {
background: linear-gradient(to right, #fb923c, #f97316);
background-clip: text;
-webkit-background-clip: text;
color: transparent;
}
.bg-gradient-carrot {
background: linear-gradient(to bottom right, #fb923c, #f97316, #ea580c);
}
/* 现代布局解决方案 */
@layer utilities {
/* 全屏减去navbar高度 */
.h-screen-nav {
height: calc(100vh - var(--navbar-height));
}
/* 侧栏最大高度,确保底部按钮可见 */
.sidebar-max-height {
max-height: calc(100vh - var(--navbar-height) - 120px);
}
/* 首页hero section专用高度 */
.min-h-screen-nav {
min-height: calc(100vh - var(--navbar-height));
}
}