From c36238dff6cb9fb0b47e009350b94d751f457424 Mon Sep 17 00:00:00 2001 From: haoouba <2323333339@qq.com> Date: Fri, 5 Feb 2021 22:00:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/cursor/cursor3.js | 2 +- assets/js/joe.post&page.js | 2 +- functions.php | 43 ++++++++++++++++++++++++++++---------- public/footer.php | 1 + public/include.php | 4 +++- 5 files changed, 38 insertions(+), 14 deletions(-) diff --git a/assets/cursor/cursor3.js b/assets/cursor/cursor3.js index 87daea4..9ab7eec 100644 --- a/assets/cursor/cursor3.js +++ b/assets/cursor/cursor3.js @@ -1 +1 @@ -$(document).ready(function(){var e=0;$("html").click(function(t){var n=new Array("富强","民主","文明","和谐","自由","平等","公正","法治","爱国","敬业","诚信","友善"),o=$("").text(n[e]);e=(e+1)%n.length;var a=t.pageX,c=t.pageY;o.css({"z-index":5201314,top:c-20,left:a,position:"fixed","font-weight":"bold",color:"var(--theme)","user-select":"none"}),$("body").append(o),o.animate({top:c-180,opacity:0},1500,function(){o.remove()})})}); \ No newline at end of file +$(function(){var e=0;$(document).on("click",function(t){var n=new Array("富强","民主","文明","和谐","自由","平等","公正","法治","爱国","敬业","诚信","友善"),o=$("").text(n[e]);e=(e+1)%n.length;var a=t.pageX,c=t.pageY;o.css({"z-index":5201314,top:c-20,left:a,position:"absolute",color:"var(--theme)","user-select":"none"}),$("body").append(o),o.animate({top:c-180,opacity:0},1500,function(){o.remove();});});}); \ No newline at end of file diff --git a/assets/js/joe.post&page.js b/assets/js/joe.post&page.js index 0081477..954ac5e 100644 --- a/assets/js/joe.post&page.js +++ b/assets/js/joe.post&page.js @@ -52,7 +52,7 @@ document.addEventListener('DOMContentLoaded', () => { /* 激活图片预览功能 */ { $('.joe_detail__article img:not(img.owo_image)').each(function () { - $(this).wrap($(`
`)); + $(this).wrap($(``)); }); } diff --git a/functions.php b/functions.php index 506a84d..5e3d10e 100644 --- a/functions.php +++ b/functions.php @@ -269,6 +269,26 @@ function themeConfig($form) $JCursorEffects->setAttribute('class', 'joe_content joe_global'); $form->addInput($JCursorEffects->multiMode()); + $JCustomCSS = new Typecho_Widget_Helper_Form_Element_Textarea( + 'JCustomCSS', + NULL, + NULL, + '自定义CSS(非必填)', + '介绍:请填写自定义CSS内容,填写时无需填写style标签。' + ); + $JCustomCSS->setAttribute('class', 'joe_content joe_global'); + $form->addInput($JCustomCSS); + + $JCustomScript = new Typecho_Widget_Helper_Form_Element_Textarea( + 'JCustomScript', + NULL, + NULL, + '自定义JS(非必填)', + '介绍:请填写自定义JS内容,例如网站统计等,填写时无需填写script标签。' + ); + $JCustomScript->setAttribute('class', 'joe_content joe_global'); + $form->addInput($JCustomScript); + $JAside = new Typecho_Widget_Helper_Form_Element_Checkbox( 'JAside', array( @@ -633,17 +653,6 @@ function themeConfig($form) $JFriends->setAttribute('class', 'joe_content joe_other'); $form->addInput($JFriends); - $JBaiduToken = new Typecho_Widget_Helper_Form_Element_Text( - 'JBaiduToken', - NULL, - NULL, - '百度推送Token', - '介绍:填写此处,前台文章页如果未收录,则会自动将当前链接推送给百度加快收录 - 其他:Token在百度收录平台注册账号获取' - ); - $JBaiduToken->setAttribute('class', 'joe_content joe_other'); - $form->addInput($JBaiduToken); - $JMaccmsAPI = new Typecho_Widget_Helper_Form_Element_Text( 'JMaccmsAPI', NULL, @@ -668,4 +677,16 @@ function themeConfig($form) ); $JCustomPlayer->setAttribute('class', 'joe_content joe_other'); $form->addInput($JCustomPlayer); + + + $JBaiduToken = new Typecho_Widget_Helper_Form_Element_Text( + 'JBaiduToken', + NULL, + NULL, + '百度推送Token', + '介绍:填写此处,前台文章页如果未收录,则会自动将当前链接推送给百度加快收录 + 其他:Token在百度收录平台注册账号获取' + ); + $JBaiduToken->setAttribute('class', 'joe_content joe_post'); + $form->addInput($JBaiduToken); } ?> \ No newline at end of file diff --git a/public/footer.php b/public/footer.php index 607a444..36b0201 100644 --- a/public/footer.php +++ b/public/footer.php @@ -29,6 +29,7 @@ footer(); ?> \ No newline at end of file diff --git a/public/include.php b/public/include.php index 72d1989..db36154 100644 --- a/public/include.php +++ b/public/include.php @@ -41,6 +41,8 @@ background-repeat: no-repeat; background-size: cover; } + + options->JCustomCSS() ?> @@ -75,5 +77,5 @@ options->JCursorEffects && $this->options->JCursorEffects !== 'off') : ?> - + \ No newline at end of file