feat: 页面模板差异化改进 + 配置优化 + 兼容清理 (#29)
- 首页判定:navigation 第一项 - 模板:page/projects/articles/bookmarks/search-results - bookmarks:update: YYYY-MM-DD | from: git|mtime - articles:RSS 聚合只读条目 + 分类聚合 + 影子写回结构 - projects:repo 卡片 + 可选热力图 + 自动抓取元信息 - 工作流:构建前 sync + schedule 定时刷新 - 移除兼容:config.yml/config.yaml、navigation.yml、home 特例 - 迁移说明:config/update-instructions.md
This commit is contained in:
36
templates/components/page-header.hbs
Normal file
36
templates/components/page-header.hbs
Normal file
@@ -0,0 +1,36 @@
|
||||
{{!-- page-header.hbs - 统一页面标题区(可选显示书签页内容更新时间) --}}
|
||||
<div class="welcome-section{{#ifCond projectsMeta '&&' projectsMeta.heatmap}} welcome-section-with-side{{/ifCond}}">
|
||||
<div class="welcome-section-main">
|
||||
{{#ifEquals pageId @root.homePageId}}
|
||||
<h2 data-editable="profile-title">{{title}}</h2>
|
||||
<h3 data-editable="profile-subtitle">{{subtitle}}</h3>
|
||||
{{else}}
|
||||
<div class="welcome-title-row">
|
||||
<h2 data-editable="page-title">{{title}}</h2>
|
||||
{{#if pageMeta}}
|
||||
{{#if pageMeta.updatedAt}}
|
||||
<span class="page-updated-inline" title="{{pageMeta.updatedAt}}">
|
||||
update: {{formatDate pageMeta.updatedAt "YYYY-MM-DD"}} | from: {{pageMeta.updatedAtSource}}
|
||||
</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<p class="subtitle" data-editable="page-subtitle">{{subtitle}}</p>
|
||||
{{/ifEquals}}
|
||||
</div>
|
||||
|
||||
{{#if projectsMeta}}
|
||||
{{#if projectsMeta.heatmap}}
|
||||
<div class="welcome-section-side">
|
||||
<div class="heatmap-container" title="我的 GitHub 贡献热力图">
|
||||
<a href="{{projectsMeta.heatmap.profileUrl}}" target="_blank" rel="noopener">
|
||||
<img class="heatmap-img"
|
||||
src="{{projectsMeta.heatmap.imageUrl}}"
|
||||
alt="Github Chart"
|
||||
loading="lazy" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
Reference in New Issue
Block a user