Jony/public/include.php

75 lines
5.0 KiB
PHP
Raw Normal View History

2021-01-25 03:29:51 +00:00
<script>
2021-01-27 05:00:55 +00:00
/* 用于页面一进入直接判断是否是黑夜模式请勿将它移走或删除必须放这里解决闪烁问题下面的style也是请勿修改 */
if (localStorage.getItem('data-night')) document.querySelector("html").setAttribute("data-night", "night")
2021-01-25 03:29:51 +00:00
window.Joe = {
2021-01-26 13:41:01 +00:00
LIVE2D: '<?php $this->options->JLive2d() ?>',
2021-02-03 09:58:16 +00:00
// BASE_API: '<?php echo $this->options->rewrite == 0 ? '/index.php/joe/api' : '/joe/api' ?>',
2021-01-26 13:41:01 +00:00
BASE_API: '/index.php/joe/api',
DYNAMIC_BACKGROUND: '<?php $this->options->JDynamic_Background() ?>',
WALLPAPER_BACKGROUND_PC: '<?php $this->options->JWallpaper_Background_PC() ?>',
IS_MOBILE: /windows phone|iphone|android/gi.test(window.navigator.userAgent),
BAIDU_PUSH: <?php echo $this->options->JBaiduToken ? 'true' : 'false' ?>,
2021-01-27 11:01:49 +00:00
DOCUMENT_TITLE: '<?php $this->options->JDocumentTitle() ?>',
2021-01-28 11:30:39 +00:00
LAZY_LOAD: '<?php _getLazyload() ?>',
2021-01-26 13:41:01 +00:00
encryption: str => window.btoa(unescape(encodeURIComponent(str))),
decrypt: str => decodeURIComponent(escape(window.atob(str))),
2021-01-27 09:10:23 +00:00
changeURLArg: function(url, arg, arg_val) {
let pattern = arg + '=([^&]*)'
let replaceText = arg + '=' + arg_val
if (url.match(pattern)) {
let tmp = '/(' + arg + '=)([^&]*)/gi'
return url.replace(eval(tmp), replaceText)
} else {
if (url.match('[?]')) {
return url + '&' + replaceText
} else {
return url + '?' + replaceText
}
}
return url + '\n' + arg + '\n' + arg_val
}
2021-01-25 03:29:51 +00:00
}
</script>
<style>
body::before {
background: <?php
if (_isMobile()) {
echo $this->options->JWallpaper_Background_WAP ? "url(" . $this->options->JWallpaper_Background_WAP . ")" : "#f5f5f5";
} else {
echo $this->options->JWallpaper_Background_PC ? "url(" . $this->options->JWallpaper_Background_PC . ")" : "#f5f5f5";
2021-01-27 05:00:55 +00:00
} ?>;
2021-01-25 03:29:51 +00:00
background-position: center 0;
background-repeat: no-repeat;
background-size: cover;
}
</style>
2021-01-26 13:41:01 +00:00
<!-- <<<<<<<<<<<<<<<<<<<< 主题开始 >>>>>>>>>>>>>>>>>>>> -->
<meta charset="utf-8" />
<meta name="renderer" content="webkit" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, shrink-to-fit=no, viewport-fit=cover">
<link rel="shortcut icon" href="<?php $this->options->JFavicon() ?>" />
<title><?php $this->archiveTitle(array('category' => '分类 %s 下的文章', 'search' => '包含关键字 %s 的文章', 'tag' => '标签 %s 下的文章', 'author' => '%s 发布的文章'), '', ' - '); ?><?php $this->options->title(); ?></title>
<?php $this->header(); ?>
2021-01-27 05:00:55 +00:00
<!-- 全局公用CSS静态资源放在了CDN上如果你的服务器带宽不够请不要修改成本地cdn采用jsdelivr放心不会失效 -->
2021-01-26 13:41:01 +00:00
<link rel="stylesheet" href="https://apip.weatherdt.com/standard/static/css/weather-standard.css">
2021-01-27 05:00:55 +00:00
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-tomorrow.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@5.4.5/css/swiper.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.7.2/animate.min.css" />
<link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/joe.normalize.css'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/joe.global.css'); ?>">
<!-- 全局公用JS静态资源放在了CDN上如果你的服务器带宽不够请不要修改成本地cdn采用jsdelivr放心不会失效 -->
2021-01-20 04:39:49 +00:00
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script>
2021-01-27 05:03:12 +00:00
<script src="https://cdn.jsdelivr.net/gh/HaoOuBa/Joe@master/plugin/scroll/joe.scroll.js"></script>
<script src="https://cdn.jsdelivr.net/gh/HaoOuBa/Joe@master/plugin/lazyload/joe.lazyload.js"></script>
<script src="https://cdn.jsdelivr.net/gh/HaoOuBa/Joe@master/plugin/sketchpad/joe.sketchpad.js"></script>
2021-01-27 05:00:55 +00:00
<script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/swiper@5.4.5/js/swiper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/wowjs@1.1.3/dist/wow.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
2021-01-20 08:06:51 +00:00
<script src="<?php $this->options->themeUrl('assets/js/joe.global.js'); ?>"></script>
2021-01-26 13:41:01 +00:00
<!-- 下面是异步加载的JS -->
2021-01-22 05:28:15 +00:00
<script async src="https://apip.weatherdt.com/standard/static/js/weather-standard.js?v=2.0"></script>
2021-01-27 05:03:12 +00:00
<script async src="https://cdn.jsdelivr.net/gh/HaoOuBa/Joe@master/plugin/smooth/joe.smooth.js"></script>