diff --git a/settings.yaml b/settings.yaml index d9e3c1e..15c77c6 100644 --- a/settings.yaml +++ b/settings.yaml @@ -33,6 +33,20 @@ spec: label: 归档页显示文章标签 value: false + - $formkit: checkbox + name: show_pin + label: 主页置顶文章显示 pin 图标 + value: true + + - $formkit: select + name: pin_pos + label: pin 图标显示位置 + options: + - label: "left" + value: "pin-left" + - label: "above" + value: "pin-above" + - $formkit: text name: archives_title label: 归档页标题自定义 diff --git a/src/styles/post.scss b/src/styles/post.scss index 66a693f..bfb9bcd 100644 --- a/src/styles/post.scss +++ b/src/styles/post.scss @@ -53,6 +53,18 @@ font-weight: 400; } +.pin, .pin svg { + width: calc(1em * 0.8); +} + +.pin.pin-left { + display: inline; +} + +.pin.pin-above { + display: block; +} + .post-title::after { content: ""; position: absolute; diff --git a/templates/index.html b/templates/index.html index a801ae1..3a8e354 100644 --- a/templates/index.html +++ b/templates/index.html @@ -16,6 +16,14 @@

+ + + + + + + + Post Title