Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
313 changes: 313 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,313 @@
:root {
--bg-color: #fafafa;
--text-color: #333;
--border-color: #ddd;
--accent-color: #555;
--hover-color: #f0f0f0;
--card-bg: white;
}

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

body {
font-family: 'Helvetica Neue', Arial, 'Microsoft YaHei', sans-serif;
background: var(--bg-color);
color: var(--text-color);
line-height: 1.7;
padding: 20px 0;
}

/* 主页标签样式 */
.tagline {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-top: 25px;
}

.tagline span {
background: #f0f0f0;
color: #555;
padding: 6px 14px;
border-radius: 20px;
font-size: 0.9rem;
font-weight: 500;
border: 1px solid #e0e0e0;
}

.container {
max-width: 1000px;
margin: 0 auto;
padding: 0 20px;
}

.header {
text-align: center;
margin-bottom: 50px;
padding: 20px 0;
}

.header h1 {
font-size: 2.5rem;
color: var(--accent-color);
margin-bottom: 10px;
}

.subtitle {
font-size: 1.1rem;
color: #666;
}

.intro {
margin-bottom: 60px;
}

.intro h2 {
font-size: 1.8rem;
margin-bottom: 20px;
color: var(--accent-color);
}

.projects h2 {
font-size: 1.8rem;
margin-bottom: 30px;
color: var(--accent-color);
}

.project-grid {
display: grid;
grid-template-columns: 1fr; /* ← 关键:强制每行只显示一列 */
gap: 30px;
}

.project-card {
background: var(--card-bg);
border: 1px solid var(--border-color);
border-radius: 12px;
padding: 30px;
transition: all 0.3s ease;
box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.project-card:hover {
transform: translateY(-5px);
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
background: var(--hover-color);
}

.project-card h3 {
font-size: 1.4rem;
margin-bottom: 15px;
color: var(--accent-color);
}

.project-card p {
margin-bottom: 20px;
color: #555;
}

.btn {
display: inline-block;
background: var(--accent-color);
color: white;
padding: 10px 24px;
text-decoration: none;
border-radius: 6px;
font-weight: 500;
transition: opacity 0.3s;
}

.btn:hover {
opacity: 0.9;
}

/* 项目详情页样式 */
.project-header {
display: flex;
align-items: center;
gap: 20px;
margin-bottom: 40px;
padding-bottom: 20px;
border-bottom: 2px solid var(--border-color);
}

.back-link {
color: var(--accent-color);
text-decoration: none;
font-weight: 500;
}

.back-link:hover {
text-decoration: underline;
}

.project-header h1 {
font-size: 2.2rem;
color: var(--accent-color);
margin: 0;
}

.section {
margin-bottom: 50px;
}

.section h2 {
font-size: 1.6rem;
color: var(--accent-color);
margin-bottom: 20px;
padding-left: 10px;
border-left: 4px solid var(--accent-color);
}

.section p, .section ul, .section table {
margin-bottom: 20px;
}

.section ul {
padding-left: 20px;
}

.section table {
width: 100%;
border-collapse: collapse;
background: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.section th,
.section td {
padding: 12px 15px;
text-align: left;
border-bottom: 1px solid var(--border-color);
}

.section th {
background-color: #f8f8f8;
font-weight: 600;
}

blockquote {
background: #f9f9f9;
border-left: 4px solid var(--accent-color);
padding: 15px 20px;
margin: 20px 0;
font-style: italic;
}

.huggingface-link {
display: inline-block;
background: #FFD21E;
color: #000;
padding: 12px 24px;
text-decoration: none;
border-radius: 6px;
font-weight: 600;
margin-top: 10px;
transition: transform 0.2s;
}

.huggingface-link:hover {
transform: scale(1.03);
}

.footer {
margin-top: 80px;
padding-top: 30px;
border-top: 1px solid var(--border-color);
text-align: center;
color: #777;
font-size: 0.9rem;
}

.footer a {
color: var(--accent-color);
text-decoration: none;
}

.footer a:hover {
text-decoration: underline;
}

/* ========= 滑动卡片样式(首页项目轮播) ========= */
.proj-slider { position: relative; }
.proj-viewport { overflow:hidden; border:1px solid var(--border-color); border-radius:14px; background:var(--card-bg); }
.proj-track { display:flex; transition:transform .5s cubic-bezier(.4,.1,.2,1); width:100%; }
.proj-slide { flex:0 0 100%; padding:34px 36px 48px; }
.proj-slide:not(:last-child){ border-right:0; }

.proj-controls { display:flex; align-items:center; gap:12px; margin:18px 6px 10px; flex-wrap:wrap; }
.proj-controls button { background:var(--accent-color); color:#fff; border:none; padding:8px 16px; border-radius:6px; cursor:pointer; font-weight:500; transition:background .25s, opacity .25s; }
.proj-controls button[disabled]{ opacity:.35; cursor:not-allowed; }
.proj-controls button:hover:not([disabled]){ background:#000; }
.proj-counter { font-size:.85rem; color:#555; min-width:64px; text-align:center; }

.proj-dots { display:flex; gap:6px; flex-wrap:wrap; margin-top:4px; }
.proj-dots button { width:12px; height:12px; border-radius:50%; border:1px solid var(--accent-color); background:transparent; cursor:pointer; padding:0; transition:background .3s, transform .3s; }
.proj-dots button.active { background:var(--accent-color); transform:scale(1.15); }
.proj-dots button:hover { background:var(--accent-color); }

/* 片段内部卡片 */
.proj-card h3 { font-size:1.5rem; margin-bottom:8px; color:var(--accent-color); }
.proj-card .lead { margin-bottom:16px; font-weight:500; color:#444; }
.mini-btn { display:inline-block; background:var(--accent-color); color:#fff; text-decoration:none; padding:6px 14px; border-radius:4px; font-size:.8rem; margin-top:4px; }
.mini-btn:hover { background:#000; }

/* details 折叠样式 */
details { border:1px solid var(--border-color); border-radius:8px; padding:10px 14px 12px; background:#fff; margin-bottom:14px; position:relative; }
details[open]{ box-shadow:0 2px 6px rgba(0,0,0,.05); }
details summary { cursor:pointer; font-weight:600; list-style:none; }
details summary::-webkit-details-marker{ display:none; }
details summary::after { content:'+'; position:absolute; right:16px; top:12px; font-weight:400; }
details[open] summary::after { content:'−'; }

/* 修正 details 中列表项目(li) 看起来“跑出”边框的问题:
1. 统一内边距与列表位置
2. 让圆点位于容器内部(inside)
3. 防止长英文/代码溢出(换行) */
details ul, details ol {
list-style-position: inside;
padding-left: 0;
margin: 6px 0 4px;
}
details li {
margin: 2px 0;
line-height: 1.5;
word-break: break-word;
/* 对非常长的连续字符串进一步安全换行 */
overflow-wrap: anywhere;
}

@media (max-width: 680px){
.proj-slide { padding:26px 22px 44px; }
.proj-card h3 { font-size:1.3rem; }
.proj-controls { gap:8px; }
}

/* file:// 回退模式 */
.proj-fallback-list { padding:26px 24px 34px; background:var(--card-bg); border:1px solid var(--border-color); border-radius:14px; }
.proj-fallback-list code { background:#eee; padding:2px 5px; border-radius:4px; }
.proj-fallback-list a { color:var(--accent-color); text-decoration:none; }
.proj-fallback-list a:hover { text-decoration:underline; }

/* 响应式设计 */
@media (max-width: 768px) {
.project-grid {
grid-template-columns: 1fr;
}

.header h1 {
font-size: 2rem;
}

.project-header {
flex-direction: column;
align-items: flex-start;
gap: 10px;
}
}
27 changes: 27 additions & 0 deletions favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading