diff --git a/README.md b/README.md index edeb578..10746a3 100644 --- a/README.md +++ b/README.md @@ -240,9 +240,6 @@ katex: # since year since: 2019 -# pageFooter (Set true can let more people know this theme, Thanks!) -pageFooter: true - # only for chinese website # ICP icp: @@ -324,6 +321,11 @@ ads: img: https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/img/ten_2.jpg url: https://curl.qcloud.com/kvO7hb43 width: 300 + +# encrypt settings +lock: + enable: false + password: 123456 ``` ## Plugins diff --git a/_config.yml b/_config.yml index b2ae374..c32d376 100644 --- a/_config.yml +++ b/_config.yml @@ -166,9 +166,6 @@ mermaid: # 网站成立年份(默认为 2019,若填入年份小于当前年份,则显示为 2018-2019 类似的格式) since: 2015 -# 是否显示页脚信息(建议保留) -pageFooter: true - # ICP备案信息尾部显示 icp: enable: false @@ -251,3 +248,8 @@ ads: img: https://cdn.jsdelivr.net/gh/Shen-Yu/cdn/img/vultr.png url: https://www.vultr.com/?ref=8630075 width: 300 + +# 网站开启加密访问,密码可设置任何字符 +lock: + enable: false + password: 123456 diff --git a/languages/de.yml b/languages/de.yml index e830d88..632a96a 100644 --- a/languages/de.yml +++ b/languages/de.yml @@ -30,3 +30,9 @@ post: sticky: Oben copyright_title: Copyright-Hinweis copyright_content: Sofern nicht anders angegeben, liegt das Urheberrecht aller Artikel in diesem Blog beim Autor. Nachdruck bitte Quelle angeben! + +lock: + lock_info: Please enter password + lock_error: Incorrect password, please try again + confirm_text: Ok + cancel_text: Cancel diff --git a/languages/default.yml b/languages/default.yml index 51fc0d1..098277d 100644 --- a/languages/default.yml +++ b/languages/default.yml @@ -30,3 +30,9 @@ post: sticky: Sticky copyright_title: Copyright copyright_content: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source. + +lock: + lock_info: Please enter password + lock_error: Incorrect password, please try again + confirm_text: Ok + cancel_text: Cancel diff --git a/languages/en.yml b/languages/en.yml index 51fc0d1..098277d 100644 --- a/languages/en.yml +++ b/languages/en.yml @@ -30,3 +30,9 @@ post: sticky: Sticky copyright_title: Copyright copyright_content: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source. + +lock: + lock_info: Please enter password + lock_error: Incorrect password, please try again + confirm_text: Ok + cancel_text: Cancel diff --git a/languages/es.yml b/languages/es.yml index 94020b7..512750d 100644 --- a/languages/es.yml +++ b/languages/es.yml @@ -30,3 +30,9 @@ post: sticky: Arriba copyright_title: Derechos de autor copyright_content: Los derechos de autor son propiedad del autor. Para reimpresiones comerciales, comuníquese con el autor para obtener autorización. Para reimpresiones no comerciales, indique la fuente. + +lock: + lock_info: Please enter password + lock_error: Incorrect password, please try again + confirm_text: Ok + cancel_text: Cancel diff --git a/languages/fr.yml b/languages/fr.yml index d95f5b2..3b91e01 100644 --- a/languages/fr.yml +++ b/languages/fr.yml @@ -30,3 +30,9 @@ post: sticky: Haut copyright_title: Avis de copyright copyright_content: Le droit d'auteur appartient à l'auteur. Pour les réimpressions commerciales, veuillez contacter l'auteur pour autorisation. Pour les réimpressions non commerciales, veuillez indiquer la source. + +lock: + lock_info: Please enter password + lock_error: Incorrect password, please try again + confirm_text: Ok + cancel_text: Cancel diff --git a/languages/ja.yml b/languages/ja.yml index 254d445..6755aae 100644 --- a/languages/ja.yml +++ b/languages/ja.yml @@ -30,3 +30,9 @@ post: sticky: 上へ copyright_title: 著作権表示 copyright_content: 著作権は著者が所有しています。商業版の複製については、承認について著者に連絡してください。非商業版の複製については、出典を明記してください。 + +lock: + lock_info: Please enter password + lock_error: Incorrect password, please try again + confirm_text: Ok + cancel_text: Cancel diff --git a/languages/ko.yml b/languages/ko.yml index 344028c..0825697 100644 --- a/languages/ko.yml +++ b/languages/ko.yml @@ -30,3 +30,9 @@ post: sticky: 톱 copyright_title: 저작권 고지 copyright_content: 저작권은 저자가 소유합니다. 상업용 재 인쇄의 경우 승인을 위해 저자에게 문의하십시오. 비상업적 재 인쇄의 경우 출처를 명시하십시오. + +lock: + lock_info: Please enter password + lock_error: Incorrect password, please try again + confirm_text: Ok + cancel_text: Cancel diff --git a/languages/nl.yml b/languages/nl.yml index 95cb5a4..5478046 100644 --- a/languages/nl.yml +++ b/languages/nl.yml @@ -30,3 +30,9 @@ post: sticky: Sticky copyright_title: Copyright melding copyright_content: Copyright is eigendom van de auteur. Neem voor commerciële herdrukken contact op met de auteur voor autorisatie. Geef de bron aan voor niet-commerciële herdrukken. + +lock: + lock_info: Please enter password + lock_error: Incorrect password, please try again + confirm_text: Ok + cancel_text: Cancel diff --git a/languages/no.yml b/languages/no.yml index 5cf1573..0c6214c 100644 --- a/languages/no.yml +++ b/languages/no.yml @@ -30,3 +30,9 @@ post: sticky: Sticky copyright_title: Opphavsrett copyright_content: Opphavsrett eies av forfatteren. For kommersielle opptrykk, vennligst kontakt forfatteren for godkjenning. For ikke-kommersiell uttrykk, vennligst oppgi kilden. + +lock: + lock_info: Please enter password + lock_error: Incorrect password, please try again + confirm_text: Ok + cancel_text: Cancel diff --git a/languages/pt.yml b/languages/pt.yml index acc99d8..9c94696 100644 --- a/languages/pt.yml +++ b/languages/pt.yml @@ -30,3 +30,9 @@ post: sticky: Sticky copyright_title: direito autoral copyright_content: Os direitos autorais são de propriedade do autor. Para reimpressões comerciais, entre em contato com o autor para obter autorização. Para reimpressões não comerciais, indique a fonte. + +lock: + lock_info: Please enter password + lock_error: Incorrect password, please try again + confirm_text: Ok + cancel_text: Cancel diff --git a/languages/ru.yml b/languages/ru.yml index 2c7a093..efdfb35 100644 --- a/languages/ru.yml +++ b/languages/ru.yml @@ -30,3 +30,9 @@ post: sticky: липкий copyright_title: Авторские права copyright_content: Авторские права принадлежат автору. Для коммерческих перепечаток, пожалуйста, свяжитесь с автором для авторизации. Для некоммерческих перепечаток, пожалуйста, укажите источник. + +lock: + lock_info: Please enter password + lock_error: Incorrect password, please try again + confirm_text: Ok + cancel_text: Cancel diff --git a/languages/vi.yml b/languages/vi.yml index d825c65..b8d711d 100644 --- a/languages/vi.yml +++ b/languages/vi.yml @@ -30,3 +30,9 @@ post: sticky: dính copyright_title: Bản quyền copyright_content: Bản quyền thuộc sở hữu của tác giả. Đối với tái bản thương mại, xin vui lòng liên hệ với tác giả cho phép. Đối với tái bản phi thương mại, xin vui lòng cho biết nguồn. + +lock: + lock_info: Please enter password + lock_error: Incorrect password, please try again + confirm_text: Ok + cancel_text: Cancel diff --git a/languages/zh-CN.yml b/languages/zh-CN.yml index 6f6f693..2f0acb1 100644 --- a/languages/zh-CN.yml +++ b/languages/zh-CN.yml @@ -30,3 +30,9 @@ post: sticky: 置顶 copyright_title: 版权声明 copyright_content: 本博客所有文章除特别声明外,著作权归作者所有。转载请注明出处! + +lock: + lock_info: 请输入访问密码 + lock_error: 密码错误,请重试 + confirm_text: 确定 + cancel_text: 取消 diff --git a/languages/zh-TW.yml b/languages/zh-TW.yml index b263da8..f802d31 100644 --- a/languages/zh-TW.yml +++ b/languages/zh-TW.yml @@ -30,3 +30,9 @@ post: sticky: 置頂 copyright_title: 版權聲明 copyright_content: 本博客所有文章除特別聲明外,著作權歸作者所有。轉載請註明出處! + +lock: + lock_info: 請輸入訪問密碼 + lock_error: 密碼錯誤,請重試 + confirm_text: 確定 + cancel_text: 取消 diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index 905ebd9..0b1e2da 100644 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -40,10 +40,21 @@ <% } %> <%- partial('google-analytics') %> <%- partial('baidu-analytics') %> + + + <% if (theme.mermaid.enable) { %> <% } %> + diff --git a/layout/_partial/lock.ejs b/layout/_partial/lock.ejs new file mode 100644 index 0000000..0233622 --- /dev/null +++ b/layout/_partial/lock.ejs @@ -0,0 +1,37 @@ +<% if (theme.lock.enable){ %> + +<% } %> diff --git a/layout/layout.ejs b/layout/layout.ejs index 07d71f4..9de52bf 100644 --- a/layout/layout.ejs +++ b/layout/layout.ejs @@ -34,6 +34,7 @@ <% if (theme.music&&theme.music.enable){ %> <%- partial('_partial/music') %> <% } %> + <%- partial('_partial/lock') %>