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

feat(core): Add preliminary support for PJAX #1287

Merged
merged 1 commit into from
May 1, 2024

Conversation

PJ-568
Copy link
Contributor

@PJ-568 PJ-568 commented Apr 17, 2024

  • Current state: when PJAX completed, reload the whole scripts which contains one or more functions that needs to be reloaded when a page is loaded.
  • Next step: when PJAX completed, only reload the functions that needs to be reloaded.

Implements #1277
Related #1269 #992 #722 #649 #507

@PJ-568 PJ-568 force-pushed the master branch 2 times, most recently from 0745eec to e7d62c6 Compare April 25, 2024 03:58
layout/common/scripts.jsx Outdated Show resolved Hide resolved
layout/common/scripts.jsx Outdated Show resolved Hide resolved
PJ-568

This comment was marked as outdated.

@PJ-568 PJ-568 force-pushed the master branch 3 times, most recently from f61df4c to 428765e Compare April 27, 2024 02:57
@ppoffice
Copy link
Owner

ppoffice commented Apr 28, 2024

@PJ-568
Copy link
Contributor Author

PJ-568 commented Apr 29, 2024

已发现问题

你可以切换到 https://github.com/ppoffice/hexo-theme-icarus/tree/site 分支试一下。

切换到这个分支指的是什么?

@PJ-568
Copy link
Contributor Author

PJ-568 commented Apr 29, 2024

不存在背景色问题。我的博客引入了 Darkmode.js 以切换深色模式,我没有专门为 cyberpunk-theme-variant 配置,导致 Darkmode.js 的白色遮罩遮挡了 html {background-color:#000}
一切正常
如有发现其他问题,还请告知我。

@PJ-568 PJ-568 requested a review from ppoffice April 29, 2024 14:45
Copy link
Contributor Author

@PJ-568 PJ-568 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已应用 PJAX 的示例网站:PJ568.sbs/hexo-theme-icarus
该示例网站的仓库:PJ-568/hexo-theme-icarus:site

@PJ-568

This comment was marked as resolved.

@ppoffice ppoffice merged commit c409f60 into ppoffice:master May 1, 2024
3 checks passed
@am-abudu
Copy link

am-abudu commented Aug 20, 2024

发现在引入pjax之后,若网站设置背景,加载网页时会出现白色遮罩,导致体验割裂

解决方案是为

<link rel="stylesheet" href={url_for('/css/' + variant + '.css')} />

去除data-pjax标签,目前没有发现问题

另外,Twikoo等评论系统也存在问题,方案是添加setTimeout为1000毫秒

类似的,统计之类的系统也需要重载的配置

@am-abudu
Copy link

am-abudu commented Aug 20, 2024

在出现column切换时(例如主页是三栏,内页是二栏)。页面大小出现问题

解决方法:修改三栏布局样式

responsive.styl中添加三栏样式

@am-abudu
Copy link

搜索功能依然存在问题,修改方式为设置algolia.js的重载

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

Successfully merging this pull request may close these issues.

3 participants