Skip to content

Commit 8d6cf61

Browse files
committed
Add Tags And Tag File.
1 parent 6e6ffbf commit 8d6cf61

14 files changed

+98
-40
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Halo-theme-Limit
2+
3+
[Halo](https://halo.run)

archives.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<ul>
1919
<#list archive.posts?sort_by("createTime")?reverse as post>
2020
<li>
21-
<span>${post.createTime?date}</span>
21+
<span>${post.createTime?string("MM.dd")}</span>
2222
<a href="${post.fullPath!}">${post.title!}</a>
2323
</li>
2424
</#list>

assets/dist/index.css

+17-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/dist/index.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/less/index.less

+20-7
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
--background-color: #ffffff; // 背景
5555

56-
--background-height: 60vh; // 背景高度
56+
--background-height: 100vh; // 背景高度
5757
}
5858

5959
/* 清除所有标签的 margin padding */
@@ -151,8 +151,7 @@ header#menu {
151151

152152
//background-color: rgba(255, 251, 240, 0.7); // 茶白 70%
153153
//backdrop-filter: saturate(180%) blur(20px); // 背景高斯模糊
154-
155-
background-color: rgba(255, 251, 240); // 茶白
154+
background-color: var(--background-color);
156155
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
157156

158157
div.container {
@@ -181,7 +180,7 @@ header#menu {
181180
list-style-type: none;
182181

183182
li {
184-
margin: 0 1rem;
183+
margin-left: 1.5rem;
185184

186185
// Top Menu Style
187186
a {
@@ -503,14 +502,28 @@ main {
503502

504503
list-style: none;
505504

505+
margin-left: 1rem;
506506
border-left: 1px solid #dddddd;
507507

508508
li {
509-
height: 4rem;
510-
line-height: 4rem;
509+
display: flex;
510+
flex-direction: row;
511511

512-
padding-left: 1rem;
512+
line-height: 2rem;
513+
padding: 0.5rem 0 0.5rem 1rem;
514+
//padding-left: 1rem;
513515
border-bottom: 1px dashed #777777;
516+
517+
span {
518+
font-size: 0.7rem;
519+
margin-right: 0.3rem;
520+
}
521+
522+
a {
523+
text-decoration: underline;
524+
border: none;
525+
line-height: 2rem;
526+
}
514527
}
515528
}
516529
}

categories.ftl

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<#include "module/macro.ftl">
32
<#-- Post Page Template -->
43
<@layout title="归档-${blog_title!}">
@@ -8,18 +7,22 @@
87

98
<#-- Page Cover -->
109
<#import "module/cover.ftl" as cover>
11-
<@cover.layout img="${settings.category_cover!}" title="文章归档" subtitle="" />
10+
<@cover.layout img="${settings.category_cover!}" title="分类列表" subtitle="" />
1211

1312
<main>
14-
<section class="container">
13+
<section id="archives" class="container markdown">
1514
<@categoryTag method="list">
1615
<#if categories?? && categories?size gt 0>
17-
<#list categories as category>
18-
<a href="${category.fullPath}/" class="ah-hf ah-hv">
19-
<span class="ah-dt ct-f-size op-10">${category.name}</span>
20-
<span class="ah-tt h-6 op-06">${category.description}</span>
21-
</a>
22-
</#list>
16+
<ul>
17+
<#list categories as category>
18+
<li>
19+
<a href="${category.fullPath}/">
20+
<span>${category.name}</span>
21+
</a>
22+
<span>${category.description}</span>
23+
</li>
24+
</#list>
25+
</ul>
2326
</#if>
2427
</@categoryTag>
2528
</section>

category.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<#-- Page Cover -->
99
<#import "module/cover.ftl" as cover>
10-
<@cover.layout img="${settings.category_cover!}" title="文章分类" subtitle="" />
10+
<@cover.layout img="${category.thumbnail!settings.category_cover}" title="${category.name!}" subtitle="${category.description!}" />
1111

1212
<main>
1313
<section id="articles">

module/footer.ftl

-6
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@
4242
<span class="badge-value">Halo</span>
4343
</a>
4444
</div>
45-
<div class="github-badge">
46-
<a rel="license" href="https://baozi.fun/" target="_blank">
47-
<span class="badge-subject">Based</span>
48-
<span class="badge-value">Xue</span>
49-
</a>
50-
</div>
5145
<div class="github-badge">
5246
<a rel="license" href="https://losgod.xin" target="_blank">
5347
<span class="badge-subject">Designed</span>

module/menu.ftl

+10-7
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,19 @@
1010
<!-- TODO: 遍历 页面菜单 -->
1111
<ul id="pageMenu">
1212
<@menuTag method="list">
13-
<#list menus as menu>
13+
<#-- <#list menus as menu>-->
14+
<#list menus?sort_by("priority") as menu>
1415
<li><a href="${menu.url!}" target="${menu.target!}">${menu.name!}</a></li>
1516
</#list>
1617
</@menuTag>
17-
<form method="get" class="search" action="/search">
18-
<label>
19-
<button type="submit" class="iconfont">&#xe8b9;</button>
20-
<input type="text" name="keyword" placeholder="Search"/>
21-
</label>
22-
</form>
18+
<li><a id="searchBtn" href="javascript:void(0);" class="iconfont">&#xe8b9;</a></li>
2319
</ul>
2420
</div>
2521
</header>
22+
23+
<form id="search" method="get" class="hidden" action="/search">
24+
<label>
25+
<button type="submit" class="iconfont">&#xe8b9;</button>
26+
<input type="text" name="keyword" placeholder="Search"/>
27+
</label>
28+
</form>

module/script.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
getCustomContent('${settings.custom_info}');
99
</#if>
1010
window.addEventListener('load', () => {
11-
<#if is_index?? || is_archives?? || is_category?? || is_tag?? || is_search??>
11+
<#if is_index?? || is_category?? || is_tag?? || is_search??>
1212
postListScroll();
1313
</#if>
1414
});

settings.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ cover:
6868
label: 查询页大图
6969
type: attachment
7070
default: https://cdn.jsdelivr.net/gh/hshanx/[email protected]/default-bg.jpeg
71+
tag_cover:
72+
name: tag_cover
73+
label: 标签页大图
74+
type: attachment
75+
default: https://cdn.jsdelivr.net/gh/hshanx/[email protected]/default-bg.jpeg
7176
sns:
7277
label: 社交资料
7378
items:

tag.ftl

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<#include "module/macro.ftl">
2+
<#-- Post Page Template -->
3+
<@layout title="分类-${blog_title!}">
4+
5+
<#-- Top Menu -->
6+
<#include "module/menu.ftl">
7+
8+
<#-- Page Cover -->
9+
<#import "module/cover.ftl" as cover>
10+
<@cover.layout img="${settings.tag_cover!}" title="${tag.name!}" subtitle="" />
11+
12+
<main>
13+
<section id="articles">
14+
<#-- 文章列表 -->
15+
<#include "module/list-style.ftl">
16+
</section>
17+
<@paginationTag method="tagPosts" page="${posts.number}" total="${posts.totalPages}" display="3" slug="${tag.slug!}">
18+
<#include "module/pagination.ftl">
19+
</@paginationTag>
20+
</main>
21+
22+
<#-- Page Footer -->
23+
<#include "module/footer.ftl">
24+
25+
<#include "module/script.ftl">
26+
</@layout>

tags.ftl

Whitespace-only changes.

theme.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ description: 用于开发自有主题的基础内容
77
logo:
88
website: https://github.com/losgod/halo-theme-limit.git
99
repo: https://github.com/losgod/halo-theme-limit.git
10-
version: 0.6.4
10+
version: 0.6.9
1111
require: 1.3.0

0 commit comments

Comments
 (0)