diff options
| author | BigCoke233 <hi@guhub.cn> | 2020-07-30 23:45:41 +0800 |
|---|---|---|
| committer | BigCoke233 <hi@guhub.cn> | 2020-07-30 23:45:41 +0800 |
| commit | 23c8e8fed64c5995101cc9ceb08706d8849b0a3c (patch) | |
| tree | 0b5cd4eb18caf8313f41911b1d208c3da2c72c88 /includes | |
| parent | 7168e743fe802cc977ce8fe990f09bf87ba46eaa (diff) | |
:zap: Add: 各种优化、新增和修复
- 新增:支持自定义「导航栏图标按钮」
- 新增:文章目录(使用 `{:toc:}` 在文中插入目录)
- 新增:归档页面中添加「文章分类」栏目
- 优化:将设置项「Pjax 完成后执行事件」更改为更准确的「Pjax 回调函数」
- 修复:一个存在了超久的拼写错误(`paresNav`=>`parseNav`)
- 修复:archive 页面(即分类、标签、搜索等)文章头图问题
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/header.php | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/includes/header.php b/includes/header.php index 4130d78..a35fdc9 100644 --- a/includes/header.php +++ b/includes/header.php @@ -44,7 +44,7 @@ ->parse('<div class="col-6"><a href="{permalink}">{title}</a></div>'); } else { - echo Contents::paresNav($this->options->customNav, "mobile"); + echo Contents::parseNav($this->options->customNav, "mobile"); }?> </div></div></div> <div class="mobile-menu-footer"> @@ -56,9 +56,13 @@ <nav class="small-screen nav nav-mobile nav-fixed"<?php if($this->options->navStyle==1): ?> style="display:none!important"<?php endif; ?> id="navBarMobile"> <div class="nav-mobile-content" role="navigation"> <a href="<?php $this->options->SiteUrl(); ?>" style="float:left"><i class="iconfont icon-xuanzhongshangcheng"></i></a> + <?php if(!$this->options->customNavIcon)://如果没有自定义图标 ?> <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-dark-mobile" style="float:left"><i class="iconfont icon-sun"></i></a> + <?php else://如果有自定义图标 + echo Contents::parseNavIcon($this->options->customNavIcon, "mobile"); + endif; ?> <a id="toggle-mobile-menu-button" style="float:right">MENU <i class="iconfont icon-list"></i></a> </div> </nav> @@ -78,13 +82,17 @@ ->parse('<a href="{permalink}">{title}</a>'); } else { - echo Contents::paresNav($this->options->customNav, "top-nav"); + echo Contents::parseNav($this->options->customNav, "top-nav"); }?> </span> </p> + <?php if(!$this->options->customNavIcon)://如果没有自定义图标 ?> <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-dark-button"><i class="iconfont icon-sun"></i></button> + <?php else://如果有自定义图标 + echo Contents::parseNavIcon($this->options->customNavIcon, "top-nav"); + endif; ?> </div> </nav> <?php elseif($this->options->navStyle==1): ?> @@ -106,14 +114,18 @@ ->parse('<a href="{permalink}" onclick="toggleDrawer()">{title}</a>'); } else { - echo Contents::paresNav($this->options->customNav, "drawer"); + echo Contents::parseNav($this->options->customNav, "drawer"); }?> </div> </div> <div class="drawer-footer"> + <?php if(!$this->options->customNavIcon)://如果没有自定义图标 ?> <button class="drawer-icon" id="search-open-button"><i class="iconfont icon-chaxun"></i></button> <button class="drawer-icon" id="login-open"><i class="iconfont icon-user"></i></button> <button class="drawer-icon" id="toggle-dark-button"><i class="iconfont icon-sun"></i></button> + <?php else://如果有自定义图标 + echo Contents::parseNavIcon($this->options->customNavIcon, "drawer"); + endif; ?> </div> </div></nav> <?php endif;?> |
