初始化项目:基础设施 + 用户认证 + 后台管理系统 + AGPL 3.0 许可

This commit is contained in:
2026-05-26 13:46:33 +08:00
parent 1315df6501
commit 483fdd919f
56 changed files with 5804 additions and 40 deletions

View File

@ -0,0 +1,240 @@
/* ============================================================
MetaLab Common Styles — 全站共享样式Reset / 变量 / 导航 / 页脚)
每个页面加载此文件后,按需加载页面专属 CSS
============================================================ */
:root {
--color-bg: #f8f9fa;
--color-surface: #fff;
--color-primary: #2c3e50;
--color-secondary: #7f8c8d;
--color-accent: #3498db;
--color-danger: #e74c3c;
--color-border: #e0e0e0;
--color-text: #333;
--color-text-light: #666;
--shadow: 0 4px 12px rgba(0,0,0,.08);
--radius: 8px;
--transition: all .3s ease;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}
/* ---------- Reset ---------- */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
scroll-snap-type: y mandatory;
}
body {
background: var(--color-bg);
color: var(--color-text);
line-height: 1.6;
overflow-x: hidden;
}
a {
text-decoration: none;
color: inherit;
}
/* ---------- Layout ---------- */
.container {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
.icon {
width: 1em;
height: 1em;
vertical-align: -.125em;
display: inline-block;
flex-shrink: 0;
}
/* ---------- Header / Nav ---------- */
header {
background: var(--color-surface);
box-shadow: var(--shadow);
position: sticky;
top: 0;
z-index: 1000;
}
.nav-container {
display: flex;
justify-content: space-between;
align-items: center;
padding: .6rem 0;
}
.logo {
font-size: 1.4rem;
font-weight: 700;
color: var(--color-primary);
}
.logo span {
color: var(--color-accent);
}
.nav-links {
display: flex;
list-style: none;
gap: 2rem;
}
.nav-links a {
font-weight: 500;
padding: .5rem 0;
position: relative;
transition: var(--transition);
}
.nav-links a:hover,
.nav-links a.nav-active {
color: var(--color-accent);
}
.nav-links a::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 2px;
background: var(--color-accent);
transition: width .3s ease;
}
.nav-links a:hover::after,
.nav-links a.nav-active::after {
width: 100%;
}
.nav-login {
color: var(--color-accent) !important;
font-weight: 600 !important;
}
.nav-user {
color: var(--color-accent) !important;
font-weight: 600 !important;
}
.nav-logout {
color: var(--color-secondary) !important;
}
.mobile-menu-btn {
display: none;
background: none;
border: none;
font-size: 1.5rem;
color: var(--color-primary);
cursor: pointer;
}
/* ---------- Contact / Footer ---------- */
.contact-bar {
text-align: center;
padding: .6rem 0;
background: #e8f0f8;
border-top: 1px solid var(--color-border);
font-size: .95rem;
color: var(--color-text-light);
}
.contact-bar a {
color: var(--color-accent);
font-weight: 600;
transition: var(--transition);
}
.contact-bar a:hover {
color: #2980b9;
text-decoration: underline;
}
footer {
background: var(--color-primary);
color: #bdc3c7;
padding: .8rem 0;
}
.footer-content {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
.copyright {
font-size: .9rem;
color: #95a5a6;
width: 100%;
}
/* ---------- Scroll-to-top ---------- */
.scroll-top-btn {
position: fixed;
bottom: 1.5rem;
right: 1.5rem;
width: 44px;
height: 44px;
border-radius: 50%;
background: var(--color-accent);
color: #fff;
border: none;
box-shadow: 0 4px 12px rgba(52,152,219,.35);
cursor: pointer;
font-size: 1.1rem;
display: flex;
align-items: center;
justify-content: center;
z-index: 999;
opacity: 0;
visibility: hidden;
transform: translateY(10px);
transition: opacity .3s ease, visibility .3s ease, transform .3s ease;
}
.scroll-top-btn.visible {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.scroll-top-btn:hover {
background: #2980b9;
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(52,152,219,.45);
}
/* ---------- Responsive (共享:导航) ---------- */
@media (max-width: 768px) {
.nav-links {
display: none;
position: absolute;
top: 100%;
left: 0;
width: 100%;
background: var(--color-surface);
flex-direction: column;
padding: 1.5rem;
box-shadow: 0 10px 15px rgba(0,0,0,.1);
text-align: center;
}
.nav-links.active {
display: flex;
}
.mobile-menu-btn {
display: block;
}
}