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

Fix affix bug #1039

Merged
merged 1 commit into from
Aug 1, 2019
Merged

Fix affix bug #1039

merged 1 commit into from
Aug 1, 2019

Conversation

stevenjoezhang
Copy link
Contributor

@stevenjoezhang stevenjoezhang commented Jul 31, 2019

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines.
  • Tests for the changes was maked (for bug fixes / features).
    • Muse | Mist have been tested.
    • Pisces | Gemini have been tested.
  • Docs in NexT website have been added / updated (for features).

PR Type

What kind of change does this PR introduce?

  • Bugfix.
  • Feature.
  • Code style update (formatting, local variables).
  • Refactoring (no functional changes, no api changes).
  • Build related changes.
  • CI related changes.
  • Documentation content changes.
  • Other... Please describe:

What is the current behavior?

2019-07-31 14-51-43 2019-07-31 14_52_52

Revert iissnan/hexo-theme-next@1280837
Issue resolved: N/A

What is the new behavior?

  • Screenshots with this changes: N/A
    2019-07-31 14-49-32 2019-07-31 14_51_08

  • Link to demo site with this changes: N/A

How to use?

In NexT _config.yml:

...

Does this PR introduce a breaking change?

  • Yes.
  • No.

@stevenjoezhang
Copy link
Contributor Author

stevenjoezhang commented Jul 31, 2019

@zq1997 Could you please help to confirm whether this PR has fixed the problem: #846

@hsiangfeng
Copy link
Member

hsiangfeng commented Jul 31, 2019

看到留言版,我一直在想分頁以及標籤頁面的留言版需要出現嗎?
因為一般使用者很少會在這兩個頁面留言,絕大部分都是在文章內留言。

@stevenjoezhang
Copy link
Contributor Author

stevenjoezhang commented Jul 31, 2019

同意,但分頁以及標籤頁面的comments默認是true

https://hexo.io/docs/front-matter

需要由Hexo解决

Hexo
Front-matter is a block of YAML or JSON at the beginning of the file that is used to configure settings for your writings. Front-matter is terminated by three dashes when written in YAML or three sem

@hsiangfeng
Copy link
Member

hsiangfeng commented Jul 31, 2019

同意,但分頁以及標籤頁面的comments默認是true

https://hexo.io/docs/front-matter

需要由Hexo解决

Hexo**Front-matter**Front-matter is a block of YAML or JSON at the beginning of the file that is used to configure settings for your writings. Front-matter is terminated by three dashes when written in YAML or three sem

目前我的作法是採用以下方式來決定要不要顯示留言板

{% set page_type = page.type === 'tags' || page.type === 'categories' %}
<div style="{%if page_type %} visibility:hidden; height:0px;{% endif %}">
{% include '_partials/comments.swig' %}
</div>
Hexo
Front-matter is a block of YAML or JSON at the beginning of the file that is used to configure settings for your writings. Front-matter is terminated by three dashes when written in YAML or three sem

@Raincal
Copy link
Member

Raincal commented Jul 31, 2019

鉴于现在已经移除了 IE 支持,要不要考虑一下用 position: sticky 替代 affix

@stevenjoezhang
Copy link
Contributor Author

stevenjoezhang commented Jul 31, 2019

嗯,bootstrap也移除了affix支持:
https://v4-alpha.getbootstrap.com/migration/#components

The most popular HTML, CSS, and JS framework in the world.

不过affix和position: sticky并不完全等价,实现还需要额外的工作。先加到Roadmap里了。

@ivan-nginx ivan-nginx mentioned this pull request Jul 31, 2019
33 tasks
@stevenjoezhang
Copy link
Contributor Author

@hsiangfeng 谢谢。我已在tagscategoriesFront-matter中设置了commets: false

@stevenjoezhang
Copy link
Contributor Author

stevenjoezhang commented Aug 1, 2019

See also: iissnan/hexo-theme-next#2180

About position: sticky: https://caniuse.com/#search=position%20sticky

tongluyang pushed a commit to tongluyang/hexo-theme-next that referenced this pull request Nov 19, 2019
@stevenjoezhang
Copy link
Contributor Author

已实现 position: sticky 替代 affix next-theme/hexo-theme-next@b9968b6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants