summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_config.yml25
-rw-r--r--layout/_partial/head.ejs2
-rw-r--r--layout/index.ejs11
-rw-r--r--layout/layout.ejs6
-rw-r--r--source/css/style.css5
-rw-r--r--source/css/style.min.css2
6 files changed, 47 insertions, 4 deletions
diff --git a/_config.yml b/_config.yml
index 4eb5da7..248dda1 100644
--- a/_config.yml
+++ b/_config.yml
@@ -110,4 +110,27 @@ rss:
'Education': ['How To', 'Language Learning'],
'Technology': []
}
- explicit: false \ No newline at end of file
+ explicit: false
+
+# Boardcast info will show in top of the post list
+# Color:
+# default: grey
+# danger: red
+# info: blue
+# warning: yellow
+# ------------------------------------------------------------
+# 站点消息广播 - 会显示在首页的文章列表顶部
+# 广播块颜色选择:
+# default: 灰色
+# danger: 红色
+# info: 蓝色
+# warning: 黄色
+boardcast:
+ enable: false
+ color: default
+ message: 'Memorial hero Yuan Longping.'
+
+# Site mourn mode, enable to get a global grayscale filter
+# ------------------------------------------------------------
+# 站点悼念模式 - 启用后会为站点整体提供灰色滤镜
+mourn: false
diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs
index e093db6..5e3296a 100644
--- a/layout/_partial/head.ejs
+++ b/layout/_partial/head.ejs
@@ -26,7 +26,7 @@
<% } %>
<!-- Scripts and styles -->
- <style>pre{background-color:none!important;padding:0!important}@media(prefers-color-scheme:dark){*{transition:backgourd-color .5s}.card{box-shadow:none!important;background-color:#121212!important}img:not([src*=".svg"]){filter:brightness(.7) contrast(1.2)}}@media screen and (max-width:1023px){.navbar-menu{box-shadow:0 8px 16px -8px rgb(10 10 10 / 10%)!important}.post-content{padding-top:0!important}.post-card{margin:0!important}}.post-podcast-player{padding-bottom:1.5rem}.post-card{margin:0 1rem 0 1rem}.navbar-brand .navbar-item:hover{background-color:inherit!important}.entry{margin-bottom:1.5rem!important;margin-top:1.5rem!important;transition:box-shadow .1s}.entry:hover{box-shadow:0 1em 2em -.125em rgb(10 10 10 / 10%),0 0 0 1px rgb(10 10 10 / 2%)}.pagination-bar{padding-left:.25rem;padding-right:.25rem}.footer{padding:1rem 1rem 1rem!important;background-color:transparent!important}</style>
+ <style>pre{background-color:none!important;padding:0!important}#mourn{filter:grayscale(1)!important;-webkit-filter:grayscale(1)!important}@media(prefers-color-scheme:dark){*{transition:backgourd-color .5s}.card{box-shadow:none!important;background-color:#121212!important}img:not([src*=".svg"]){filter:brightness(.7) contrast(1.2)}}@media screen and (max-width:1023px){.navbar-menu{box-shadow:0 8px 16px -8px rgb(10 10 10 / 10%)!important}.post-content{padding-top:0!important}.post-card{margin:0!important}}.post-podcast-player{padding-bottom:1.5rem}.post-card{margin:0 1rem 0 1rem}.navbar-brand .navbar-item:hover{background-color:inherit!important}.entry{margin-bottom:1.5rem!important;margin-top:1.5rem!important;transition:box-shadow .1s}.entry:hover{box-shadow:0 1em 2em -.125em rgb(10 10 10 / 10%),0 0 0 1px rgb(10 10 10 / 2%)}.pagination-bar{padding-left:.25rem;padding-right:.25rem}.footer{padding:1rem 1rem 1rem!important;background-color:transparent!important}</style>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma/css/bulma.min.css">
<link media="(prefers-color-scheme: dark)" rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jloh/bulma-prefers-dark/css/bulma-prefers-dark.min.css">
</head> \ No newline at end of file
diff --git a/layout/index.ejs b/layout/index.ejs
index 106b7f4..239edaa 100644
--- a/layout/index.ejs
+++ b/layout/index.ejs
@@ -1,3 +1,14 @@
+<% if (theme.boardcast.enable) { %>
+ <div class="columns">
+ <div class="column is-8 is-offset-2">
+ <article class="message is-<%- theme.boardcast.color %>">
+ <div class="message-body">
+ <%= theme.boardcast.message %>
+ </div>
+ </article>
+ </div>
+ </div>
+<% } %>
<% page.posts.each(function (post) { %>
<div class="columns">
<div class="column is-8 is-offset-2">
diff --git a/layout/layout.ejs b/layout/layout.ejs
index db6dfb5..62c04c3 100644
--- a/layout/layout.ejs
+++ b/layout/layout.ejs
@@ -1,5 +1,9 @@
<!DOCTYPE html>
-<html lang="<%= config.language %>">
+<% if (theme.mourn) { %>
+ <html lang="<%= config.language %>" id="mourn">
+<% } else { %>
+ <html lang="<%= config.language %>">
+<% } %>
<%- partial('_partial/head') %>
<body>
<%- partial('_partial/header') %>
diff --git a/source/css/style.css b/source/css/style.css
index c088265..d35828d 100644
--- a/source/css/style.css
+++ b/source/css/style.css
@@ -3,6 +3,11 @@ pre {
padding: 0%!important;
}
+#mourn {
+ filter: grayscale(1) !important;
+ -webkit-filter: grayscale(1) !important;
+}
+
@media(prefers-color-scheme:dark) {
* {
transition: backgourd-color .5s
diff --git a/source/css/style.min.css b/source/css/style.min.css
index 95e1388..d20c049 100644
--- a/source/css/style.min.css
+++ b/source/css/style.min.css
@@ -1 +1 @@
-pre{background-color:none!important;padding:0!important}@media(prefers-color-scheme:dark){*{transition:backgourd-color .5s}.card{box-shadow:none!important;background-color:#121212!important}img:not([src*=".svg"]){filter:brightness(.7) contrast(1.2)}}@media screen and (max-width:1023px){.navbar-menu{box-shadow:0 8px 16px -8px rgb(10 10 10 / 10%)!important}.post-content{padding-top:0!important}.post-card{margin:0!important}}.post-podcast-player{padding-bottom:1.5rem}.post-card{margin:0 1rem 0 1rem}.navbar-brand .navbar-item:hover{background-color:inherit!important}.entry{margin-bottom:1.5rem!important;margin-top:1.5rem!important;transition:box-shadow .1s}.entry:hover{box-shadow:0 1em 2em -.125em rgb(10 10 10 / 10%),0 0 0 1px rgb(10 10 10 / 2%)}.pagination-bar{padding-left:.25rem;padding-right:.25rem}.footer{padding:1rem 1rem 1rem!important;background-color:transparent!important} \ No newline at end of file
+pre{background-color:none!important;padding:0!important}#mourn{filter:grayscale(1)!important;-webkit-filter:grayscale(1)!important}@media(prefers-color-scheme:dark){*{transition:backgourd-color .5s}.card{box-shadow:none!important;background-color:#121212!important}img:not([src*=".svg"]){filter:brightness(.7) contrast(1.2)}}@media screen and (max-width:1023px){.navbar-menu{box-shadow:0 8px 16px -8px rgb(10 10 10 / 10%)!important}.post-content{padding-top:0!important}.post-card{margin:0!important}}.post-podcast-player{padding-bottom:1.5rem}.post-card{margin:0 1rem 0 1rem}.navbar-brand .navbar-item:hover{background-color:inherit!important}.entry{margin-bottom:1.5rem!important;margin-top:1.5rem!important;transition:box-shadow .1s}.entry:hover{box-shadow:0 1em 2em -.125em rgb(10 10 10 / 10%),0 0 0 1px rgb(10 10 10 / 2%)}.pagination-bar{padding-left:.25rem;padding-right:.25rem}.footer{padding:1rem 1rem 1rem!important;background-color:transparent!important} \ No newline at end of file