Files
menav/templates/pages/articles.hbs
rbetree 387cd2492e 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
2025-12-28 00:22:54 +08:00

67 lines
2.9 KiB
Handlebars
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{!-- articles.hbs - 文章页面恢复分类展示Phase 2 优先展示文章条目(只读) --}}
<div class="page-template page-template-articles">
{{> page-header}}
{{#if articlesItems.length}}
{{!-- Phase 2按配置分类聚合展示文章条目只读保持与页面分类结构一致 --}}
{{#if articlesCategories.length}}
{{#each articlesCategories}}
<section class="category category-level-1 category-readonly">
<div class="category-header" data-toggle="category">
<h2>
<i class="{{#if icon}}{{icon}}{{else}}fas fa-rss{{/if}}"></i>
{{name}}
<span class="toggle-icon">
<i class="fas fa-chevron-down"></i>
</span>
</h2>
</div>
<div class="category-content">
{{#if items.length}}
<div class="sites-grid">
{{#each items}}
{{> site-card type="article" style=@root.siteCardStyle}}
{{/each}}
</div>
{{else}}
<p class="empty-content">暂无文章</p>
{{/if}}
</div>
</section>
{{/each}}
{{else}}
{{!-- 兜底:无分类映射时展示为单一“最新文章”列表 --}}
<section class="category category-level-1 category-readonly">
<div class="category-header" data-toggle="category">
<h2>
<i class="fas fa-rss"></i>
最新文章
<span class="toggle-icon">
<i class="fas fa-chevron-down"></i>
</span>
</h2>
</div>
<div class="category-content">
<div class="sites-grid">
{{#each articlesItems}}
{{> site-card type="article" style=@root.siteCardStyle}}
{{/each}}
</div>
</div>
</section>
{{/if}}
{{!-- 保留扩展可写回结构(隐藏),避免文章条目影响 DOM → IR → YAML --}}
<div class="menav-extension-shadow" data-extension-shadow="true" data-search-exclude="true" aria-hidden="true">
{{#each categories}}
{{> category}}
{{/each}}
</div>
{{else}}
{{!-- Phase 1来源站点入口可写回 --}}
{{#each categories}}
{{> category}}
{{/each}}
{{/if}}
</div>