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

增加lazyload.js实现文章图片延迟加载 #269

Merged
merged 2 commits into from
Jul 8, 2015

Conversation

araolin
Copy link
Contributor

@araolin araolin commented Jul 6, 2015

增加lazyload.js实现文章图片延迟加载,演示http://www.arao.me/

araolin added 2 commits June 30, 2015 17:43
图片延迟加载lazyload.js
增加lazyload.js实现文章图片延迟加载, 也就是说在浏览器可视区域外的图片不会被载入,直到用户将页面滚动到它们所在的位置才会加载并显示出来。
@eurusd
Copy link

eurusd commented Jul 6, 2015

你的留言很好,按设置 没成功

@araolin
Copy link
Contributor Author

araolin commented Jul 6, 2015

@eurusd 要先指定单个页面page支持多说评论 ,你可以把我其中举的例子page.type === 'about'改成page.type === 'guestbook',这样你生成的guestbook页面支持了多说评论,然后再为你的hexo网站NexT主题增加留言页

iissnan added a commit that referenced this pull request Jul 8, 2015
Lazyload for posts images.
@iissnan iissnan merged commit 9f9c3db into iissnan:master Jul 8, 2015
@iissnan
Copy link
Owner

iissnan commented Jul 8, 2015

Thanks @araolin

@imcoddy
Copy link
Contributor

imcoddy commented Jul 8, 2015

赞一下。
看了一下代码,如果把 placeHolder 也加到主题里面也许会更好一点。
否则会指向楼主的网站上。

  •          placeholder:"http://www.arao.me/loading.gif",  
    

@shliujing
Copy link

现在又失败了。
因为我的博客指向国内的vps了,只有1M贷款,速度比较慢。
如果有懒加载就好了。

@Jacksgong
Copy link
Contributor

Jacksgong commented Mar 11, 2017

@shliujing @iissnan 该延迟加载存在问题,所有图片点开都是预设的loading图片,始终显示不了本来的图片。

image

yzbyzz pushed a commit to yzbyzz/hexo-theme-next that referenced this pull request Jan 4, 2019
* format code

* update CDN URLs

* fix iissnan#269

* fix iissnan#508
mrjohannchang pushed a commit to mrjohannchang/hexo-theme-next that referenced this pull request Jul 29, 2021
Co-authored-by: Renovate Bot <bot@renovateapp.com>
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.

6 participants