Ben02/hexo-theme-Anatole

add a tab in file (nav.yml )

Opened this issue · 0 comments

增加一条if判断就行了,然后在/anatole/languages/zh-cn.yml中增加词条 Categories: 分类,不过我也遇到一个问题,tab页选中后无样式类active,导致样式与其他不符,求助作者 @Ben02

image
image

粘上我的代码。

.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)

Originally posted by @nyz123 in #51 (comment)