feat(config): 提取站点配置到独立的config.js文件

- 将分散在各JS文件中的配置项统一提取到SiteConfig对象中
- 包含stars、animation、background、hitokoto等配置模块
- GitHub相关配置包括用户名、缓存键值和过期时间
- 博客RSS地址及缓存配置迁移至config.js
- 技术栈数据从硬编码移至配置文件管理
- 社交卡片动画参数统一配置化
- Artalk评论系统参数集中管理
- 添加开发环境检测逻辑
- 支持CommonJS和浏览器环境下的配置导出
- 在about.html和index.html中引入config.js脚本
- 更新about.js和main.js以使用SiteConfig配置
- 删除重复的GitHub用户名硬编码
- 调整图片路径读取方式为配置驱动
- 优化星空背景脚本的配置引用方式
- 修复本地开发环境下的一言默认文本显示问题
This commit is contained in:
hehh
2025-11-20 22:02:37 +08:00
parent a2692cae96
commit c6428d1224
7 changed files with 295 additions and 91 deletions

View File

@@ -1478,6 +1478,55 @@ a:not(.nav-logo):not(.nav-links a):not(.social-link):not(.btn):not(.footer-info
font-weight: 500;
}
/* 项目描述折叠样式 */
.project-description.collapsible {
position: relative;
max-height: 100px;
overflow: hidden;
}
.project-description.collapsible::after {
content: "";
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 40px;
background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, var(--glass-alpha)));
}
.project-description.expanded {
max-height: none;
}
.project-description.expanded::after {
display: none;
}
.project-description.collapsible {
position: relative;
}
.toggle-description {
background: rgba(255, 255, 255, 0.1);
color: var(--text-strong);
border: none;
padding: 0.5rem 1rem;
border-radius: 20px;
cursor: pointer;
font-size: 0.9rem;
margin-top: 1rem;
transition: all 0.3s ease;
}
.toggle-description:hover {
background: rgba(255, 255, 255, 0.2);
}
.project-description.collapsible + .toggle-description {
display: inline-block;
}
.project-stats {
display: flex;
gap: 1rem;