theme-nexmoe / hexo-theme-nexmoe

🔥 A special Hexo theme focusing on pictures and images. Images tell stories, and Nexmoe makes them more vivid.
https://docs.nexmoe.com
Apache License 2.0
1.64k stars 247 forks source link

感觉页面有点卡卡的,是否考虑优化一下,或者加个 Pjax 插件来缓解一下? #61

Closed ruibaby closed 4 years ago

ruibaby commented 5 years ago

What feature is it?

局部加载,缓解卡卡的问题

What can this function do?

缓解卡卡的问题,尤其是切换页面的时候

Additional description

看了几个 Demo,都有这个现象,页面切换的时候卡卡的,感觉体验不是很好,主题设计的相当不错,如果能解决这个问题就太好啦。

我的解决办法:我移植了该主题到另外一个平台,使用了 Pjax 插件来尝试缓解这个问题,是可行的,但是还需要测试。

代码:https://github.com/halo-dev/halo-theme-nexmoe/blob/78ac16c84ed9a2ac06c9c5a13f31d23a027d8b56/layout/_partial/after-footer.ftl#L19

ruibaby commented 5 years ago

@xtaodada 哈哈,慢慢来。看好你们哦。

nexmoe commented 4 years ago

欢迎贡献

ruibaby commented 4 years ago

@nexmoe 好的,明天怼一个 commit 上来。

ruibaby commented 4 years ago

@nexmoe 已提交 pr https://github.com/nexmoe/hexo-theme-nexmoe/pull/64

nexmoe commented 4 years ago

merged

nexmoe commented 4 years ago

已知问题

这就是我当初放弃 pjax 的原因

ruibaby commented 4 years ago

已知问题

  • header 的 tab active 不会变更
  • 代码高亮失效
  • 部分评论框出现问题
  • aplayer 失效

这就是我当初放弃 pjax 的原因

哦豁。尴了个尬,你们暂时先回滚吧。我再研究研究,之前解决过类似的问题。

另外,建议弄一个 dev 分支,避免用户直接 clone 你们正在开发的分支。