theme-next / hexo-theme-next

Elegant and powerful theme for Hexo.
https://theme-next.org
Other
8.15k stars 2.05k forks source link

Site overview reload on every page with PJAX enabled. #1084

Closed gapplef closed 5 years ago

gapplef commented 5 years ago

I agree and want to create new issue

Site Overview in the sidebar is keep unchanged in most cases, like all the pages under home, the archive page, the about page, the tags page, the categories pages and all the post pages without Table of Contents(ToC).

Actually, only for posts with ToC, the Site Overview will combined with ToC, thus need to refresh. But with PJAX turn on, the Site Overview always reload on every page.

Is it possible to only reload the Site Overview when necessary?

issue-label-bot[bot] commented 5 years ago

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

gapplef commented 5 years ago

@stevenjoezhang Why would it considered as a feature? I mean Site Overview is unchanged in most cases, why it need to be reload?

Reload Site Overview while keep Menu fixed is counter-intuition, as both are unchanged! The user experience would be better to reload the Site Overview only when necessary.

stevenjoezhang commented 5 years ago

Since there is no backend support, PJAX always loads the entire page. So this does not save http traffic.

However, you can still follow your ideas and open a pull request~

gapplef commented 5 years ago

Only if I know how to deal with all those JS/CSS stuff :joy:

Anyway, really appreciate your active work on NexT theme :+1: @stevenjoezhang

stevenjoezhang commented 5 years ago

Fixed in https://github.com/theme-next/hexo-theme-next/pull/1113