diff options
| author | Eltrac <45323514+BigCoke233@users.noreply.github.com> | 2019-08-22 20:43:41 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-22 20:43:41 +0800 |
| commit | 52b009837588f9af8672354d07609735a711c4fe (patch) | |
| tree | cd33384400dfa50e0c09720088c977817dcb2349 | |
| parent | 4bb2219701616124fb78c6f8fb351260f4784565 (diff) | |
Add files via upload
| -rw-r--r-- | 404.php | 5 | ||||
| -rw-r--r-- | about.php | 3 | ||||
| -rw-r--r-- | archive.php | 2 | ||||
| -rw-r--r-- | includes/comments.php | 2 | ||||
| -rw-r--r-- | includes/footer.php | 20 | ||||
| -rw-r--r-- | includes/header.php | 46 | ||||
| -rw-r--r-- | index.php | 5 | ||||
| -rw-r--r-- | libs/Options.php | 7 |
8 files changed, 49 insertions, 41 deletions
@@ -7,10 +7,13 @@ $this->need('includes/header.php'); <div class="post-content"> <h1 class="error-title">404</h1> <p style="text-align:center"> - <span>糟糕,我家猫咪走丢了!</span><br /><br /> + <span>肥肠抱歉,你访问的页面被猫吃掉了</span><br /><br /> <a href="<?php $this->options->SiteUrl(); ?>" class="button error-button no-line">返回首页</a> </p> </div> </div> </main> + <!-- 防止找不到 owo 容器而报错 --> + <div style="display:none" class="OwO"></div> + <?php $this->need('includes/footer.php'); ?>
\ No newline at end of file @@ -36,6 +36,7 @@ $this->need('includes/header.php'); <?php $this->content(); ?>
</div>
</div>
-<?php $this->need('includes/comments.php'); ?>
+ <?php $this->need('includes/comments.php'); ?>
</main>
+
<?php $this->need('includes/footer.php'); ?>
\ No newline at end of file diff --git a/archive.php b/archive.php index baa3f3e..8e8d820 100644 --- a/archive.php +++ b/archive.php @@ -29,5 +29,7 @@ $this->need('includes/header.php'); </div> </div> </main> + <!-- 防止找不到 owo 容器而报错 --> + <div style="display:none" class="OwO"></div> <?php $this->need('includes/footer.php'); ?>
\ No newline at end of file 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">© <?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"> 不过康纳很乐意再次见到<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>© <?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; ?> @@ -5,7 +5,7 @@ * * @package Miracles * @author Eltrac - * @version 1.2.0 + * @version 1.2.1 * @link https://guhub.cn */ if (!defined('__TYPECHO_ROOT_DIR__')) exit; @@ -68,6 +68,7 @@ $this->need('includes/header.php'); </div> </div> </main> - + <!-- 防止找不到 owo 容器而报错 --> + <div style="display:none" class="OwO"></div> <?php $this->need('includes/footer.php'); ?>
\ No newline at end of file diff --git a/libs/Options.php b/libs/Options.php index 047335f..67de72d 100644 --- a/libs/Options.php +++ b/libs/Options.php @@ -64,7 +64,6 @@ function themeConfig($form) { <h1>Miracles 主题设置面板</h1>
<p>欢迎使用 Miracles 主题,目前版本是:'. $ver .'</span><br>
作者博客:<a href="https://guhub.cn">Eltrac\'s</a> | 帮助文档:<a href="https://github.com/BigCoke233/miracles/wiki">WIKI</a> | 问题反馈:<a href="https://github.com/BigCoke233/miracles/issues">issues</a></p>
- <iframe class="miracles-news" src="https://gu.guhub.cn/news.html"></iframe>
<form class="protected" action="?MiraclesBackup" method="post">
<input type="submit" name="type" class="miracles-backup-button backup" value="备份模板数据" />
<input type="submit" name="type" class="miracles-backup-button recover" value="还原模板数据" />
@@ -82,8 +81,6 @@ function themeConfig($form) { //nav
$navStyle = new Typecho_Widget_Helper_Form_Element_Select('navStyle',array('0'=>'顶部导航栏','1'=>'左侧抽屉栏'),'0','<h2>导航栏 Nav</h2>类型','选择导航栏的类型(若选择左侧抽屉蓝,则下一条设置失效)');
$form->addInput($navStyle);
- $nav_position = new Typecho_Widget_Helper_Form_Element_Select('nav_position',array('0'=>'不固定','1'=>'固定'),'0','是否固定','固定后,导航栏不会随滚动条滚动而移动在屏幕上的位置<hr>');
- $form->addInput($nav_position);
//index-banner
$bannerUrl = new Typecho_Widget_Helper_Form_Element_Text('bannerUrl', NULL, 'https://s2.ax1x.com/2019/07/10/ZcRGX8.png', _t('<h2>首页大图 Banner</h2>图片 Url'), _t('首页大图的图片地址'));
@@ -112,9 +109,9 @@ function themeConfig($form) { $form->addInput($bodyFonts);
$cat = new Typecho_Widget_Helper_Form_Element_Select('cat',array('0'=>'不要','1'=>'小黑','2'=>'小白'),'0','领养猫咪','领养一只猫咪,这样你就可以在前台看到它啦!');
$form->addInput($cat);
- $ModelHeight = new Typecho_Widget_Helper_Form_Element_Text('ModelHeight', NULL, '480', _t('自定义模型高度'), _t('设置猫咪/自定义模型的高度'));
+ $ModelHeight = new Typecho_Widget_Helper_Form_Element_Text('ModelHeight', NULL, '320', _t('自定义模型高度'), _t('设置猫咪/自定义模型的高度'));
$form->addInput($ModelHeight);
- $ModelWidth = new Typecho_Widget_Helper_Form_Element_Text('ModelWidth', NULL, '390', _t('自定义模型宽度'), _t('设置猫咪/自定义模型的宽度'));
+ $ModelWidth = new Typecho_Widget_Helper_Form_Element_Text('ModelWidth', NULL, '300', _t('自定义模型宽度'), _t('设置猫咪/自定义模型的宽度'));
$form->addInput($ModelWidth);
$customModel = new Typecho_Widget_Helper_Form_Element_Text('customModel', NULL, NULL, _t('自定义 Live2d 模型'), _t('填入 Live2d 模型的 json 地址,会代替猫咪显示在首页,填入后上一个设置项失效。<hr>'));
$form->addInput($customModel);
|
