style(dnfs): 打磨首页 index 视觉细节,保持朴素风格
This commit is contained in:
1 parent
897e76fd8f
commit
d1e4b5b01a
2 files changed
+70
-33
No files matched your search
+66
-32
@@ -61,7 +61,11 @@ body {
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 1.15rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.01em;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
transition: color 0.15s;
|
||||
@@ -95,7 +99,7 @@ body {
|
||||
.hero {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
padding: 4rem 1rem 3rem;
|
||||
padding: 5.5rem 1rem 4.5rem;
|
||||
}
|
||||
.hero::before {
|
||||
content: "";
|
||||
@@ -106,96 +110,126 @@ body {
|
||||
}
|
||||
.hero > * { position: relative; }
|
||||
.hero-title {
|
||||
font-size: clamp(1.8rem, 5vw, 2.6rem);
|
||||
font-size: clamp(2rem, 6vw, 3rem);
|
||||
font-weight: 800;
|
||||
line-height: 1.35;
|
||||
line-height: 1.28;
|
||||
letter-spacing: 0.02em;
|
||||
margin-bottom: 0.75rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.accent-text {
|
||||
background: linear-gradient(120deg, var(--accent) 20%, var(--accent-dark) 80%);
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
color: transparent;
|
||||
}
|
||||
.accent-text { color: var(--accent); }
|
||||
.hero-sub {
|
||||
font-size: 1.05rem;
|
||||
font-size: 1.08rem;
|
||||
color: var(--fg-secondary);
|
||||
max-width: 30rem;
|
||||
margin: 0 auto;
|
||||
line-height: 1.7;
|
||||
}
|
||||
.hero-actions {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.75rem;
|
||||
margin-top: 1.75rem;
|
||||
gap: 0.85rem;
|
||||
margin-top: 2.1rem;
|
||||
}
|
||||
|
||||
/* ===== 特性卡片 ===== */
|
||||
.section-title {
|
||||
text-align: center;
|
||||
margin-top: 3rem;
|
||||
margin-top: 4rem;
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.01em;
|
||||
}
|
||||
.section-title::after {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 44px;
|
||||
height: 3px;
|
||||
margin: 0.6rem auto 0;
|
||||
border-radius: 2px;
|
||||
background: var(--accent);
|
||||
opacity: 0.85;
|
||||
}
|
||||
.features {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
|
||||
gap: 0.9rem;
|
||||
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
||||
gap: 1.1rem;
|
||||
width: 100%;
|
||||
max-width: 960px;
|
||||
margin: 0 auto;
|
||||
margin: 1.75rem auto 0;
|
||||
}
|
||||
.feature-card {
|
||||
background: var(--card);
|
||||
border: 1px solid var(--border-light);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 1.4rem 1.25rem;
|
||||
padding: 1.6rem 1.35rem;
|
||||
box-shadow: var(--shadow-sm);
|
||||
transition: transform 0.18s, box-shadow 0.2s, border-color 0.2s;
|
||||
}
|
||||
.feature-card:hover {
|
||||
transform: translateY(-3px);
|
||||
border-color: var(--border);
|
||||
transform: translateY(-4px);
|
||||
border-color: var(--accent);
|
||||
box-shadow: var(--shadow-md);
|
||||
}
|
||||
.feature-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
margin-bottom: 0.75rem;
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
margin-bottom: 0.85rem;
|
||||
border-radius: var(--radius-sm);
|
||||
background: var(--accent-soft);
|
||||
color: var(--accent-dark);
|
||||
}
|
||||
.feature-icon svg { width: 20px; height: 20px; }
|
||||
.feature-card h3 { margin-bottom: 0.35rem; }
|
||||
.feature-icon svg { width: 22px; height: 22px; }
|
||||
.feature-card h3 { margin-bottom: 0.4rem; font-size: 1.05rem; }
|
||||
.feature-card p {
|
||||
font-size: 0.86rem;
|
||||
line-height: 1.65;
|
||||
font-size: 0.88rem;
|
||||
line-height: 1.7;
|
||||
color: var(--fg-secondary);
|
||||
}
|
||||
|
||||
/* ===== 关于本站 ===== */
|
||||
.about {
|
||||
text-align: center;
|
||||
padding-bottom: 2rem;
|
||||
padding: 1rem 1rem 3rem;
|
||||
max-width: 760px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.about .site-intro {
|
||||
background: var(--card);
|
||||
border: 1px solid var(--border-light);
|
||||
border-radius: var(--radius-md);
|
||||
box-shadow: var(--shadow-sm);
|
||||
padding: 1.75rem 1.9rem;
|
||||
}
|
||||
.site-intro {
|
||||
max-width: 640px;
|
||||
margin: 0 auto;
|
||||
font-size: 0.95rem;
|
||||
line-height: 1.9;
|
||||
font-size: 0.96rem;
|
||||
line-height: 1.95;
|
||||
color: var(--fg-secondary);
|
||||
}
|
||||
.quick-links {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 1.25rem;
|
||||
margin-top: 1.5rem;
|
||||
gap: 1.5rem;
|
||||
margin-top: 1.75rem;
|
||||
}
|
||||
.quick-links a {
|
||||
font-size: 0.85rem;
|
||||
font-size: 0.86rem;
|
||||
color: var(--muted);
|
||||
text-decoration: none;
|
||||
transition: color 0.15s;
|
||||
padding-bottom: 1px;
|
||||
border-bottom: 1px solid transparent;
|
||||
transition: color 0.15s, border-color 0.15s;
|
||||
}
|
||||
.quick-links a:hover { color: var(--accent); }
|
||||
.quick-links a:hover { color: var(--accent); border-bottom-color: var(--accent); }
|
||||
|
||||
/* ===== 入场动画 ===== */
|
||||
@keyframes fade-up {
|
||||
|
||||
@@ -13,7 +13,10 @@
|
||||
</head>
|
||||
<body>
|
||||
<header class="header">
|
||||
<h1 id="logo">DNFS 树状笔记</h1>
|
||||
<h1 id="logo">
|
||||
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="vertical-align:-2px;margin-right:6px;color:var(--accent)"><circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/><line x1="8.59" y1="10.51" x2="15.42" y2="6.51"/><line x1="8.59" y1="13.49" x2="15.42" y2="17.49"/></svg>
|
||||
DNFS 树状笔记
|
||||
</h1>
|
||||
<nav class="right-group" aria-label="用户操作">
|
||||
<img src="favicon.ico" alt="用户头像" id="avatar" style="display:none">
|
||||
<b id="name" style="display:none"></b>
|
||||
|
||||
Reference in new issue
Block a user