summaryrefslogtreecommitdiff
path: root/layout
diff options
context:
space:
mode:
authorDoge <[email protected]>2021-05-22 20:59:07 +0800
committerDoge <[email protected]>2021-05-22 20:59:07 +0800
commit05a646a7ef4b001fd4cb314173812d0674a5a0ea (patch)
tree0b0be3b1645a1c0443bba5f95851cad703447e31 /layout
parentc2da19e13d5b38c465192c0d4ac0437c01c4fb22 (diff)
downloadchromate-05a646a7ef4b001fd4cb314173812d0674a5a0ea.tar.gz
chromate-05a646a7ef4b001fd4cb314173812d0674a5a0ea.tar.bz2
chromate-05a646a7ef4b001fd4cb314173812d0674a5a0ea.zip
Add site boardcast support with mourn mode
Diffstat (limited to 'layout')
-rw-r--r--layout/_partial/head.ejs2
-rw-r--r--layout/index.ejs11
-rw-r--r--layout/layout.ejs6
3 files changed, 17 insertions, 2 deletions
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') %>