功能新增 - 新增页面布局契约 templates/layout.html,插件前台页面可复用主题外观,避免回退到 Halo fallback 布局 - 新增微信读书页面模板 (weread.html),集成 halo-weread-plugin 书架 - 新增订阅页面模板 (page_subscriptions.html) - 新增欢迎弹窗组件(IP 地理定位,多 API 容错) - 新增点击特效组件(9 种效果) - 页脚新增全站统计,支持开关与统计项配置,默认开启 插件适配 - 适配 extra-api:文章字数改服务端统计、正文可选中英混排与服务端代码高亮 - 修正各页面插件应用市场链接与插件名 修复 - 修复文章正文图片/视频无法居中(正文样式移至全局,scoped 样式对 Thymeleaf 注入内容无效) - 修复正文 H1-H6 字号过大,重排层级与移动端断点 - 修复 th: 属性中文字符串缺少引号导致的 Thymeleaf 解析异常(/links、/moments 500) - 修复 JS 内联表达式与 Thymeleaf 内联语法冲突,全部内联脚本加 th:inline="none" - 修复移除 i18n 后 steam 页 Elvis 表达式回归问题 - 修正订阅页 th:attr 引号嵌套错误 优化 - Hero 移除灰色遮罩,下滑箭头改为可点击平滑滚动 - 优化目录样式:移除圆点与下拉箭头,支持两行显示,修复长目录截断 - 移除 i18n 多语言支持 清理 - 移除未使用的 Vue/图标依赖与废弃脚本、重复资源
128 lines
2.6 KiB
Plaintext
128 lines
2.6 KiB
Plaintext
---
|
|
import Layout from "../layouts/Layout.astro";
|
|
import LightGallery from "../components/LightGallery.astro";
|
|
---
|
|
|
|
<Layout>
|
|
<Fragment slot="head">
|
|
<title th:text="|${singlePage.spec.title} - ${site.title}|"></title>
|
|
</Fragment>
|
|
|
|
<article class="wi-page">
|
|
<header class="wi-page__header">
|
|
<h1
|
|
class="wi-page__title"
|
|
th:text="${singlePage.spec.title}"
|
|
></h1>
|
|
<span class="wi-page-accent"></span>
|
|
<div class="wi-page__meta">
|
|
<time
|
|
th:datetime="${singlePage.spec.publishTime}"
|
|
th:text="${#dates.format(singlePage.spec.publishTime, 'yyyy-MM-dd')}"
|
|
></time>
|
|
</div>
|
|
</header>
|
|
|
|
<div
|
|
class="wi-page__body"
|
|
th:utext="${singlePage.content.content}"
|
|
></div>
|
|
|
|
<div class="wi-page__comment">
|
|
<halo:comment
|
|
th:if="${haloCommentEnabled}"
|
|
group="content.halo.run"
|
|
kind="SinglePage"
|
|
th:attr="name=${singlePage.metadata.name}"
|
|
></halo:comment>
|
|
</div>
|
|
</article>
|
|
|
|
<LightGallery />
|
|
</Layout>
|
|
|
|
<style>
|
|
.wi-page {
|
|
display: grid;
|
|
gap: var(--space-lg);
|
|
padding-block: 1rem;
|
|
}
|
|
|
|
.wi-page__header {
|
|
display: grid;
|
|
gap: var(--space-md);
|
|
padding-bottom: var(--space-lg);
|
|
border-bottom: 1px solid var(--rule);
|
|
text-align: center;
|
|
}
|
|
|
|
.wi-page__title {
|
|
font-family: var(--font-sans);
|
|
font-size: clamp(1.8rem, 4vw, 2.8rem);
|
|
font-weight: 700;
|
|
line-height: var(--leading-tight);
|
|
letter-spacing: -0.02em;
|
|
color: var(--ink);
|
|
margin: 0;
|
|
}
|
|
|
|
.wi-page-accent {
|
|
display: block;
|
|
width: 48px;
|
|
height: 3px;
|
|
margin: var(--space-sm) auto 0;
|
|
border-radius: 9999px;
|
|
background: var(--accent);
|
|
}
|
|
|
|
.wi-page__meta {
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 0.4rem;
|
|
color: var(--ink-3);
|
|
font-size: var(--text-sm);
|
|
letter-spacing: var(--tracking-wide);
|
|
}
|
|
|
|
.wi-page__body {
|
|
max-width: var(--content-max);
|
|
margin-inline: auto;
|
|
font-size: var(--text-md);
|
|
line-height: var(--leading-relaxed);
|
|
color: var(--ink);
|
|
}
|
|
|
|
.wi-page__body a {
|
|
text-decoration: underline;
|
|
text-decoration-thickness: 1px;
|
|
text-underline-offset: 0.2em;
|
|
}
|
|
|
|
.wi-page__body ul,
|
|
.wi-page__body ol {
|
|
padding-inline-start: 1.5em;
|
|
margin-block-end: 1.2em;
|
|
}
|
|
|
|
.wi-page__body li {
|
|
margin-block-end: 0.4em;
|
|
}
|
|
|
|
.wi-page__comment {
|
|
width: 100%;
|
|
max-width: 600px;
|
|
margin-inline: auto;
|
|
}
|
|
|
|
halo\:comment {
|
|
display: block;
|
|
width: 100%;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.wi-page__header {
|
|
padding-bottom: var(--space-xl);
|
|
}
|
|
}
|
|
</style>
|