Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a tab in file (nav.yml ) #52

Open
nyz123 opened this issue Apr 1, 2019 · 0 comments
Open

add a tab in file (nav.yml ) #52

nyz123 opened this issue Apr 1, 2019 · 0 comments

Comments

@nyz123
Copy link

nyz123 commented Apr 1, 2019

增加一条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)

@nyz123 nyz123 changed the title 增加一条if判断就行了,然后在/anatole/languages/zh-cn.yml中增加词条` add a tab in file (nav.yml ) Apr 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant