diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 28a51d5..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "compile-hero.disable-compile-files-on-did-save-code": false -} \ No newline at end of file diff --git a/archives.ftl b/archives.ftl index 281552d..e232b9f 100644 --- a/archives.ftl +++ b/archives.ftl @@ -1,48 +1,20 @@ <#include "module/macro.ftl"> <@layout title="归档 - ${blog_title!}"> -

归档

- - -

分页

- - <#if posts.totalPages gt 1> - - <#else> - 当前只有一页 - + + <#include "module/pagination.ftl"> + diff --git a/index.ftl b/index.ftl index 1bea078..0644003 100644 --- a/index.ftl +++ b/index.ftl @@ -1,30 +1,7 @@ <#include "module/macro.ftl"> <@layout title="${blog_title!}">
-
- -
-

${settings.sub_title!'the site subtitle'}

-
- <#if settings.github??> - - - <#if settings.wechat??> - - - <#if settings.bilibili??> - - - <#if settings.mail??> - - - -
-
-
- + <#include "module/header.ftl"> <#list posts.content as post>

${post.title!}

@@ -48,21 +25,6 @@
- + <#include "module/pagination.ftl">
\ No newline at end of file diff --git a/module/header.ftl b/module/header.ftl new file mode 100644 index 0000000..e71d94c --- /dev/null +++ b/module/header.ftl @@ -0,0 +1,23 @@ +
+
+ 无尽光芒 +
+
+

${settings.sub_title!'the site subtitle'}

+
+ <#if settings.github??> + + + <#if settings.wechat??> + + + <#if settings.bilibili??> + + + <#if settings.mail??> + + + +
+
+
\ No newline at end of file diff --git a/module/macro.ftl b/module/macro.ftl index db6ad77..554303e 100644 --- a/module/macro.ftl +++ b/module/macro.ftl @@ -16,7 +16,7 @@ - <#-- <#include "menu.ftl"> --> + <#include "menu.ftl"> <#-- 主体 --> <#nested > diff --git a/module/pagination.ftl b/module/pagination.ftl new file mode 100644 index 0000000..e5ebf07 --- /dev/null +++ b/module/pagination.ftl @@ -0,0 +1,16 @@ +<#if posts.totalPages gt 1> + <@paginationTag method="index" page="${posts.number}" total="${posts.totalPages}" display="3"> + + + \ No newline at end of file diff --git a/source/css/Redemption.css b/source/css/Redemption.css index 2d755df..6fc50b8 100644 --- a/source/css/Redemption.css +++ b/source/css/Redemption.css @@ -65,35 +65,35 @@ main .post { width: 45rem; padding-top: 1rem; } -main .post h1 a { +main .post > h1 a { letter-spacing: 0.0625rem; font-size: 1.375rem; line-height: 1.75rem; } -main .post p { +main .post > p { line-height: 1.5rem; text-indent: 2rem; } -main .post .info { +main .post > .info { display: flex; justify-content: flex-end; flex-wrap: wrap; flex-direction: row; padding: 0.5rem 0 2rem 0; } -main .post .info span { +main .post > .info span { font-weight: 400; font-size: 0.75rem; } -main .post .info a { +main .post > .info a { font-size: 0.75rem; } -main .post .info .date, -main .post .info .tag { +main .post > .info .date, +main .post > .info .tag { margin: 0 0.5rem; } -main .post .info .date i, -main .post .info .tag i { +main .post > .info .date i, +main .post > .info .tag i { position: relative; top: 0.05rem; } @@ -102,10 +102,46 @@ main .pagenav { justify-content: space-between; padding: 2rem 0 5rem 0; } -main .pagenav a { +main .pagenav > a { text-decoration: none; margin: 0 2rem; } +main .archives { + width: 45rem; + padding-top: 1rem; + font-size: 0.875rem; +} +main .archives > li { + list-style-type: none; + padding: 0; +} +main .archives > .year { + font-size: 1.4rem; + font-weight: 600; + line-height: 2.2rem; + letter-spacing: 0.1rem; + padding: 0.625rem 0; +} +main .archives > .list { + margin-bottom: 3rem; + line-height: 1.75rem; +} +main .archives > .list .title { + padding-bottom: 0.3rem; +} +main .archives > .list .title a { + display: inline-block; + width: 85%; + color: #1f1f1f; +} +main .archives > .list .title .time { + float: right; + color: #c5c5c5; + font-size: 0.875rem; +} +main .archives > .list .title a:hover { + color: #1f1f1f; +} footer { padding: 2rem 0; diff --git a/source/css/Redemption.scss b/source/css/Redemption.scss index 7d4afe1..afbd90a 100644 --- a/source/css/Redemption.scss +++ b/source/css/Redemption.scss @@ -1,14 +1,16 @@ @charset "UTF-8"; + // 全局 HTML 配置 html { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, - 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', - 'Noto Color Emoji'; + 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', + 'Noto Color Emoji'; font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; } + // 滚动条 html::-webkit-scrollbar { width: 10px; @@ -76,10 +78,11 @@ main { width: 50rem; margin-top: 4rem; - .post { + .post{ width: 45rem; padding-top: 1rem; - + } + .post > { h1 { a { letter-spacing: 0.0625rem; @@ -126,18 +129,67 @@ main { display: flex; justify-content: space-between; padding: 2rem 0 5rem 0; - + } + .pagenav > { a { text-decoration: none; margin: 0 2rem; } } + + .archives{ + width: 45rem; + padding-top: 1rem; + font-size: 0.875rem; + } + .archives > { + li { + list-style-type: none; + padding: 0; + } + + .year { + font-size: 1.4rem; + font-weight: 600; + line-height: 2.2rem; + letter-spacing: 0.1rem; + padding: 0.625rem 0; + } + + .list { + margin-bottom: 3rem; + line-height: 1.75rem; + + .title{ + padding-bottom: 0.3rem; + + a { + display: inline-block; + width: 85%; + color: #1f1f1f; + } + + .time { + float: right; + color: #c5c5c5; + font-size: 0.875rem; + } + + a:hover { + color: #1f1f1f; + } + } + } + + } } footer { padding: 2rem 0; + .copyright { font-size: 0.8rem; + a { margin: 0 0.125rem; diff --git a/source/css/color.css b/source/css/color.css index 61f72b2..a1acaeb 100644 --- a/source/css/color.css +++ b/source/css/color.css @@ -70,6 +70,15 @@ main .pagenav a { main .pagenav a:hover { color: rgba(0, 0, 0, 0.65); } +main .archives > .list .title a { + color: black; +} +main .archives > .list .title a:hover { + color: rgba(0, 0, 0, 0.65); +} +main .archives > .list .title .time { + color: #c5c5c5; +} footer .copyright a { color: rgba(0, 0, 0, 0.25); diff --git a/source/css/color.scss b/source/css/color.scss index 5043540..14cc143 100644 --- a/source/css/color.scss +++ b/source/css/color.scss @@ -63,7 +63,7 @@ body { main { background: #ffffff; box-shadow: 0 0.375rem 1rem -0.5rem rgba(0, 0, 0, 0.08); - + // 首页 .post { h1 { a { @@ -96,7 +96,7 @@ main { } } } - + // 文章分页 .pagenav { border-bottom: 1px solid #f2f2f2; @@ -108,6 +108,24 @@ main { } } } + // 归档页面 + .archives > { + .list { + .title{ + a { + color: rgb(0, 0, 0); + + &:hover { + color: rgb(0, 0, 0, 0.65); + } + } + .time { + color: #c5c5c5; + } + } + } + + } } // 脚注 @@ -122,4 +140,6 @@ footer { } } -} \ No newline at end of file +} + +// \ No newline at end of file