summaryrefslogtreecommitdiffstats
path: root/includes
diff options
context:
space:
mode:
authorEltrac <45323514+BigCoke233@users.noreply.github.com>2019-08-22 20:43:41 +0800
committerGitHub <noreply@github.com>2019-08-22 20:43:41 +0800
commit52b009837588f9af8672354d07609735a711c4fe (patch)
treecd33384400dfa50e0c09720088c977817dcb2349 /includes
parent4bb2219701616124fb78c6f8fb351260f4784565 (diff)
Add files via upload
Diffstat (limited to 'includes')
-rw-r--r--includes/comments.php2
-rw-r--r--includes/footer.php20
-rw-r--r--includes/header.php46
3 files changed, 36 insertions, 32 deletions
diff --git a/includes/comments.php b/includes/comments.php
index 785f2d6..3458ac9 100644
--- a/includes/comments.php
+++ b/includes/comments.php
@@ -116,6 +116,8 @@ echo $commentClass;
<!-- 若当前文章不允许进行评论 -->
<?php else: ?>
<h3 class="comment-closed-alert"><?php _e('<i class="iconfont icon-x"></i> 评论已关闭'); ?></h3>
+ <!-- 防止找不到 owo 容器而报错 -->
+ <div style="display:none" class="OwO"></div>
<?php endif; ?>
</div>
</div>
diff --git a/includes/footer.php b/includes/footer.php
index d6444c2..6f16238 100644
--- a/includes/footer.php
+++ b/includes/footer.php
@@ -1,6 +1,6 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
</div><!-- 结束 pjax-container -->
- <!-- 页脚信息 -->
+ <!-- Footer Information -->
<footer>
<div class="footer-info footer-dark">
<p class="copyright">&copy; <?php echo date('Y'); ?> <a href="<?php $this->options->SiteUrl(); ?>"><?php $this->options->title(); ?></a> All rights reserved.<br />
@@ -8,9 +8,9 @@
<?php $this->options->footerEcho(); ?>
</div>
</footer>
- <!-- 悬浮按钮 -->
+ <!-- Raised Buttons -->
<div class="fixed-tools">
- <button onclick="GoTop()" title="返回顶部" class="fixed-button gotop-button" style="color:white;"><i class="iconfont icon-chevron-up"></i></button>
+ <button title="返回顶部" class="fixed-button gotop-button" id="gotop" style="color:white;"><i class="iconfont icon-chevron-up"></i></button>
</div>
<!-- JavaScript -->
<?php if($this->options->CDN && $this->options->CDN=1): ?>
@@ -22,7 +22,7 @@
<script src="https://cdn.jsdelivr.net/gh/BigCoke233/miracles@<?php echo themeVersion(); ?>/assets/js/OwO.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/BigCoke233/miracles@<?php echo themeVersion(); ?>/assets/js/prism.js"></script>
<script src="https://cdn.jsdelivr.net/gh/BigCoke233/miracles@<?php echo themeVersion(); ?>/assets/js/pangu.js"></script>
- <script src="https://cdn.jsdelivr.net/gh/BigCoke233/miracles@<?php echo themeVersion(); ?>/assets/js/l2dwidget.min.js"></script>
+ <?php if($this->options->cat!=0 || $this->options->customModel!=''): ?><script src="https://cdn.jsdelivr.net/gh/BigCoke233/miracles@<?php echo themeVersion(); ?>/assets/js/l2dwidget.min.js"></script><?php endif; ?>
<?php else: ?>
<script src="<?php Utils::indexTheme('assets/js/jquery.js'); ?>"></script>
<script src="<?php Utils::indexTheme('assets/js/pjax.jquery.js'); ?>"></script>
@@ -32,16 +32,18 @@
<script src="<?php Utils::indexTheme('assets/js/OwO.min.js'); ?>"></script>
<script src="<?php Utils::indexTheme('assets/js/prism.js'); ?>"></script>
<script src="<?php Utils::indexTheme('assets/js/pangu.js'); ?>"></script>
- <script src="<?php Utils::indexTheme('assets/js/l2dwidget.min.js'); ?>"></script>
<?php endif; ?>
- <script>var siteurl = '<?php $this->options->SiteUrl() ;?>';var owoJson = '<?php Utils::indexTheme('assets/OwO.json'); ?>';<?php if($this->options->customModel!=''): ?>var modelJson = "<?php echo $this->options->customModel(); ?>";<?php else: ?>var modelJson = '<?php if($this->options->cat && $this->options->cat==1){Utils::indexTheme('assets/model/hijiki/assets/hijiki.model.json');}elseif($this->options->cat && $this->options->cat==2){Utils::indexTheme('assets/model/tororo/assets/tororo.model.json');}?>';<?php endif; ?>
- <?php if($this->options->ModelHeight!=NULL): ?>var modelHeight = <?php echo $this->options->ModelHeight(); ?>;<?php endif; ?>
- <?php if($this->options->ModelWidth!=NULL): ?>var modelWidth = <?php echo $this->options->ModelWidth(); ?>;<?php endif; ?>
+ <!-- Varribles and Functions -->
+ <script>var siteurl = '<?php $this->options->SiteUrl() ;?>';var owoJson = '<?php Utils::indexTheme('assets/OwO.json'); ?>';<?php if($this->options->customModel!=''): ?>var modelJson = "<?php echo $this->options->customModel(); ?>";<?php else: ?>var modelJson = '<?php if($this->options->cat && $this->options->cat==1){Utils::indexTheme('assets/model/hijiki/assets/hijiki.model.json');}elseif($this->options->cat && $this->options->cat==2){Utils::indexTheme('assets/model/tororo/assets/tororo.model.json');}?>';<?php endif;?><?php if($this->options->ModelHeight!=NULL): ?>var modelHeight = <?php echo $this->options->ModelHeight(); ?>;<?php endif; ?><?php if($this->options->ModelWidth!=NULL): ?>var modelWidth = <?php echo $this->options->ModelWidth(); ?>;<?php endif; ?>
<?php if($this->options->pjax && $this->options->pjax!=0) :?>var loadPjax = true;
beforePjax = function() {NProgress.start();}
afterPjax = function() {<?php if($this->is('post') || $this->is('page')): ?>owoLoad();<?php endif; ?><?php $this->options->pjax_complete(); ?>}<?php endif; ?></script>
+ <!-- Script that must be after -->
+ <?php if($this->options->cat!=0 || $this->options->customModel!=''): ?><script src="<?php Utils::indexTheme('assets/js/l2dwidget.min.js'); ?>"></script><?php endif; ?>
<script src="<?php Utils::indexTheme('assets/js/miracles.min.js'); ?>"></script>
- <script><?php if($this->options->news==!''): ?>alertSend('公告:<?php echo $this->options->news(); ?>');<?php endif; ?>LazyLoad();PrismLoad();<?php if($this->is('post') || $this->is('page')): ?>owoLoad();<?php endif; ?>panguLoad();<?php $this->options->jsEcho(); ?></script>
+ <!-- Send News and Loader -->
+ <script><?php if($this->is('index')): ?><?php if($this->options->news==!''): ?>alertSend('公告:<?php echo $this->options->news(); ?>');<?php endif; ?><?php endif; ?>LazyLoad();PrismLoad();<?php if($this->is('post') || $this->is('page')): ?>owoLoad();<?php endif; ?>panguLoad();<?php $this->options->jsEcho(); ?></script>
+ <!-- Others -->
<?php $this->footer(); ?>
</body>
</html> \ No newline at end of file
diff --git a/includes/header.php b/includes/header.php
index 26f8590..4935e45 100644
--- a/includes/header.php
+++ b/includes/header.php
@@ -1,9 +1,9 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
- <div class="mask" onclick="toggleDrawer();$('.options').addClass('ready');"></div>
- <div class="alert ready"><p class="alert-content">错误!未定义的 alert 信息</p><button onclick="alertClose()" class="alert-close"><i class="iconfont icon-x"></i></button></div>
+ <div class="mask" id="full-mask"></div>
+ <div class="alert ready"><p class="alert-content">错误!未定义的 alert 信息或 css 未正常载入</p><button id="alert-close" class="alert-close"><i class="iconfont icon-x"></i></button></div>
<!-- 搜索 -->
<div class="search ready">
- <button class="search-close ready" onclick="Search()"><i class="iconfont icon-x"></i></button>
+ <button class="search-close ready" id="search-close-button"><i class="iconfont icon-x"></i></button>
<form method="post" action="">
<div class="search-form">
<input type="text" name="s" class="text" size="32" />
@@ -13,7 +13,7 @@
</div>
<!-- 登录面板 -->
<div class="login ready">
- <button class="login-close ready" onclick="Login()"><i class="iconfont icon-x"></i></button>
+ <button class="login-close ready" id="login-close"><i class="iconfont icon-x"></i></button>
<?php if($this->user->hasLogin()): ?>
<h1>你已经登陆过了哦</h1>
<p class="large-screen">&emsp;不过康纳很乐意再次见到<a href="<?php $this->options->profileUrl(); ?>"><?php $this->user->screenName(); ?></a>呢~</p>
@@ -32,11 +32,11 @@
</div>
<!-- 移动端导航面板 -->
<div class="mobile-menu ready">
- <button class="mobile-menu-close ready" onclick="toggleMobileMenu()"><i class="iconfont icon-x"></i></button>
+ <button class="mobile-menu-close ready" id="toggle-mobile-menu-close"><i class="iconfont icon-x"></i></button>
<h2 class="mobile-menu-title">页面导航</h2>
<div class="mobile-menu-pagelist"><div class="container-fluid"><div class="row">
<?php $this->widget('Widget_Contents_Page_List')
- ->parse('<div class="col-6"><a href="{permalink}" onclick="toggleMobileMenu()">{title}</a></div>'); ?>
+ ->parse('<div class="col-6"><a href="{permalink}">{title}</a></div>'); ?>
</div></div></div>
<div class="mobile-menu-footer">
<p>&copy; <?php echo date('Y'); ?> <a href="<?php $this->options->SiteUrl(); ?>"><?php $this->options->title(); ?></a> | Theme <a href="https://github.com/BigCoke233/miracles">Miracles</a></p>
@@ -97,10 +97,20 @@
</div>
</div>
</div>
+ <!-- -小屏幕导航 -->
+ <nav class="small-screen nav nav-mobile nav-fixed"<?php if($this->options->navStyle==1): ?> style="display:none!important"<?php endif; ?>>
+ <div class="nav-mobile-content">
+ <a href="<?php $this->options->SiteUrl(); ?>" style="float:left"><i class="iconfont icon-xuanzhongshangcheng"></i></a>
+ <a id="search-open-mobile" style="float:left"><i class="iconfont icon-chaxun"></i></a>
+ <a id="login-open-mobile" style="float:left"><i class="iconfont icon-user"></i></a>
+ <a id="toggle-options-mobile" style="float:left"><i class="iconfont icon-settings"></i></a>
+ <a id="toggle-mobile-menu-button" style="float:right">MENU <i class="iconfont icon-list"></i></a>
+ </div>
+ </nav>
<?php if($this->options->navStyle==0): ?>
<!-- 导航 -->
<!-- -大屏幕导航 -->
- <nav class="large-screen nav<?php if($this->options->nav_position && $this->options->nav_position=1): ?> nav-fixed<?php endif; ?>">
+ <nav class="large-screen nav nav-fixed">
<div class="container">
<p class="nav-content">
<a href="<?php $this->options->SiteUrl(); ?>" class="nav-title"><?php $this->options->title(); ?></a>
@@ -109,19 +119,9 @@
->parse('<a href="{permalink}">{title}</a>'); ?>
</span>
</p>
- <button class="nav-icon-button search-button" onclick="Search()"><i class="iconfont icon-chaxun"></i></button>
- <button class="nav-icon-button login-button" onclick="Login()"><i class="iconfont icon-user"></i></button>
- <button class="nav-icon-button setting-button" onclick="toggleOptions()"><i class="iconfont icon-settings"></i></button>
- </div>
- </nav>
- <!-- -小屏幕导航 -->
- <nav class="small-screen nav nav-mobile<?php if($this->options->nav_position && $this->options->nav_position=1): ?> nav-fixed<?php endif; ?>">
- <div class="nav-mobile-content">
- <a href="<?php $this->options->SiteUrl(); ?>" style="float:left"><i class="iconfont icon-xuanzhongshangcheng"></i></a>
- <a onclick="Search()" style="float:left"><i class="iconfont icon-chaxun"></i></a>
- <a onclick="Login()" style="float:left"><i class="iconfont icon-user"></i></a>
- <a onclick="toggleOptions()" style="float:left"><i class="iconfont icon-settings"></i></a>
- <a onclick="toggleMobileMenu()" style="float:right">MENU <i class="iconfont icon-list"></i></a>
+ <button class="nav-icon-button search-button" id="search-open-button"><i class="iconfont icon-chaxun"></i></button>
+ <button class="nav-icon-button login-button" id="login-open"><i class="iconfont icon-user"></i></button>
+ <button class="nav-icon-button setting-button" id="toggle-options-button"><i class="iconfont icon-settings"></i></button>
</div>
</nav>
<?php elseif($this->options->navStyle==1): ?>
@@ -141,9 +141,9 @@
</div>
</div>
<div class="drawer-footer">
- <button class="drawer-icon" onclick="Search();toggleDrawer()"><i class="iconfont icon-chaxun"></i></button>
- <button class="drawer-icon" onclick="Login();toggleDrawer()"><i class="iconfont icon-user"></i></button>
- <button class="drawer-icon" onclick="toggleOptions()"><i class="iconfont icon-settings"></i></button>
+ <button class="drawer-icon" id="search-open-button" onclick="toggleDrawer"><i class="iconfont icon-chaxun"></i></button>
+ <button class="drawer-icon" id="login-open" onclick="toggleDrawer()"><i class="iconfont icon-user"></i></button>
+ <button class="drawer-icon" id="toggle-options-button"><i class="iconfont icon-settings"></i></button>
</div>
</div></nav>
<?php endif; ?>