hexo-theme-Anatole
hexo-theme-Anatole copied to clipboard
新增一个分类Tab
能够配置nav,里面的内容如何设置
增加一条if判断就行了,然后在/anatole/languages/zh-cn.yml中增加词条 Categories: 分类
,不过我也遇到一个问题,tab页选中后无样式类active,导致样式与其他不符,求助作者 @Ben02
粘上我的代码。
.page-top.animated.fadeInDown
.nav
li
if is_home()
a.current(href="/")= __('Home')
else
a(href="/")= __('Home')
li
if is_current('Categories')
a.current(href="/categories")= __('Categories')
else
a(href="/categories")= __('Categories')
li
if is_archive()
a.current(href="/archives")= __('Archive')
else
a(href="/archives")= __('Archive')
li
if is_current('about')
a.current(href="/about")= __('About')
else
a(href="/about")= __('About')
.information
.back_btn
li
if is_post()
a.fa.fa-chevron-left(onclick="window.history.go(-1)")
else
a.fa.fa-chevron-left(onclick="window.history.go(-1)",style="display:none;")
.avatar
img(src=theme.avatar)
你这个加分类,点击分类里面的内容有变化吗?换了一个主题,谢谢了。(next的)www.heyangjob.cn
你这个加分类,点击分类里面的内容有变化吗?换了一个主题,谢谢了。(next的)www.heyangjob.cn
再新建page就行了。我觉得这个还是很好看的,next我也试了,不是很好看。
额 ,那到没试过,那个分类目录我新建出来了,新建page 不知道会不会统计到里面去,所以放弃了。这个界面看的还不错,但是这个停止维护了。