From 3def1ca01fc20e6f6da887182202f10047e3a912 Mon Sep 17 00:00:00 2001 From: BigCoke233 Date: Wed, 15 Apr 2020 17:26:50 +0800 Subject: =?UTF-8?q?:alien:=20Add:=20=E6=B7=BB=E5=8A=A0=209jojo=20CDN=20?= =?UTF-8?q?=E4=BD=9C=E4=B8=BA=E9=9D=99=E6=80=81=E6=96=87=E4=BB=B6=E5=8A=A0?= =?UTF-8?q?=E9=80=9F=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- footer.php | 49 ------------------------------------------------- functions.php | 21 +++++++++++++-------- includes/footer.php | 7 +++++-- libs/Options.php | 24 ++++++++++++++++++++---- 4 files changed, 38 insertions(+), 63 deletions(-) delete mode 100644 footer.php diff --git a/footer.php b/footer.php deleted file mode 100644 index 731b2d7..0000000 --- a/footer.php +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - -
- -
- - options->CDN?"https://cdn.jsdelivr.net/gh/BigCoke233/miracles@":""); - ?> - - - - - - - - - - - footer(); ?> - - diff --git a/functions.php b/functions.php index 1ddceb2..d6d4f73 100644 --- a/functions.php +++ b/functions.php @@ -82,24 +82,29 @@ array_push($views, $cid); */ function generate_require($files,$type,$cdn,$custom) { if ($cdn=='1'){ - $path = 'https://cdn.jsdelivr.net/gh/BigCoke233/miracles@'.themeVersion()."/"; + $path = 'https://cdn.jsdelivr.net/gh/BigCoke233/miracles@'.themeVersion()."/assets/"; } elseif ($cdn=='2'){ - $path = 'https://raw.githack.com/BigCoke233/miracles/master/'; + $path = 'https://raw.githack.com/BigCoke233/miracles/master/assets/'; } elseif ($cdn=='4'){ - $path = 'https://rawcdn.githack.com/BigCoke233/miracles/master/'; + $path = 'https://rawcdn.githack.com/BigCoke233/miracles/master/assets/'; + } + elseif ($cdn=='5'){ + $path = 'https://cdn.9jojo.cn/Miracles/'; } elseif ($cdn=='3'){ $path = $custom; }else{ - $path = Helper::options()->themeUrl("","Miracles"); + $path = Helper::options()->themeUrl("","Miracles/assets"); } foreach ($files as $file) { - if ($type == "js") - echo ""; - elseif ($type == "css") - echo ""; + if ($type == "js"){ + echo ""; + } + elseif ($type == "css"){ + echo ""; + } } } diff --git a/includes/footer.php b/includes/footer.php index 670367e..873e04c 100644 --- a/includes/footer.php +++ b/includes/footer.php @@ -36,8 +36,11 @@ beforePjax = function() {NProgress.start();}; afterPjax = function() {owoLoad();options->pjax_complete(); ?>}; - - + options->customCDN): $custom=$this->options->customCDN; else: $custom=Helper::options()->themeUrl("","Miracles"); endif; + generate_require($js_files,"js",$this->options->CDN,$custom); + ?>