From e5e1ca64d04e5077269acb92f0f97f4c3a405a0c Mon Sep 17 00:00:00 2001 From: Eltrac Koalar Date: Sun, 25 Sep 2022 14:47:27 +0800 Subject: =?UTF-8?q?:lock:=20Add:=20=E4=B8=BA=E5=AF=86=E7=A0=81=E4=BF=9D?= =?UTF-8?q?=E6=8A=A4=E6=96=87=E7=AB=A0=E7=9A=84=E8=A1=A8=E5=8D=95=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/matcha/matcha.post.css | 40 +++++++++++++++++++++++++++++++++++----- functions.php | 1 - 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/assets/matcha/matcha.post.css b/assets/matcha/matcha.post.css index 56a063c..9b2e599 100644 --- a/assets/matcha/matcha.post.css +++ b/assets/matcha/matcha.post.css @@ -278,11 +278,6 @@ font-size: 1em; } -/* 密码保护 */ -.protected .text { - width: 50%; -} - /* 文章目录 */ .tocbar { position: fixed; @@ -614,6 +609,41 @@ h3.comment-closed.fade { } } +/* 密码保护 */ + +.protected { + max-width: 400px; + margin: 0 auto; + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-around; +} + +.protected .word { + display: none +} + +.protected input { + border: 2px solid var(--light-gray-bg); + box-sizing: border-box; + padding: .4em .8em; + border-radius: 3px +} + +.protected input[type="submit"] { + background: var(--theme-color); + color: #fff; + border: 2px solid var(--theme-color); + cursor: pointer +} + +.post-atmain .protected { + justify-content: flex-start; + width: auto; + margin: 0 +} + /* 其他 */ .external-icon { diff --git a/functions.php b/functions.php index 9c139c9..5a2f7ff 100644 --- a/functions.php +++ b/functions.php @@ -14,7 +14,6 @@ Typecho_Plugin::factory('Widget_Abstract_Contents')->contentEx = array('Matcha', Typecho_Plugin::factory('Widget_Abstract_Contents')->excerptEx = array('Matcha','parseContent'); function themeInit($archive) { - if ($archive->hidden) header('HTTP/1.1 200 OK');//暴力解决访问加密文章会被 pjax 刷新页面的问题 Helper::options()->commentsAntiSpam = false; //关闭反垃圾 Helper::options()->commentsMaxNestingLevels = '9999';//最大嵌套层数 Helper::options()->commentsPageDisplay = 'first';//强制评论第一页 -- cgit v1.2.3