From 1005ac170eebafe5c905f8f9298b27d17ef1b7b3 Mon Sep 17 00:00:00 2001 From: Ryan L McIntyre Date: Sun, 14 Jul 2019 14:06:24 -0700 Subject: [PATCH] Performance fix: lazy load contributor images --- _posts/2017-01-05-contributors.md | 94 +++++++++++++++---------------- site.js | 18 ++++++ 2 files changed, 65 insertions(+), 47 deletions(-) diff --git a/_posts/2017-01-05-contributors.md b/_posts/2017-01-05-contributors.md index 32cd0c53c..88c424114 100644 --- a/_posts/2017-01-05-contributors.md +++ b/_posts/2017-01-05-contributors.md @@ -14,195 +14,195 @@ This project follows the [all-contributors](https://github.com/kentcdodds/all-co
- [
Ryan L McIntyre](http://RyanLMcIntyre.com)
+ [
Ryan L McIntyre](http://RyanLMcIntyre.com)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=ryanoasis) [๐Ÿ“–](https://github.com/ryanoasis/nerd-fonts/commits?author=ryanoasis) [๐ŸŽจ](#design-ryanoasis "Design") [๐Ÿ‘€](#review-ryanoasis "Reviewed Pull Requests")
- [
Marcus Kellerman](https://github.com/sharkusk)
+ [
Marcus Kellerman](https://github.com/sharkusk)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=sharkusk) [๐Ÿ‘€](#review-sharkusk "Reviewed Pull Requests")
- [
reujab](https://github.com/reujab)
+ [
reujab](https://github.com/reujab)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=reujab) [๐Ÿ“–](https://github.com/ryanoasis/nerd-fonts/commits?author=reujab)
- [
Jamie Rolfs](http://jamie.rolfs.sh)
+ [
Jamie Rolfs](http://jamie.rolfs.sh)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=jrolfs)
- [
Aron Griffis](http://arongriffis.com)
+ [
Aron Griffis](http://arongriffis.com)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=agriffis) [๐Ÿ“–](https://github.com/ryanoasis/nerd-fonts/commits?author=agriffis)
- [
morrme](https://github.com/morrme)
+ [
morrme](https://github.com/morrme)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=morrme)
- [
Daniel Hahler](https://daniel.hahler.de/)
+ [
Daniel Hahler](https://daniel.hahler.de/)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=blueyed) [๐Ÿ“–](https://github.com/ryanoasis/nerd-fonts/commits?author=blueyed)
- [
Alex Efros](https://powerman.name/)
+ [
Alex Efros](https://powerman.name/)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=powerman) [๐Ÿ“–](https://github.com/ryanoasis/nerd-fonts/commits?author=powerman)
- [
Joe Moon](https://joe.xoxomoon.com)
+ [
Joe Moon](https://joe.xoxomoon.com)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=sodiumjoe)
- [
Brennan Fee](https://github.com/brennanfee)
+ [
Brennan Fee](https://github.com/brennanfee)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=brennanfee)
- [
Alexander Mankuta](https://pointless.one/)
+ [
Alexander Mankuta](https://pointless.one/)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=pointlessone)
- [
Melanie](http://berkley.io)
+ [
Melanie](http://berkley.io)
[๐Ÿ‘€](#review-her "Reviewed Pull Requests") [๐Ÿ“–](https://github.com/ryanoasis/nerd-fonts/commits?author=her)
- [
David McKay](https://rawkode.io)
+ [
David McKay](https://rawkode.io)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=rawkode) [๐Ÿ“–](https://github.com/ryanoasis/nerd-fonts/commits?author=rawkode)
- [
Kevin Ballard](http://kevin.sb.org)
+ [
Kevin Ballard](http://kevin.sb.org)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=kballard) [๐Ÿ“–](https://github.com/ryanoasis/nerd-fonts/commits?author=kballard)
- [
Alistair MacDonald](https://f1lt3r.io)
+ [
Alistair MacDonald](https://f1lt3r.io)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=F1LT3R)
- [
Shai Efrati](http://shaief.com)
+ [
Shai Efrati](http://shaief.com)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=shaief)
- [
Jinwook Jeong](https://github.com/theGivingTree)
+ [
Jinwook Jeong](https://github.com/theGivingTree)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=theGivingTree)
- [
Srijan R Shetty](http://srijanshetty.in)
+ [
Srijan R Shetty](http://srijanshetty.in)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=srijanshetty)
- [
Antoine Rahier](https://github.com/Twanislas)
+ [
Antoine Rahier](https://github.com/Twanislas)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=Twanislas)
- [
Andy Bearman](https://github.com/andybearman)
+ [
Andy Bearman](https://github.com/andybearman)
[๐Ÿ“–](https://github.com/ryanoasis/nerd-fonts/commits?author=andybearman)
- [
Aidan Harris](https://aidanharr.is)
+ [
Aidan Harris](https://aidanharr.is)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=aidanharris)
- [
Tim Bellefleur](https://github.com/nomoon)
+ [
Tim Bellefleur](https://github.com/nomoon)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=nomoon)
- [
Jing Li](http://basgeekball.com)
+ [
Jing Li](http://basgeekball.com)
[๐Ÿ“–](https://github.com/ryanoasis/nerd-fonts/commits?author=thyrlian)
- [
Alois](http://aloisdg.github.io/)
+ [
Alois](http://aloisdg.github.io/)
[๐Ÿ“–](https://github.com/ryanoasis/nerd-fonts/commits?author=aloisdg)
- [
Daniel M. Capella](https://danielcapella.com)
+ [
Daniel M. Capella](https://danielcapella.com)
[๐Ÿ“–](https://github.com/ryanoasis/nerd-fonts/commits?author=polyzen)
- [
Bin Ury](http://twitter.com/bin_ury)
+ [
Bin Ury](http://twitter.com/bin_ury)
[๐Ÿ“–](https://github.com/ryanoasis/nerd-fonts/commits?author=teddy-error)
- [
Omar Baradei](https://github.com/OmarB97)
+ [
Omar Baradei](https://github.com/OmarB97)
[๐Ÿ“–](https://github.com/ryanoasis/nerd-fonts/commits?author=OmarB97)
- [
Ricardo Bรกnffy](http://about.me/rbanffy)
+ [
Ricardo Bรกnffy](http://about.me/rbanffy)
[๐Ÿ“–](https://github.com/ryanoasis/nerd-fonts/commits?author=rbanffy)
- [
Leonardo Santagada](https://github.com/santagada)
+ [
Leonardo Santagada](https://github.com/santagada)
[๐Ÿ“–](https://github.com/ryanoasis/nerd-fonts/commits?author=santagada)
- [
Xandor Schiefer](https://twitter.com/zeorin)
+ [
Xandor Schiefer](https://twitter.com/zeorin)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=zeorin)
- [
iladin](https://github.com/iladin)
+ [
iladin](https://github.com/iladin)
[๐Ÿ“–](https://github.com/ryanoasis/nerd-fonts/commits?author=iladin)
- [
Luke Reed](https://github.com/lucasreed)
+ [
Luke Reed](https://github.com/lucasreed)
[๐Ÿ“–](https://github.com/ryanoasis/nerd-fonts/commits?author=lucasreed)
- [
Andrew Imeson](https://andrewimeson.com)
+ [
Andrew Imeson](https://andrewimeson.com)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=andrewimeson "Code")
- [
Alexey Salangin](https://github.com/magauran)
+ [
Alexey Salangin](https://github.com/magauran)
[๐ŸŒ](#translation-magauran "Translation")
- [
Ben Brooks](https://bbrks.me)
+ [
Ben Brooks](https://bbrks.me)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=bbrks "Code")
- [
De Olagundoye](https://github.com/de-olagundoye)
+ [
De Olagundoye](https://github.com/de-olagundoye)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=de-olagundoye "Code")
- [
CHANG LIU](https://github.com/hiby90hou)
+ [
CHANG LIU](https://github.com/hiby90hou)
[๐ŸŒ](#translation-hiby90hou "Translation")
- [
Asger Hautop Drewsen](http://tyilo.com/)
+ [
Asger Hautop Drewsen](http://tyilo.com/)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=Tyilo "Code")
- [
Fernando Mora](https://github.com/fernandomora)
+ [
Fernando Mora](https://github.com/fernandomora)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=fernandomora "Code")
- [
Ilia Loginov](https://github.com/iloginow)
+ [
Ilia Loginov](https://github.com/iloginow)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=iloginow "Code")
- [
MindyTai](https://github.com/MindyTai)
[๐ŸŒ](#translation-MindyTai "Translation") + [
MindyTai](https://github.com/MindyTai)
[๐ŸŒ](#translation-MindyTai "Translation")
- [
Phuurl](https://github.com/Phuurl)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=Phuurl "Code") + [
Phuurl](https://github.com/Phuurl)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=Phuurl "Code")
- [
Samuel Ramos](https://github.com/samuelramox)
[๐Ÿ“–](https://github.com/ryanoasis/nerd-fonts/commits?author=samuelramox "Documentation") + [
Samuel Ramos](https://github.com/samuelramox)
[๐Ÿ“–](https://github.com/ryanoasis/nerd-fonts/commits?author=samuelramox "Documentation")
- [
Logan Holmes](http://www.digimarc.com)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=snown "Code") + [
Logan Holmes](http://www.digimarc.com)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=snown "Code")
- [
Pierre Grimaud](https://p.ier.re)
[๐ŸŒ](#translation-pgrimaud "Translation") + [
Pierre Grimaud](https://p.ier.re)
[๐ŸŒ](#translation-pgrimaud "Translation")
- [
jerezereh](https://github.com/jerezereh)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=jerezereh "Code") + [
jerezereh](https://github.com/jerezereh)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=jerezereh "Code")
- [
Chris Simpkins](https://github.com/chrissimpkins)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=chrissimpkins "Code") [๐Ÿ›](https://github.com/ryanoasis/nerd-fonts/issues?q=author%3Achrissimpkins "Bug reports") [๐Ÿค”](#ideas-chrissimpkins "Ideas, Planning, & Feedback") [๐Ÿ‘€](#review-chrissimpkins "Reviewed Pull Requests") + [
Chris Simpkins](https://github.com/chrissimpkins)
[๐Ÿ’ป](https://github.com/ryanoasis/nerd-fonts/commits?author=chrissimpkins "Code") [๐Ÿ›](https://github.com/ryanoasis/nerd-fonts/issues?q=author%3Achrissimpkins "Bug reports") [๐Ÿค”](#ideas-chrissimpkins "Ideas, Planning, & Feedback") [๐Ÿ‘€](#review-chrissimpkins "Reviewed Pull Requests")
diff --git a/site.js b/site.js index 834526a03..cf43481e6 100644 --- a/site.js +++ b/site.js @@ -71,6 +71,24 @@ $.extend($.easing, })( jQuery ); +// lazy load images +document.addEventListener("DOMContentLoaded", function() { + const imageObserver = new IntersectionObserver((entries, imgObserver) => { + entries.forEach((entry) => { + if (entry.isIntersecting) { + const lazyImage = entry.target + console.log("lazy loading ", lazyImage) + lazyImage.src = lazyImage.dataset.src + } + }) + }); + const arr = document.querySelectorAll('img.lzy_img') + arr.forEach((v) => { + imageObserver.observe(v); + }) +}); + + $(document).ready(function (){ $('nav li a').navScroller();