summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEltrac Koalar <hi@guhub.cn>2022-09-25 14:47:27 +0800
committerEltrac Koalar <hi@guhub.cn>2022-09-25 14:47:27 +0800
commite5e1ca64d04e5077269acb92f0f97f4c3a405a0c (patch)
treeb736872bc65f6b4b865b9881a2cfa1da01ace5cd
parentfd0a662000ae32140ad76e14db2de995493c6913 (diff)
:lock: Add: 为密码保护文章的表单添加样式
-rw-r--r--assets/matcha/matcha.post.css40
-rw-r--r--functions.php1
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';//强制评论第一页