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

新增一个分类Tab #51

Open
heyangJob opened this issue Mar 31, 2019 · 5 comments
Open

新增一个分类Tab #51

heyangJob opened this issue Mar 31, 2019 · 5 comments

Comments

@heyangJob
Copy link

能够配置nav,里面的内容如何设置

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

@heyangJob
Copy link
Author

heyangJob commented Apr 1, 2019

你这个加分类,点击分类里面的内容有变化吗?换了一个主题,谢谢了。(next的)www.heyangjob.cn

1 similar comment
@heyangJob
Copy link
Author

你这个加分类,点击分类里面的内容有变化吗?换了一个主题,谢谢了。(next的)www.heyangjob.cn

@nyz123
Copy link

nyz123 commented Apr 1, 2019

再新建page就行了。我觉得这个还是很好看的,next我也试了,不是很好看。

@heyangJob
Copy link
Author

额 ,那到没试过,那个分类目录我新建出来了,新建page 不知道会不会统计到里面去,所以放弃了。这个界面看的还不错,但是这个停止维护了。

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

2 participants