-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ryan Wang <i@ryanc.cc>
- Loading branch information
Showing
19 changed files
with
1,040 additions
and
715 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = false | ||
insert_final_newline = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
.DS_Store | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
.gradle | ||
build | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"scripts": { | ||
"prettier": "prettier --write './templates/**/*.html'" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"prettier": "^3.0.3" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,75 @@ | ||
<!DOCTYPE html> | ||
<html xmlns:th="https://www.thymeleaf.org" | ||
th:replace="~{layout :: html(title = |归档 - ${site.title}|, content = ~{::content})}"> | ||
<th:block th:fragment="content"> | ||
|
||
|
||
<!doctype html> | ||
<html | ||
xmlns:th="https://www.thymeleaf.org" | ||
th:replace="~{layout :: html(title = |归档 - ${site.title}|, content = ~{::content})}" | ||
> | ||
<th:block th:fragment="content"> | ||
<header class="site-header outer"> | ||
<div class="inner"> | ||
<th:block th:replace="~{partials/site-nav}"></th:block> | ||
</div> | ||
<div class="inner"> | ||
<th:block th:replace="~{partials/site-nav}"></th:block> | ||
</div> | ||
</header> | ||
<main id="site-main" class="site-main outer"> | ||
<div class="inner"> | ||
<article class="post-full post page "> | ||
<header class="post-full-header"> | ||
<h1 class="post-full-title">文章归档</h1> | ||
</header> | ||
<th:block th:if="${theme.config.general.archives_cover}"> | ||
<figure class="post-full-image" | ||
th:style="|background-image: url(${theme.config.general.archives_cover})|"> | ||
</figure> | ||
</th:block> | ||
<section class="post-full-content"> | ||
<div class="post-content"> | ||
<h1>分类</h1> | ||
<ul th:with="categories = ${categoryFinder.listAll()}"> | ||
|
||
<li th:each="category : ${categories}"> | ||
<a th:href="@{${category.status.permalink}}" th:text="${category.spec.displayName}"></a> | ||
</li> | ||
</ul> | ||
|
||
<h1>标签</h1> | ||
<ul th:with="tags = ${tagFinder.listAll()}"> | ||
|
||
<li th:each="tag : ${tags}"> | ||
<a th:href="@{${tag.status.permalink}}" th:text="${tag.spec.displayName}"></a> | ||
</li> | ||
|
||
</ul> | ||
|
||
<h1>归档</h1> | ||
|
||
<th:block th:each="archive : ${archives.items}"> | ||
<h2 th:text="|${archive.year}年|"></h2> | ||
<ul class="listing"> | ||
<th:block th:each="month : ${archive.months}"> | ||
<li th:each="post : ${month.posts}"> | ||
<a th:href="@{${post.status.permalink}}" th:text="${post.spec.title}"> | ||
</a> | ||
</li> | ||
</th:block> | ||
</ul> | ||
</th:block> | ||
|
||
|
||
</div> | ||
</section> | ||
|
||
</article> | ||
|
||
</div> | ||
<div class="inner"> | ||
<article class="post-full post page"> | ||
<header class="post-full-header"> | ||
<h1 class="post-full-title">文章归档</h1> | ||
</header> | ||
<th:block th:if="${theme.config.general.archives_cover}"> | ||
<figure | ||
class="post-full-image" | ||
th:style="|background-image: url(${theme.config.general.archives_cover})|" | ||
></figure> | ||
</th:block> | ||
<section class="post-full-content"> | ||
<div class="post-content"> | ||
<h1>分类</h1> | ||
<ul th:with="categories = ${categoryFinder.listAll()}"> | ||
<li th:each="category : ${categories}"> | ||
<a | ||
th:href="@{${category.status.permalink}}" | ||
th:text="${category.spec.displayName}" | ||
></a> | ||
</li> | ||
</ul> | ||
|
||
<h1>标签</h1> | ||
<ul th:with="tags = ${tagFinder.listAll()}"> | ||
<li th:each="tag : ${tags}"> | ||
<a | ||
th:href="@{${tag.status.permalink}}" | ||
th:text="${tag.spec.displayName}" | ||
></a> | ||
</li> | ||
</ul> | ||
|
||
<h1>归档</h1> | ||
|
||
<th:block th:each="archive : ${archives.items}"> | ||
<h2 th:text="|${archive.year}年|"></h2> | ||
<ul class="listing"> | ||
<th:block th:each="month : ${archive.months}"> | ||
<li th:each="post : ${month.posts}"> | ||
<a | ||
th:href="@{${post.status.permalink}}" | ||
th:text="${post.spec.title}" | ||
> | ||
</a> | ||
</li> | ||
</th:block> | ||
</ul> | ||
</th:block> | ||
</div> | ||
</section> | ||
</article> | ||
</div> | ||
</main> | ||
|
||
<script> | ||
$(function () { | ||
var $postContent = $(".post-full-content"); | ||
$postContent.fitVids(); | ||
}); | ||
$(function () { | ||
var $postContent = $(".post-full-content"); | ||
$postContent.fitVids(); | ||
}); | ||
</script> | ||
|
||
|
||
</th:block> | ||
|
||
</html> | ||
</th:block> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,51 @@ | ||
<!DOCTYPE html> | ||
<html xmlns:th="https://www.thymeleaf.org" | ||
th:replace="~{layout :: html(title = |分类 - ${site.title}|, content = ~{::content})}"> | ||
<th:block th:fragment="content"> | ||
<header class="site-header outer" th:style="|background-image: url(${theme.config.general.cover})|"> | ||
<div class="inner"> | ||
<th:block th:replace="~{partials/site-nav}"></th:block> | ||
<div class="site-header-content"> | ||
<h1 class="site-title">分类:<th:blcok th:text="${category.spec.displayName}"></th:blcok> | ||
</h1> | ||
<h2 class="site-description"> | ||
<th:block th:text="${category.spec.description}" th:if="${category.spec.description != ''}"> | ||
</th:block> | ||
<th:block th:text="|共有${category.postCount}文章|"></th:block> | ||
</h2> | ||
</div> | ||
|
||
<!doctype html> | ||
<html | ||
xmlns:th="https://www.thymeleaf.org" | ||
th:replace="~{layout :: html(title = |分类 - ${site.title}|, content = ~{::content})}" | ||
> | ||
<th:block th:fragment="content"> | ||
<header | ||
class="site-header outer" | ||
th:style="|background-image: url(${theme.config.general.cover})|" | ||
> | ||
<div class="inner"> | ||
<th:block th:replace="~{partials/site-nav}"></th:block> | ||
<div class="site-header-content"> | ||
<h1 class="site-title"> | ||
分类:<th:blcok th:text="${category.spec.displayName}"></th:blcok> | ||
</h1> | ||
<h2 class="site-description"> | ||
<th:block | ||
th:text="${category.spec.description}" | ||
th:if="${category.spec.description != ''}" | ||
> | ||
</th:block> | ||
<th:block th:text="|共有${category.postCount}文章|"></th:block> | ||
</h2> | ||
</div> | ||
</div> | ||
</header> | ||
<main id="site-main" class="site-main outer"> | ||
<div class="inner"> | ||
<div class="post-feed"> | ||
|
||
<th:block th:each="post : ${posts.items}"> | ||
<th:block th:replace="~{partials/post-card :: post-card(${post})}" /> | ||
</th:block> | ||
</div> | ||
<div class="inner"> | ||
<div class="post-feed"> | ||
<th:block th:each="post : ${posts.items}"> | ||
<th:block | ||
th:replace="~{partials/post-card :: post-card(${post})}" | ||
/> | ||
</th:block> | ||
</div> | ||
</div> | ||
</main> | ||
<th:block th:if="${posts.total gt 0}"> | ||
<script> | ||
// maxPages is a global variable that is needed to determine | ||
// if we need to load more pages for the infinitescroll, or if | ||
// we reached the last page already. | ||
var maxPages = parseInt(document.querySelector(".total").getAttribute("data-total")); | ||
</script> | ||
<script th:src="@{/assets/built/infinitescroll.js}"></script> | ||
<script> | ||
// maxPages is a global variable that is needed to determine | ||
// if we need to load more pages for the infinitescroll, or if | ||
// we reached the last page already. | ||
var maxPages = parseInt( | ||
document.querySelector(".total").getAttribute("data-total"), | ||
); | ||
</script> | ||
<script th:src="@{/assets/built/infinitescroll.js}"></script> | ||
</th:block> | ||
|
||
</th:block> | ||
|
||
</html> | ||
</th:block> | ||
</html> |
Oops, something went wrong.