diff options
| author | Eltrac <45323514+BigCoke233@users.noreply.github.com> | 2019-07-21 16:49:35 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-21 16:49:35 +0800 |
| commit | 1fc5a9328769b28a92e918e05206265cb1428404 (patch) | |
| tree | 4da595555c4441ae5fc00cb315f893a712a71470 /includes | |
| parent | 0b4a6faa04150b1e9f907370199a927308404e41 (diff) | |
后台样式、支持主题备份、支持 CDN 加速静态资源、个性化设置
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/comments.php | 6 | ||||
| -rw-r--r-- | includes/footer.php | 11 | ||||
| -rw-r--r-- | includes/head.php | 29 |
3 files changed, 32 insertions, 14 deletions
diff --git a/includes/comments.php b/includes/comments.php index 257755d..5291561 100644 --- a/includes/comments.php +++ b/includes/comments.php @@ -26,7 +26,9 @@ echo $commentClass; </div>
<div class="comment-main comment-author-info col-md-11">
<div class="comment-content bubble">
- <span class="comment-reply"><?php $comments->reply('<i class="iconfont icon-return"></i>'); ?></span>
+ <span class="comment-reply">
+ <?php $comments->reply('<i class="iconfont icon-return"></i>'); ?>
+ </span>
<?php $comments->content(); ?>
</div>
<p class="comment-meta">
@@ -82,7 +84,7 @@ echo $commentClass; <!-- 如果当前用户已经登录 -->
<?php if($this->user->hasLogin()): ?>
<!-- 显示当前登录用户的用户名以及登出连接 -->
- <p><?php _e('登录身份: '); ?><a href="<?php $this->options->profileUrl(); ?>"><?php $this->user->screenName(); ?></a>. <a href="<?php $this->options->logoutUrl(); ?>" title="Logout"><?php _e('退出'); ?> »</a></p>
+ <p class="col-md-12"><?php _e('登录身份: '); ?><a href="<?php $this->options->profileUrl(); ?>"><?php $this->user->screenName(); ?></a>. <a href="<?php $this->options->logoutUrl(); ?>" title="Logout"><?php _e('退出'); ?> »</a></p>
<!-- 若当前用户未登录 -->
<?php else: ?>
<!-- 要求输入名字、邮箱、网址 -->
diff --git a/includes/footer.php b/includes/footer.php index 865d4fb..671ee49 100644 --- a/includes/footer.php +++ b/includes/footer.php @@ -14,6 +14,15 @@ <button onclick="Dark()" title="护眼模式" class="dark-button"><i class="iconfont icon-envira"></i></button> </div> <!-- JavaScript --> + <?php if($this->options->CDN && $this->options->CDN=1): ?> + <script src="https://cdn.jsdelivr.net/gh/BigCoke233/miracles@<?php themeVersion(); ?>/assets/js/jquery.js"></script> + <script src="https://cdn.jsdelivr.net/gh/BigCoke233/miracles@<?php themeVersion(); ?>/assets/js/pjax.jquery.js"></script> + <script src="https://cdn.jsdelivr.net/gh/BigCoke233/miracles@<?php themeVersion(); ?>/assets/js/jquery.fancybox.js"></script> + <script src="https://cdn.jsdelivr.net/gh/BigCoke233/miracles@<?php themeVersion(); ?>/assets/js/jquery.lazyload.js"></script> + <script src="https://cdn.jsdelivr.net/gh/BigCoke233/miracles@<?php themeVersion(); ?>/assets/js/nprogress.js"></script> + <script src="https://cdn.jsdelivr.net/gh/BigCoke233/miracles@<?php themeVersion(); ?>/assets/js/OwO.min.js"></script> + <script src="https://cdn.jsdelivr.net/gh/BigCoke233/miracles@<?php themeVersion(); ?>/assets/js/prism.js"></script> + <?php else: ?> <script src="<?php Utils::indexTheme('assets/js/jquery.js'); ?>"></script> <script src="<?php Utils::indexTheme('assets/js/pjax.jquery.js'); ?>"></script> <script src="<?php Utils::indexTheme('assets/js/jquery.fancybox.js'); ?>"></script> @@ -21,6 +30,7 @@ <script src="<?php Utils::indexTheme('assets/js/nprogress.js'); ?>"></script> <script src="<?php Utils::indexTheme('assets/js/OwO.min.js'); ?>"></script> <script src="<?php Utils::indexTheme('assets/js/prism.js'); ?>"></script> + <?php endif; ?> <script>var siteurl = '<?php $this->options->SiteUrl() ;?>'; var owoJson = '<?php Utils::indexTheme('assets/OwO.json'); ?>'; <?php if($this->options->pjax && $this->options->pjax!=0) :?> @@ -30,5 +40,6 @@ <?php endif; ?></script> <script src="<?php Utils::indexTheme('assets/js/miracles.min.js'); ?>"></script> <script>LazyLoad();PrismLoad();owoLoad();<?php $this->options->jsEcho(); ?></script> + <?php $this->footer(); ?> </body> </html> diff --git a/includes/head.php b/includes/head.php index b39867a..725841a 100644 --- a/includes/head.php +++ b/includes/head.php @@ -40,29 +40,34 @@ if (isset($_POST['action'])) { <meta name="twitter:description" content="<?php if($description != '') echo $description; else $this->excerpt(50); ?>" /> <meta name="twitter:card" content="summary" /> <meta name="twitter:image" content<?php echo $banner; ?>" /> - <link rel="icon" type="image/png" href="<?php Utils::indexTheme('favicon.ico'); ?>" /> <?php $this->header('description=&'); ?> <?php $this->options->headerEcho(); ?> <!-- css --> - <link rel="stylesheet" href="<?php Utils::indexTheme('assets/css/normalize.css'); ?>" /> - <link rel="stylesheet" href="<?php Utils::indexTheme('assets/css/nprogress.css'); ?>" /> + <?php if($this->options->CDN && $this->options->CDN=1): ?> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/BigCoke233/miracles@<?php themeVersion(); ?>/assets/css/prism.css" /> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/BigCoke233/miracles@<?php themeVersion(); ?>/assets/css/owo.min.css" /> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/BigCoke233/miracles@<?php themeVersion(); ?>/assets/css/normalize.css" /> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/BigCoke233/miracles@<?php themeVersion(); ?>/assets/css/fancybox.css" /> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/BigCoke233/miracles@<?php themeVersion(); ?>/assets/css/prism.css" /> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/BigCoke233/miracles@<?php themeVersion(); ?>/assets/css/miracles.min.css" /> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/BigCoke233/miracles@<?php themeVersion(); ?>/assets/css/dark.miracles.css" /> + <?php else: ?> <link rel="stylesheet" href="<?php Utils::indexTheme('assets/css/prism.css'); ?>" /> <link rel="stylesheet" href="<?php Utils::indexTheme('assets/css/owo.min.css'); ?>" /> + <link rel="stylesheet" href="<?php Utils::indexTheme('assets/css/normalize.css'); ?>" /> + <link rel="stylesheet" href="<?php Utils::indexTheme('assets/css/nprogress.css'); ?>" /> <link rel="stylesheet" href="<?php Utils::indexTheme('assets/css/fancybox.css'); ?>" /> <link rel="stylesheet" href="<?php Utils::indexTheme('assets/css/miracles.min.css'); ?>" /> <link rel="stylesheet" href="<?php Utils::indexTheme('assets/css/dark.miracles.css'); ?>" /> - + <?php endif; ?> <!-- icon font --> <link rel="stylesheet" href="//at.alicdn.com/t/font_1165190_q4ccniy74h.css" /> <!-- Google Fonts --> <link href="https://fonts.googleapis.com/css?family=Noto+Sans+SC:300|Noto+Serif+SC:300&display=swap" rel="stylesheet"> - - <style>.body-dark .pio-action .pio-home{background-image: url(<?php Utils::indexTheme('images/icons/home.png'); ?>);}.body-dark .pio-action .pio-close{background-image: url(<?php Utils::indexTheme('images/icons/remove.png'); ?>);}.body-dark .pio-action .pio-skin{background-image: url(<?php Utils::indexTheme('images/icons/skin.png'); ?>);}.body-dark .pio-action .pio-info{background-image: url(<?php Utils::indexTheme('images/icons/info.png'); ?>);}.body-dark .pio-action .pio-night{background-image: url(<?php Utils::indexTheme('images/icons/night.png'); ?>);}@media (min-width:992px) {.search{background-image:url(<?php Utils::indexTheme('images/search.png'); ?>);}.login{background-image:url(<?php Utils::indexTheme('images/login.png'); ?>)}} - .search {background-position: bottom right;background-repeat: no-repeat} - .login {background-position: bottom left;background-repeat:no-repeat} - <?php $this->options->cssEcho(); ?> - <?php $this->options->cssEcho(); ?> - </style> + <style>.body-dark .pio-action .pio-home{background-image: url(<?php Utils::indexTheme('images/icons/home.png'); ?>);}.body-dark .pio-action .pio-close{background-image: url(<?php Utils::indexTheme('images/icons/remove.png'); ?>);}.body-dark .pio-action .pio-skin{background-image: url(<?php Utils::indexTheme('images/icons/skin.png'); ?>);}.body-dark .pio-action .pio-info{background-image: url(<?php Utils::indexTheme('images/icons/info.png'); ?>);}.body-dark .pio-action .pio-night{background-image: url(<?php Utils::indexTheme('images/icons/night.png'); ?>);}@media (min-width:992px) {.search{background-image:url(<?php Utils::indexTheme('images/search.png'); ?>);}.login{background-image:url(<?php Utils::indexTheme('images/login.png'); ?>)}}.search {background-position: bottom right;background-repeat: no-repeat}.login {background-position: bottom left;background-repeat:no-repeat}<?php $this->options->cssEcho(); ?></style> </head> - <body class="body-sans-serif">
\ No newline at end of file + <body class="<?php if($this->options->bodyFonts && $this->options->bodyFonts=1): ?> body-serif<?php endif; ?><?php if($this->options->grayTheme && $this->options->grayTheme=1): ?> body-gray<?php endif; ?>"> + <!--[if lt IE 9]> + <div class="message error browsehappy" role="dialog">当前网页 <strong>不支持</strong> 你正在使用的浏览器. 为了正常的访问, 请 <a href="http://browsehappy.com/">升级你的浏览器</a>.</div> + <![endif]-->
\ No newline at end of file |
