fix: 修复首页卡片字数与 Hero 滚动,移除光感跟随 (v1.1.6)

修复
- 首页文章卡片开启"显示字数"后无效果:该配置项此前只有声明没有实现,现已在文章流卡片接入服务端字数统计(依赖 API 扩展包,未安装时自动隐藏)
- Hero 下滑箭头滚动不到位:Hero 为固定背景(position: fixed),此前箭头额外减去了导航栏高度,导致内容区上方始终露出一段 Hero 渐变;现与滚动吸附逻辑对齐,内容区顶部直接对齐视口顶部
- 鼠标点击特效开启后无效果:特效类型默认值为 off(关闭),开启开关但不选择类型时静默不生效;默认值改为"社会主义核心价值观"

移除
- 移除鼠标光感跟随功能及对应配置项

优化
- 上下篇导航:新增方向箭头与悬停反馈(背景、位移、变色),移动端收紧内边距
- Hero 一言自动刷新改为淡出→换文案→淡入的过渡动画,避免生硬跳变
- README 全面更新:环境要求、插件适配表(新增微信读书与 API 扩展包)、自定义页面模板、功能说明、目录结构与开发注意事项
This commit is contained in:
2026-09-26 12:29:28 +08:00
parent 430d107d44
commit bcc221c3bd
10 changed files with 180 additions and 105 deletions
+26 -4
View File
@@ -28,10 +28,18 @@ const { variant = "default" } = Astro.props;
</div>
<div class="post-card__content">
<time
class="post-card__date"
th:text="${#dates.format(post.spec.publishTime, 'yyyy-MM-dd')}"
></time>
<div class="post-card__meta">
<time
class="post-card__date"
th:text="${#dates.format(post.spec.publishTime, 'yyyy-MM-dd')}"
></time>
<span
class="post-card__words"
th:if="${theme.config?.home?.home_card_show_wordcount == true and pluginFinder.available('extra-api')}"
th:with="words=${extraApiStatsFinder.getPostWordCount({name: post.metadata.name})}"
th:text="${words > 0 ? words + ' 字' : ''}"
></span>
</div>
<h3 class="post-card__title" th:text="${post.spec.title}"></h3>
<p
th:if="${variant != 'compact'}"
@@ -110,6 +118,20 @@ const { variant = "default" } = Astro.props;
line-height: var(--leading-none);
}
.post-card__meta {
display: flex;
align-items: center;
gap: 0.6rem;
}
.post-card__words {
font-size: var(--text-xs);
color: var(--ink-3);
line-height: var(--leading-none);
padding-left: 0.6rem;
border-left: 1px solid var(--rule);
}
.post-card__title {
font-family: var(--font-sans);
font-weight: 700;