feat: 调整页面顶部区域&重构项目页热力图&优化markdown内容页
This commit is contained in:
40
templates/components/github-heatmap.hbs
Normal file
40
templates/components/github-heatmap.hbs
Normal file
@@ -0,0 +1,40 @@
|
||||
<section class="category category-level-1 gh-heatmap-category" data-type="heatmap">
|
||||
<div class="category-header">
|
||||
<div class="gh-heatmap-header">
|
||||
<h2>
|
||||
<i class="fab fa-github"></i>
|
||||
<span class="gh-text-desktop">GitHub Contributions</span>
|
||||
<span class="gh-text-mobile">Contributions</span>
|
||||
<span class="gh-heatmap-username">@{{username}}</span>
|
||||
</h2>
|
||||
|
||||
<div class="gh-legend" aria-hidden="true">
|
||||
<span>
|
||||
<span class="gh-text-desktop">Less</span>
|
||||
<span class="gh-text-mobile">L</span>
|
||||
</span>
|
||||
<div class="gh-legend-item level-0"></div>
|
||||
<div class="gh-legend-item level-1"></div>
|
||||
<div class="gh-legend-item level-2"></div>
|
||||
<div class="gh-legend-item level-3"></div>
|
||||
<div class="gh-legend-item level-4"></div>
|
||||
<span>
|
||||
<span class="gh-text-desktop">More</span>
|
||||
<span class="gh-text-mobile">M</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="category-content">
|
||||
<div class="gh-heatmap-wrapper">
|
||||
<div class="calendar gh-calendar" data-github-username="{{username}}" id="github-calendar-{{username}}">
|
||||
{{#if html}}
|
||||
{{{html}}}
|
||||
{{else}}
|
||||
Loading data...
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -1,5 +1,5 @@
|
||||
{{!-- page-header.hbs - 统一页面标题区(可选显示书签页内容更新时间) --}}
|
||||
<div class="welcome-section{{#ifCond projectsMeta '&&' projectsMeta.heatmap}} welcome-section-with-side{{/ifCond}}">
|
||||
<div class="welcome-section">
|
||||
<div class="welcome-section-main">
|
||||
{{#ifEquals pageId @root.homePageId}}
|
||||
<h2 data-editable="profile-title">{{title}}</h2>
|
||||
@@ -19,18 +19,5 @@
|
||||
{{/ifEquals}}
|
||||
</div>
|
||||
|
||||
{{#if projectsMeta}}
|
||||
{{#if projectsMeta.heatmap}}
|
||||
<div class="welcome-section-side">
|
||||
<div class="heatmap-container" title="我的 GitHub 贡献热力图">
|
||||
<a href="{{safeUrl 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