hexo-theme-volantis 4.3.0 → 5.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (853) hide show
  1. package/README.md +1 -1
  2. package/_config.yml +434 -142
  3. package/languages/en.yml +7 -0
  4. package/languages/zh-CN.yml +13 -2
  5. package/languages/zh-TW.yml +7 -0
  6. package/layout/404.ejs +1 -1
  7. package/layout/_meta/author.ejs +4 -4
  8. package/layout/_meta/category.ejs +11 -8
  9. package/layout/_meta/counter.ejs +5 -2
  10. package/layout/_meta/date.ejs +1 -1
  11. package/layout/_meta/music.ejs +1 -1
  12. package/layout/_meta/share.ejs +1 -1
  13. package/layout/_meta/tags.ejs +3 -0
  14. package/layout/_meta/thumbnail.ejs +3 -1
  15. package/layout/_meta/updated.ejs +1 -1
  16. package/layout/{_cover → _partial/_cover}/blank.ejs +0 -0
  17. package/layout/{_cover → _partial/_cover}/dock.ejs +1 -1
  18. package/layout/{_cover → _partial/_cover}/featured.ejs +1 -1
  19. package/layout/{_cover → _partial/_cover}/focus.ejs +1 -1
  20. package/layout/_partial/_cover/layout.ejs +8 -0
  21. package/layout/{_cover → _partial/_cover}/search.ejs +1 -1
  22. package/layout/_partial/article.ejs +17 -12
  23. package/layout/_partial/cover.ejs +8 -28
  24. package/layout/_partial/footer.ejs +18 -10
  25. package/layout/_partial/head.ejs +55 -110
  26. package/layout/_partial/header.ejs +16 -10
  27. package/layout/_partial/meta.ejs +18 -4
  28. package/layout/_partial/post.ejs +35 -9
  29. package/layout/_partial/scripts/_ctrl/cdnCtrl.ejs +113 -0
  30. package/layout/_partial/scripts/{coverCtrl.ejs → _ctrl/coverCtrl.ejs} +22 -26
  31. package/layout/_partial/scripts/_ctrl.ejs +2 -0
  32. package/layout/_partial/scripts/content-visibility-scroll-fix.ejs +86 -0
  33. package/layout/_partial/scripts/global.ejs +355 -0
  34. package/layout/_partial/scripts/index.ejs +68 -67
  35. package/layout/_partial/scripts/toc.ejs +74 -67
  36. package/layout/_partial/side.ejs +4 -1
  37. package/layout/_plugins/_page_plugins/artitalk/index.ejs +15 -0
  38. package/layout/_plugins/_page_plugins/bbtalk/index.ejs +10 -0
  39. package/layout/_plugins/_page_plugins/fcircle/index.ejs +226 -0
  40. package/layout/_plugins/_page_plugins/gitter/index.ejs +14 -0
  41. package/layout/_plugins/_page_plugins/hpptalk/index.ejs +14 -0
  42. package/layout/_plugins/_page_plugins/indent/index.ejs +16 -0
  43. package/layout/_plugins/_page_plugins/index.ejs +7 -0
  44. package/layout/_plugins/_page_plugins/katex/index.ejs +13 -0
  45. package/layout/{_third-party/math/mathjax/script.ejs → _plugins/_page_plugins/mathjax/index.ejs} +2 -2
  46. package/layout/_plugins/_page_plugins/snackbar/index.ejs +55 -0
  47. package/layout/{_partial/scripts/counter.ejs → _plugins/analytics/LCCounter.ejs} +0 -0
  48. package/layout/_plugins/analytics/script.ejs +64 -0
  49. package/layout/{_third-party → _plugins}/aplayer/layout.ejs +0 -0
  50. package/layout/_plugins/aplayer/script.ejs +74 -0
  51. package/layout/_plugins/chat/gitter/script.ejs +17 -0
  52. package/layout/_plugins/chat/index.ejs +1 -0
  53. package/layout/_plugins/chat/tidio/script.ejs +1 -0
  54. package/layout/_plugins/comments/artalk/script.ejs +53 -0
  55. package/layout/_plugins/comments/beaudar/script.ejs +61 -0
  56. package/layout/_plugins/comments/disqus/script.ejs +98 -0
  57. package/layout/_plugins/comments/disqusjs/script.ejs +35 -0
  58. package/layout/_plugins/comments/giscus/script.ejs +47 -0
  59. package/layout/_plugins/comments/gitalk/script.ejs +24 -0
  60. package/layout/_plugins/comments/hashover/script.ejs +5 -0
  61. package/layout/{_third-party → _plugins}/comments/index.ejs +9 -2
  62. package/layout/_plugins/comments/isso/script.ejs +27 -0
  63. package/layout/_plugins/comments/livere/script.ejs +15 -0
  64. package/layout/_plugins/comments/minivaline/script.ejs +45 -0
  65. package/layout/_plugins/comments/twikoo/script.ejs +40 -0
  66. package/layout/_plugins/comments/utterances/script.ejs +43 -0
  67. package/layout/{_third-party → _plugins}/comments/valine/script.ejs +18 -14
  68. package/layout/_plugins/comments/vssue/script.ejs +37 -0
  69. package/layout/_plugins/comments/waline/script.ejs +44 -0
  70. package/layout/_plugins/comments/z-custom/script.ejs +1 -0
  71. package/layout/_plugins/darkmode/script.ejs +114 -0
  72. package/layout/_plugins/end-of-support/script.ejs +62 -0
  73. package/layout/_plugins/github-api/script.ejs +27 -0
  74. package/layout/_plugins/highlight/highlightjs/script.ejs +26 -0
  75. package/layout/_plugins/highlight/prismjs/script.ejs +25 -0
  76. package/layout/_plugins/highlight/script.ejs +1 -0
  77. package/layout/{_third-party → _plugins}/lazyload/script.ejs +1 -1
  78. package/layout/_plugins/nodewaves/script.ejs +12 -0
  79. package/layout/_plugins/parallax/script.ejs +70 -0
  80. package/layout/{_third-party → _plugins}/pjax/animate.ejs +31 -26
  81. package/layout/_plugins/pjax/index.ejs +74 -0
  82. package/layout/_plugins/pjax/pdata.ejs +57 -0
  83. package/layout/_plugins/preload/script.ejs +14 -0
  84. package/layout/_plugins/rightmenu/layout.ejs +119 -0
  85. package/layout/_plugins/scrollreveal/script.ejs +25 -0
  86. package/layout/_plugins/search/script.ejs +39 -0
  87. package/layout/{_third-party → _plugins}/share/layout.ejs +0 -0
  88. package/layout/_plugins/swiper/script.ejs +37 -0
  89. package/layout/_pre.ejs +2 -2
  90. package/layout/_widget/_pre.ejs +5 -0
  91. package/layout/_widget/blogger.ejs +1 -1
  92. package/layout/_widget/category.ejs +2 -2
  93. package/layout/_widget/copyright.ejs +1 -1
  94. package/layout/_widget/grid.ejs +3 -3
  95. package/layout/_widget/lastupdate.ejs +27 -0
  96. package/layout/_widget/list.ejs +2 -2
  97. package/layout/_widget/load.ejs +18 -0
  98. package/layout/_widget/music.ejs +3 -2
  99. package/layout/_widget/page.ejs +1 -1
  100. package/layout/_widget/qrcode.ejs +1 -1
  101. package/layout/_widget/related_posts.ejs +1 -1
  102. package/layout/_widget/tagcloud.ejs +1 -1
  103. package/layout/_widget/text.ejs +1 -1
  104. package/layout/_widget/toc.ejs +6 -2
  105. package/layout/_widget/webinfo.ejs +3 -66
  106. package/layout/archive.ejs +3 -3
  107. package/layout/category.ejs +8 -3
  108. package/layout/docs.ejs +1 -1
  109. package/layout/friends.ejs +5 -24
  110. package/layout/index.ejs +1 -1
  111. package/layout/layout.ejs +13 -12
  112. package/layout/list.ejs +1 -1
  113. package/layout/page.ejs +1 -1
  114. package/layout/post.ejs +1 -1
  115. package/layout/tag.ejs +8 -3
  116. package/package.json +4 -3
  117. package/scripts/events/index.js +12 -0
  118. package/scripts/events/lib/config.js +27 -8
  119. package/scripts/events/lib/renderStylus.js +78 -0
  120. package/scripts/events/lib/utils.js +76 -0
  121. package/scripts/filters/content-visibility.js +25 -0
  122. package/scripts/{render → filters}/img.js +0 -0
  123. package/scripts/filters/replace.js +15 -0
  124. package/scripts/{z-lazyload → filters/z-lazyload}/index.js +0 -0
  125. package/scripts/{z-lazyload → filters/z-lazyload}/lib/process.js +1 -1
  126. package/scripts/helpers/custom-files/index.js +163 -0
  127. package/scripts/helpers/first-style/index.js +19 -0
  128. package/scripts/helpers/head/autoCanonical.js +15 -0
  129. package/scripts/helpers/head/generate_preload_fontfamily.js +22 -0
  130. package/scripts/helpers/head/generate_seo.js +24 -0
  131. package/scripts/helpers/head/generate_title__keywords__description.js +91 -0
  132. package/scripts/{related_posts → helpers/related_posts}/index.js +1 -1
  133. package/scripts/helpers/structured-data/index.js +2 -0
  134. package/scripts/helpers/structured-data/lib/blogposting.js +65 -0
  135. package/scripts/helpers/structured-data/lib/breadcrumblist.js +128 -0
  136. package/scripts/helpers/structured-data/lib/config.js +31 -0
  137. package/scripts/helpers/structured-data/lib/index.js +38 -0
  138. package/scripts/helpers/structured-data/lib/organization.js +15 -0
  139. package/scripts/helpers/structured-data/lib/person.js +16 -0
  140. package/scripts/helpers/structured-data/lib/website.js +42 -0
  141. package/scripts/helpers/tag-plugins-style/index.js +199 -0
  142. package/scripts/tags/btn.js +6 -1
  143. package/scripts/tags/btns.js +7 -2
  144. package/scripts/tags/checkbox.js +12 -2
  145. package/scripts/tags/contributors.js +100 -0
  146. package/scripts/tags/dropmenu.js +18 -3
  147. package/scripts/tags/fancybox.js +44 -10
  148. package/scripts/tags/folding.js +6 -1
  149. package/scripts/tags/frame.js +6 -1
  150. package/scripts/tags/friends.js +99 -0
  151. package/scripts/tags/ghcard.js +6 -1
  152. package/scripts/tags/image.js +14 -2
  153. package/scripts/tags/link.js +6 -1
  154. package/scripts/tags/md.js +59 -0
  155. package/scripts/tags/media.js +25 -1
  156. package/scripts/tags/note.js +12 -2
  157. package/scripts/tags/site.js +87 -51
  158. package/scripts/tags/span.js +12 -2
  159. package/scripts/tags/swiper.js +38 -0
  160. package/scripts/tags/tabs.js +85 -54
  161. package/scripts/tags/timeline.js +6 -1
  162. package/source/css/Readme.md +28 -0
  163. package/source/css/_defines/AutoPrefixCSS.styl +347 -0
  164. package/source/css/_defines/Readme.md +3 -0
  165. package/source/css/_defines/color.styl +19 -0
  166. package/source/css/_defines/effect.styl +0 -13
  167. package/source/css/_defines/fonts.styl +17 -18
  168. package/source/css/_defines/func.styl +12 -30
  169. package/source/css/_first/base_first.styl +113 -0
  170. package/source/css/_first/{cover.styl → cover_first.styl} +113 -87
  171. package/source/css/_first/dark_first.styl +75 -0
  172. package/source/css/_first/fontfamily_first.styl +17 -0
  173. package/source/css/_first/{navbar.styl → navbar_first.styl} +4 -10
  174. package/source/css/_first/search_first.styl +12 -0
  175. package/source/css/{_base/index.styl → _style/_base/base.styl} +8 -92
  176. package/source/css/_style/_base/fontfamily_async.styl +8 -0
  177. package/source/css/{_layout → _style/_layout}/archive.styl +0 -0
  178. package/source/css/{_layout → _style/_layout}/article.styl +2 -29
  179. package/source/css/{_layout → _style/_layout}/footer.styl +0 -0
  180. package/source/css/_style/_layout/friends-simpleuser.styl +23 -0
  181. package/source/css/_style/_layout/friends-traditional.styl +81 -0
  182. package/source/css/{_layout → _style/_layout}/img.styl +0 -0
  183. package/source/css/_style/_layout/loading.styl +14 -0
  184. package/source/css/{_layout → _style/_layout}/main.styl +17 -7
  185. package/source/css/{_layout → _style/_layout}/md.styl +0 -0
  186. package/source/css/{_layout → _style/_layout}/pagination.styl +1 -1
  187. package/source/css/{_layout → _style/_layout}/posts.styl +2 -0
  188. package/source/css/{_first → _style/_layout}/search.styl +0 -103
  189. package/source/css/{_layout → _style/_layout}/sidebar.styl +24 -3
  190. package/source/css/{_layout → _style/_layout}/snackbar.styl +0 -0
  191. package/source/css/{_layout → _style/_layout}/toc.styl +1 -1
  192. package/source/css/{_layout → _style/_layout}/video.styl +0 -0
  193. package/source/css/_style/_plugins/_dark/dark_async.styl +50 -0
  194. package/source/css/{_plugins/dark.styl → _style/_plugins/_dark/dark_plugins.styl} +80 -76
  195. package/source/css/_style/_plugins/_highlight/highlightjs/clipboard.styl +36 -0
  196. package/source/css/_style/_plugins/_highlight/highlightjs/color.styl +96 -0
  197. package/source/css/_style/_plugins/_highlight/highlightjs/index.styl +102 -0
  198. package/source/css/_style/_plugins/_highlight/highlightjs/language.styl +63 -0
  199. package/source/css/_style/_plugins/_highlight/index.styl +1 -0
  200. package/source/css/_style/_plugins/_highlight/prismjs/clipboard.styl +33 -0
  201. package/source/css/_style/_plugins/_highlight/prismjs/index.styl +8 -0
  202. package/source/css/_style/_plugins/_highlight/prismjs/language.styl +63 -0
  203. package/source/css/_style/_plugins/_rightmenu/reading.styl +56 -0
  204. package/source/css/{_plugins → _style/_plugins/_rightmenu}/rightmenu.styl +20 -1
  205. package/source/css/{_plugins → _style/_plugins}/aplayer.styl +11 -0
  206. package/source/css/{_plugins → _style/_plugins}/cursor.styl +49 -9
  207. package/source/css/_style/_plugins/fontcolor.styl +79 -0
  208. package/source/css/{_plugins → _style/_plugins}/gitalk.styl +0 -0
  209. package/source/css/{_plugins → _style/_plugins}/index.styl +14 -6
  210. package/source/css/{_plugins → _style/_plugins}/mathjax.styl +0 -0
  211. package/source/css/_style/_plugins/message.styl +14 -0
  212. package/source/css/{_plugins → _style/_plugins}/pjaxanimate.styl +0 -0
  213. package/source/css/{_plugins → _style/_plugins}/valine.styl +0 -0
  214. package/source/css/_style/_tag-plugins/Readme.md +9 -0
  215. package/source/css/{_tag-plugins → _style/_tag-plugins}/btns.styl +0 -0
  216. package/source/css/{_tag-plugins → _style/_tag-plugins}/checkbox.styl +0 -0
  217. package/source/css/{_tag-plugins → _style/_tag-plugins}/dropmenu.styl +0 -0
  218. package/source/css/{_plugins → _style/_tag-plugins}/fancybox.styl +8 -9
  219. package/source/css/{_tag-plugins → _style/_tag-plugins}/folding.styl +0 -0
  220. package/source/css/{_tag-plugins → _style/_tag-plugins}/frame.styl +0 -0
  221. package/source/css/_style/_tag-plugins/friends.styl +72 -0
  222. package/source/css/{_tag-plugins → _style/_tag-plugins}/ghcard.styl +0 -0
  223. package/source/css/{_tag-plugins → _style/_tag-plugins}/image.styl +0 -0
  224. package/source/css/{_tag-plugins → _style/_tag-plugins}/link.styl +0 -0
  225. package/source/css/{_tag-plugins → _style/_tag-plugins}/media.styl +0 -0
  226. package/source/css/{_tag-plugins → _style/_tag-plugins}/note.styl +0 -0
  227. package/source/css/_style/_tag-plugins/sites.styl +87 -0
  228. package/source/css/{_tag-plugins → _style/_tag-plugins}/span.styl +0 -0
  229. package/source/css/_style/_tag-plugins/swiper.styl +44 -0
  230. package/source/css/{_tag-plugins → _style/_tag-plugins}/table.styl +0 -0
  231. package/source/css/{_tag-plugins → _style/_tag-plugins}/tabs.styl +0 -0
  232. package/source/css/_style/_tag-plugins/tag.json +35 -0
  233. package/source/css/_style/_tag-plugins/text.styl +31 -0
  234. package/source/css/{_tag-plugins → _style/_tag-plugins}/timeline.styl +0 -0
  235. package/source/css/_style/index.styl +9 -0
  236. package/source/css/first.styl +19 -6
  237. package/source/css/message.css +6 -0
  238. package/source/css/style.styl +5 -4
  239. package/source/js/app.js +1021 -277
  240. package/source/js/plugins/aplayer.js +191 -0
  241. package/source/js/plugins/contributors.js +92 -0
  242. package/source/js/plugins/friends.js +93 -0
  243. package/source/js/plugins/parallax.js +191 -0
  244. package/source/js/plugins/rightMenu.js +560 -0
  245. package/source/js/plugins/sites.js +96 -0
  246. package/source/js/search/hexo.js +178 -374
  247. package/source/js/thirdparty/message.js +6 -0
  248. package/source/js/{valine.js → thirdparty/valine.js} +0 -0
  249. package/source/libs/@fancyapps/ui/LICENSE.md +8 -0
  250. package/source/libs/@fancyapps/ui/README.md +224 -0
  251. package/source/libs/@fancyapps/ui/dist/fancybox.css +1 -0
  252. package/source/libs/@fancyapps/ui/dist/fancybox.umd.js +2 -0
  253. package/source/libs/@fortawesome/fontawesome-free/LICENSE.txt +34 -0
  254. package/source/libs/@fortawesome/fontawesome-free/css/all.min.css +5 -0
  255. package/source/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.eot +0 -0
  256. package/source/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.svg +3637 -0
  257. package/source/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.ttf +0 -0
  258. package/source/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff +0 -0
  259. package/source/libs/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2 +0 -0
  260. package/source/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.eot +0 -0
  261. package/source/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.svg +805 -0
  262. package/source/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.ttf +0 -0
  263. package/source/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff +0 -0
  264. package/source/libs/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2 +0 -0
  265. package/source/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.eot +0 -0
  266. package/source/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.svg +5015 -0
  267. package/source/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.ttf +0 -0
  268. package/source/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff +0 -0
  269. package/source/libs/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2 +0 -0
  270. package/source/libs/aplayer/LICENSE +21 -0
  271. package/source/libs/aplayer/README.md +123 -0
  272. package/source/libs/aplayer/dist/APlayer.min.css +3 -0
  273. package/source/libs/aplayer/dist/APlayer.min.css.map +1 -0
  274. package/source/libs/aplayer/dist/APlayer.min.js +2 -0
  275. package/source/libs/aplayer/dist/APlayer.min.js.map +1 -0
  276. package/source/libs/busuanzi/LICENSE +21 -0
  277. package/source/libs/busuanzi/README.md +21 -0
  278. package/source/libs/busuanzi/js/busuanzi.pure.mini.js +1 -0
  279. package/source/libs/comment_typing/comment_typing.js +2 -0
  280. package/source/libs/flying-pages/flying-pages.min.js +1 -0
  281. package/source/libs/font-awesome-animation/font-awesome-animation.min.css +2 -0
  282. package/source/libs/github-markdown-css/github-markdown.css +1036 -0
  283. package/source/libs/github-markdown-css/license +9 -0
  284. package/source/libs/github-markdown-css/readme.md +63 -0
  285. package/source/libs/hls.js/LICENSE +28 -0
  286. package/source/libs/hls.js/README.md +442 -0
  287. package/source/libs/hls.js/dist/hls.min.js +2 -0
  288. package/source/libs/hls.js/dist/hls.min.js.map +1 -0
  289. package/source/libs/instant_page/instant_page.js +2 -0
  290. package/source/libs/jquery/LICENSE.txt +20 -0
  291. package/source/libs/jquery/README.md +62 -0
  292. package/source/libs/jquery/dist/jquery.min.js +2 -0
  293. package/source/libs/jquery/dist/jquery.min.map +1 -0
  294. package/source/libs/katex/README.md +119 -0
  295. package/source/libs/katex/contrib/auto-render.min.js +1 -0
  296. package/source/libs/katex/contrib/copy-tex.min.css +1 -0
  297. package/source/libs/katex/contrib/copy-tex.min.js +1 -0
  298. package/source/libs/katex/contrib/mathtex-script-type.min.js +1 -0
  299. package/source/libs/katex/contrib/mhchem.min.js +1 -0
  300. package/source/libs/katex/contrib/render-a11y-string.min.js +1 -0
  301. package/source/libs/katex/fonts/KaTeX_AMS-Regular.ttf +0 -0
  302. package/source/libs/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
  303. package/source/libs/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  304. package/source/libs/katex/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
  305. package/source/libs/katex/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
  306. package/source/libs/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  307. package/source/libs/katex/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
  308. package/source/libs/katex/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
  309. package/source/libs/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  310. package/source/libs/katex/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
  311. package/source/libs/katex/fonts/KaTeX_Fraktur-Bold.woff +0 -0
  312. package/source/libs/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  313. package/source/libs/katex/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
  314. package/source/libs/katex/fonts/KaTeX_Fraktur-Regular.woff +0 -0
  315. package/source/libs/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  316. package/source/libs/katex/fonts/KaTeX_Main-Bold.ttf +0 -0
  317. package/source/libs/katex/fonts/KaTeX_Main-Bold.woff +0 -0
  318. package/source/libs/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
  319. package/source/libs/katex/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
  320. package/source/libs/katex/fonts/KaTeX_Main-BoldItalic.woff +0 -0
  321. package/source/libs/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  322. package/source/libs/katex/fonts/KaTeX_Main-Italic.ttf +0 -0
  323. package/source/libs/katex/fonts/KaTeX_Main-Italic.woff +0 -0
  324. package/source/libs/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
  325. package/source/libs/katex/fonts/KaTeX_Main-Regular.ttf +0 -0
  326. package/source/libs/katex/fonts/KaTeX_Main-Regular.woff +0 -0
  327. package/source/libs/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
  328. package/source/libs/katex/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
  329. package/source/libs/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  330. package/source/libs/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  331. package/source/libs/katex/fonts/KaTeX_Math-Italic.ttf +0 -0
  332. package/source/libs/katex/fonts/KaTeX_Math-Italic.woff +0 -0
  333. package/source/libs/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
  334. package/source/libs/katex/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
  335. package/source/libs/katex/fonts/KaTeX_SansSerif-Bold.woff +0 -0
  336. package/source/libs/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  337. package/source/libs/katex/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
  338. package/source/libs/katex/fonts/KaTeX_SansSerif-Italic.woff +0 -0
  339. package/source/libs/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  340. package/source/libs/katex/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
  341. package/source/libs/katex/fonts/KaTeX_SansSerif-Regular.woff +0 -0
  342. package/source/libs/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  343. package/source/libs/katex/fonts/KaTeX_Script-Regular.ttf +0 -0
  344. package/source/libs/katex/fonts/KaTeX_Script-Regular.woff +0 -0
  345. package/source/libs/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
  346. package/source/libs/katex/fonts/KaTeX_Size1-Regular.ttf +0 -0
  347. package/source/libs/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
  348. package/source/libs/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  349. package/source/libs/katex/fonts/KaTeX_Size2-Regular.ttf +0 -0
  350. package/source/libs/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
  351. package/source/libs/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  352. package/source/libs/katex/fonts/KaTeX_Size3-Regular.ttf +0 -0
  353. package/source/libs/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
  354. package/source/libs/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  355. package/source/libs/katex/fonts/KaTeX_Size4-Regular.ttf +0 -0
  356. package/source/libs/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
  357. package/source/libs/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  358. package/source/libs/katex/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
  359. package/source/libs/katex/fonts/KaTeX_Typewriter-Regular.woff +0 -0
  360. package/source/libs/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  361. package/source/libs/katex/katex.min.css +1 -0
  362. package/source/libs/katex/katex.min.js +1 -0
  363. package/source/libs/marked/LICENSE.md +44 -0
  364. package/source/libs/marked/README.md +87 -0
  365. package/source/libs/marked/marked.min.js +6 -0
  366. package/source/libs/mathjax/LICENSE +202 -0
  367. package/source/libs/mathjax/README.md +237 -0
  368. package/source/libs/mathjax/es5/a11y/assistive-mml.js +1 -0
  369. package/source/libs/mathjax/es5/a11y/complexity.js +1 -0
  370. package/source/libs/mathjax/es5/a11y/explorer.js +1 -0
  371. package/source/libs/mathjax/es5/a11y/semantic-enrich.js +1 -0
  372. package/source/libs/mathjax/es5/adaptors/liteDOM.js +1 -0
  373. package/source/libs/mathjax/es5/core.js +1 -0
  374. package/source/libs/mathjax/es5/input/asciimath.js +1 -0
  375. package/source/libs/mathjax/es5/input/mml/entities.js +1 -0
  376. package/source/libs/mathjax/es5/input/mml/extensions/mml3.js +1 -0
  377. package/source/libs/mathjax/es5/input/mml/extensions/mml3.sef.json +1 -0
  378. package/source/libs/mathjax/es5/input/mml.js +1 -0
  379. package/source/libs/mathjax/es5/input/tex/extensions/action.js +1 -0
  380. package/source/libs/mathjax/es5/input/tex/extensions/all-packages.js +34 -0
  381. package/source/libs/mathjax/es5/input/tex/extensions/ams.js +1 -0
  382. package/source/libs/mathjax/es5/input/tex/extensions/amscd.js +1 -0
  383. package/source/libs/mathjax/es5/input/tex/extensions/autoload.js +1 -0
  384. package/source/libs/mathjax/es5/input/tex/extensions/bbox.js +1 -0
  385. package/source/libs/mathjax/es5/input/tex/extensions/boldsymbol.js +1 -0
  386. package/source/libs/mathjax/es5/input/tex/extensions/braket.js +1 -0
  387. package/source/libs/mathjax/es5/input/tex/extensions/bussproofs.js +1 -0
  388. package/source/libs/mathjax/es5/input/tex/extensions/cancel.js +1 -0
  389. package/source/libs/mathjax/es5/input/tex/extensions/centernot.js +1 -0
  390. package/source/libs/mathjax/es5/input/tex/extensions/color.js +1 -0
  391. package/source/libs/mathjax/es5/input/tex/extensions/colortbl.js +1 -0
  392. package/source/libs/mathjax/es5/input/tex/extensions/colorv2.js +1 -0
  393. package/source/libs/mathjax/es5/input/tex/extensions/configmacros.js +1 -0
  394. package/source/libs/mathjax/es5/input/tex/extensions/enclose.js +1 -0
  395. package/source/libs/mathjax/es5/input/tex/extensions/extpfeil.js +1 -0
  396. package/source/libs/mathjax/es5/input/tex/extensions/gensymb.js +1 -0
  397. package/source/libs/mathjax/es5/input/tex/extensions/html.js +1 -0
  398. package/source/libs/mathjax/es5/input/tex/extensions/mathtools.js +1 -0
  399. package/source/libs/mathjax/es5/input/tex/extensions/mhchem.js +34 -0
  400. package/source/libs/mathjax/es5/input/tex/extensions/newcommand.js +1 -0
  401. package/source/libs/mathjax/es5/input/tex/extensions/noerrors.js +1 -0
  402. package/source/libs/mathjax/es5/input/tex/extensions/noundefined.js +1 -0
  403. package/source/libs/mathjax/es5/input/tex/extensions/physics.js +1 -0
  404. package/source/libs/mathjax/es5/input/tex/extensions/require.js +1 -0
  405. package/source/libs/mathjax/es5/input/tex/extensions/setoptions.js +1 -0
  406. package/source/libs/mathjax/es5/input/tex/extensions/tagformat.js +1 -0
  407. package/source/libs/mathjax/es5/input/tex/extensions/textcomp.js +1 -0
  408. package/source/libs/mathjax/es5/input/tex/extensions/textmacros.js +1 -0
  409. package/source/libs/mathjax/es5/input/tex/extensions/unicode.js +1 -0
  410. package/source/libs/mathjax/es5/input/tex/extensions/upgreek.js +1 -0
  411. package/source/libs/mathjax/es5/input/tex/extensions/verb.js +1 -0
  412. package/source/libs/mathjax/es5/input/tex-base.js +1 -0
  413. package/source/libs/mathjax/es5/input/tex-full.js +34 -0
  414. package/source/libs/mathjax/es5/input/tex.js +1 -0
  415. package/source/libs/mathjax/es5/latest.js +1 -0
  416. package/source/libs/mathjax/es5/loader.js +1 -0
  417. package/source/libs/mathjax/es5/mml-chtml.js +1 -0
  418. package/source/libs/mathjax/es5/mml-svg.js +1 -0
  419. package/source/libs/mathjax/es5/node-main.js +1 -0
  420. package/source/libs/mathjax/es5/output/chtml/fonts/tex.js +1 -0
  421. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_AMS-Regular.woff +0 -0
  422. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Bold.woff +0 -0
  423. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Regular.woff +0 -0
  424. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff +0 -0
  425. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Fraktur-Regular.woff +0 -0
  426. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff +0 -0
  427. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Italic.woff +0 -0
  428. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff +0 -0
  429. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Math-BoldItalic.woff +0 -0
  430. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff +0 -0
  431. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Math-Regular.woff +0 -0
  432. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Bold.woff +0 -0
  433. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff +0 -0
  434. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff +0 -0
  435. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff +0 -0
  436. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff +0 -0
  437. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff +0 -0
  438. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff +0 -0
  439. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff +0 -0
  440. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff +0 -0
  441. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff +0 -0
  442. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff +0 -0
  443. package/source/libs/mathjax/es5/output/chtml/fonts/woff-v2/MathJax_Zero.woff +0 -0
  444. package/source/libs/mathjax/es5/output/chtml.js +1 -0
  445. package/source/libs/mathjax/es5/output/svg/fonts/tex.js +1 -0
  446. package/source/libs/mathjax/es5/output/svg.js +1 -0
  447. package/source/libs/mathjax/es5/sre/mathmaps/de.js +125 -0
  448. package/source/libs/mathjax/es5/sre/mathmaps/en.js +131 -0
  449. package/source/libs/mathjax/es5/sre/mathmaps/es.js +122 -0
  450. package/source/libs/mathjax/es5/sre/mathmaps/fr.js +125 -0
  451. package/source/libs/mathjax/es5/sre/mathmaps/hi.js +125 -0
  452. package/source/libs/mathjax/es5/sre/mathmaps/it.js +125 -0
  453. package/source/libs/mathjax/es5/sre/mathmaps/nemeth.js +113 -0
  454. package/source/libs/mathjax/es5/sre/sre-node.js +11 -0
  455. package/source/libs/mathjax/es5/sre/sre_browser.js +999 -0
  456. package/source/libs/mathjax/es5/startup.js +1 -0
  457. package/source/libs/mathjax/es5/tex-chtml-full.js +34 -0
  458. package/source/libs/mathjax/es5/tex-chtml.js +1 -0
  459. package/source/libs/mathjax/es5/tex-mml-chtml.js +1 -0
  460. package/source/libs/mathjax/es5/tex-mml-svg.js +1 -0
  461. package/source/libs/mathjax/es5/tex-svg-full.js +34 -0
  462. package/source/libs/mathjax/es5/tex-svg.js +1 -0
  463. package/source/libs/mathjax/es5/ui/lazy.js +1 -0
  464. package/source/libs/mathjax/es5/ui/menu.js +1 -0
  465. package/source/libs/mathjax/es5/ui/safe.js +1 -0
  466. package/source/libs/meting/LICENSE +21 -0
  467. package/source/libs/meting/README.md +125 -0
  468. package/source/libs/meting/dist/Meting.min.js +1 -0
  469. package/source/libs/node-waves/LICENSE +21 -0
  470. package/source/libs/node-waves/README.md +23 -0
  471. package/source/libs/node-waves/dist/waves.min.css +7 -0
  472. package/source/libs/node-waves/dist/waves.min.js +2 -0
  473. package/source/libs/node-waves/dist/waves.min.js.map +1 -0
  474. package/source/libs/nprogress/License.md +19 -0
  475. package/source/libs/nprogress/Readme.md +197 -0
  476. package/source/libs/nprogress/nprogress.js +476 -0
  477. package/source/libs/pjax/LICENSE +20 -0
  478. package/source/libs/pjax/README.md +726 -0
  479. package/source/libs/pjax/pjax.min.js +1 -0
  480. package/source/libs/scrollreveal/README.md +126 -0
  481. package/source/libs/scrollreveal/dist/scrollreveal.min.js +12 -0
  482. package/source/libs/swiper/swiper-bundle.min.css +13 -0
  483. package/source/libs/swiper/swiper-bundle.min.js +14 -0
  484. package/source/libs/swiper/swiper-bundle.min.js.map +1 -0
  485. package/source/libs/vanilla-lazyload/LICENSE +21 -0
  486. package/source/libs/vanilla-lazyload/README.md +874 -0
  487. package/source/libs/vanilla-lazyload/dist/lazyload.min.js +1 -0
  488. package/source/media/cursor/circle.png +0 -0
  489. package/source/media/cursor/left_ptr.png +0 -0
  490. package/source/media/cursor/openhand.png +0 -0
  491. package/source/media/cursor/pointer.png +0 -0
  492. package/source/media/cursor/text.png +0 -0
  493. package/source/media/cursor/zoom-in.png +0 -0
  494. package/source/media/cursor/zoom-out.png +0 -0
  495. package/source/media/fonts/CascadiaCode/Cascadia.ttf +0 -0
  496. package/source/media/fonts/CascadiaCode/CascadiaMono.ttf +0 -0
  497. package/source/media/fonts/CascadiaCode/CascadiaMonoPL.ttf +0 -0
  498. package/source/media/fonts/CascadiaCode/CascadiaPL.ttf +0 -0
  499. package/source/media/fonts/CascadiaCode/README.md +9 -0
  500. package/source/media/fonts/Monaco/Monaco.ttf +0 -0
  501. package/source/media/fonts/UbuntuMono/UbuntuMono-Regular.ttf +0 -0
  502. package/source/media/fonts/VarelaRound/VarelaRound-Regular.ttf +0 -0
  503. package/source/media/org.volantis/README.md +19 -0
  504. package/source/media/org.volantis/blog/Logo-Cover@3x.png +0 -0
  505. package/source/media/org.volantis/blog/Logo-NavBar@3x.png +0 -0
  506. package/source/media/org.volantis/blog/favicon/android-chrome-192x192.png +0 -0
  507. package/source/media/org.volantis/blog/favicon/android-chrome-512x512.png +0 -0
  508. package/source/media/org.volantis/blog/favicon/apple-touch-icon.png +0 -0
  509. package/source/media/org.volantis/blog/favicon/browserconfig.xml +9 -0
  510. package/source/media/org.volantis/blog/favicon/favicon-16x16.png +0 -0
  511. package/source/media/org.volantis/blog/favicon/favicon-32x32.png +0 -0
  512. package/source/media/org.volantis/blog/favicon/favicon.ico +0 -0
  513. package/source/media/org.volantis/blog/favicon/mstile-150x150.png +0 -0
  514. package/source/media/org.volantis/blog/favicon/safari-pinned-tab.svg +26 -0
  515. package/source/media/org.volantis/blog/favicon/site.webmanifest +19 -0
  516. package/source/media/org.volantis/blog/logo/hexo.jpg +0 -0
  517. package/source/media/org.volantis/blog/qrcode/github@volantis.png +0 -0
  518. package/source/media/org.volantis/icon/1322024-social-media/001-google-drive.svg +1 -0
  519. package/source/media/org.volantis/icon/1322024-social-media/002-myspace.svg +1 -0
  520. package/source/media/org.volantis/icon/1322024-social-media/003-reddit.svg +1 -0
  521. package/source/media/org.volantis/icon/1322024-social-media/004-wattpad.svg +1 -0
  522. package/source/media/org.volantis/icon/1322024-social-media/005-dribbble.svg +1 -0
  523. package/source/media/org.volantis/icon/1322024-social-media/006-youtube.svg +1 -0
  524. package/source/media/org.volantis/icon/1322024-social-media/007-forrst.svg +1 -0
  525. package/source/media/org.volantis/icon/1322024-social-media/008-pinterest.svg +1 -0
  526. package/source/media/org.volantis/icon/1322024-social-media/009-flickr.svg +1 -0
  527. package/source/media/org.volantis/icon/1322024-social-media/010-facebook.svg +1 -0
  528. package/source/media/org.volantis/icon/1322024-social-media/011-team-viewer.svg +1 -0
  529. package/source/media/org.volantis/icon/1322024-social-media/012-blogger.svg +1 -0
  530. package/source/media/org.volantis/icon/1322024-social-media/013-grooveshark.svg +1 -0
  531. package/source/media/org.volantis/icon/1322024-social-media/014-whatsapp.svg +1 -0
  532. package/source/media/org.volantis/icon/1322024-social-media/015-instagram.svg +1 -0
  533. package/source/media/org.volantis/icon/1322024-social-media/016-skype.svg +1 -0
  534. package/source/media/org.volantis/icon/1322024-social-media/017-picasa.svg +1 -0
  535. package/source/media/org.volantis/icon/1322024-social-media/018-twitter.svg +1 -0
  536. package/source/media/org.volantis/icon/1322024-social-media/019-yahoo.svg +1 -0
  537. package/source/media/org.volantis/icon/1322024-social-media/020-rss.svg +1 -0
  538. package/source/media/org.volantis/icon/1322024-social-media/021-envato.svg +1 -0
  539. package/source/media/org.volantis/icon/1322024-social-media/022-soundcloud.svg +1 -0
  540. package/source/media/org.volantis/icon/1322024-social-media/023-kickstarter.svg +1 -0
  541. package/source/media/org.volantis/icon/1322024-social-media/024-snapchat.svg +1 -0
  542. package/source/media/org.volantis/icon/1322024-social-media/025-quora.svg +1 -0
  543. package/source/media/org.volantis/icon/1322024-social-media/026-yelp.svg +1 -0
  544. package/source/media/org.volantis/icon/1322024-social-media/027-slideshare.svg +1 -0
  545. package/source/media/org.volantis/icon/1322024-social-media/028-opera.svg +1 -0
  546. package/source/media/org.volantis/icon/1322024-social-media/029-github.svg +1 -0
  547. package/source/media/org.volantis/icon/1322024-social-media/030-last-fm.svg +1 -0
  548. package/source/media/org.volantis/icon/1322024-social-media/031-twitch.svg +1 -0
  549. package/source/media/org.volantis/icon/1322024-social-media/032-tumblr.svg +1 -0
  550. package/source/media/org.volantis/icon/1322024-social-media/033-spotify.svg +1 -0
  551. package/source/media/org.volantis/icon/1322024-social-media/034-foursquare.svg +1 -0
  552. package/source/media/org.volantis/icon/1322024-social-media/035-hangout.svg +1 -0
  553. package/source/media/org.volantis/icon/1322024-social-media/036-dropbox.svg +1 -0
  554. package/source/media/org.volantis/icon/1322024-social-media/037-vine.svg +1 -0
  555. package/source/media/org.volantis/icon/1322024-social-media/038-google-plus.svg +1 -0
  556. package/source/media/org.volantis/icon/1322024-social-media/039-path.svg +1 -0
  557. package/source/media/org.volantis/icon/1322024-social-media/040-vimeo.svg +1 -0
  558. package/source/media/org.volantis/icon/1322024-social-media/041-addthis.svg +1 -0
  559. package/source/media/org.volantis/icon/1322024-social-media/042-xing.svg +1 -0
  560. package/source/media/org.volantis/icon/1322024-social-media/043-stumbleupon.svg +1 -0
  561. package/source/media/org.volantis/icon/1322024-social-media/044-deviantart.svg +1 -0
  562. package/source/media/org.volantis/icon/1322024-social-media/045-telegram.svg +1 -0
  563. package/source/media/org.volantis/icon/1322024-social-media/046-vk.svg +1 -0
  564. package/source/media/org.volantis/icon/1322024-social-media/047-swarm.svg +1 -0
  565. package/source/media/org.volantis/icon/1322024-social-media/048-bebo.svg +1 -0
  566. package/source/media/org.volantis/icon/1322024-social-media/049-technorati.svg +1 -0
  567. package/source/media/org.volantis/icon/1322024-social-media/050-periscope.svg +1 -0
  568. package/source/media/org.volantis/icon/2439351-arrows/001-arrows.svg +1 -0
  569. package/source/media/org.volantis/icon/2439351-arrows/002-arrows.svg +1 -0
  570. package/source/media/org.volantis/icon/2439351-arrows/003-arrows.svg +1 -0
  571. package/source/media/org.volantis/icon/2439351-arrows/004-arrows.svg +1 -0
  572. package/source/media/org.volantis/icon/2439351-arrows/005-arrows.svg +1 -0
  573. package/source/media/org.volantis/icon/2439351-arrows/006-arrows.svg +1 -0
  574. package/source/media/org.volantis/icon/2439351-arrows/007-arrows.svg +1 -0
  575. package/source/media/org.volantis/icon/2439351-arrows/008-arrows.svg +1 -0
  576. package/source/media/org.volantis/icon/2439351-arrows/009-arrows.svg +1 -0
  577. package/source/media/org.volantis/icon/2439351-arrows/010-arrows.svg +1 -0
  578. package/source/media/org.volantis/icon/2439351-arrows/011-arrows.svg +1 -0
  579. package/source/media/org.volantis/icon/2439351-arrows/012-arrows.svg +1 -0
  580. package/source/media/org.volantis/icon/2439351-arrows/013-arrows.svg +1 -0
  581. package/source/media/org.volantis/icon/2439351-arrows/014-arrows.svg +1 -0
  582. package/source/media/org.volantis/icon/2439351-arrows/015-arrows.svg +1 -0
  583. package/source/media/org.volantis/icon/2439351-arrows/016-arrows.svg +1 -0
  584. package/source/media/org.volantis/icon/2439351-arrows/017-arrows.svg +1 -0
  585. package/source/media/org.volantis/icon/2439351-arrows/018-arrows.svg +1 -0
  586. package/source/media/org.volantis/icon/2439351-arrows/019-arrows.svg +1 -0
  587. package/source/media/org.volantis/icon/2439351-arrows/020-arrows.svg +1 -0
  588. package/source/media/org.volantis/icon/2439351-arrows/021-arrows.svg +1 -0
  589. package/source/media/org.volantis/icon/2439351-arrows/022-arrows.svg +1 -0
  590. package/source/media/org.volantis/icon/2439351-arrows/023-arrows.svg +1 -0
  591. package/source/media/org.volantis/icon/2439351-arrows/024-arrows.svg +1 -0
  592. package/source/media/org.volantis/icon/2439351-arrows/025-arrows.svg +1 -0
  593. package/source/media/org.volantis/icon/2439351-arrows/026-arrows.svg +1 -0
  594. package/source/media/org.volantis/icon/2439351-arrows/027-arrows.svg +1 -0
  595. package/source/media/org.volantis/icon/2439351-arrows/028-arrows.svg +1 -0
  596. package/source/media/org.volantis/icon/2439351-arrows/029-arrows.svg +1 -0
  597. package/source/media/org.volantis/icon/2439351-arrows/030-arrows.svg +1 -0
  598. package/source/media/org.volantis/icon/2439351-arrows/031-arrows.svg +1 -0
  599. package/source/media/org.volantis/icon/2439351-arrows/032-arrows.svg +1 -0
  600. package/source/media/org.volantis/icon/2439351-arrows/033-arrows.svg +1 -0
  601. package/source/media/org.volantis/icon/2439351-arrows/034-arrows.svg +1 -0
  602. package/source/media/org.volantis/icon/2439351-arrows/035-arrows.svg +1 -0
  603. package/source/media/org.volantis/icon/2439351-arrows/036-arrows.svg +1 -0
  604. package/source/media/org.volantis/icon/2439351-arrows/037-arrows.svg +1 -0
  605. package/source/media/org.volantis/icon/2439351-arrows/038-arrows.svg +1 -0
  606. package/source/media/org.volantis/icon/2439351-arrows/039-arrows.svg +1 -0
  607. package/source/media/org.volantis/icon/2439351-arrows/040-arrows.svg +1 -0
  608. package/source/media/org.volantis/icon/2439351-arrows/041-arrows.svg +1 -0
  609. package/source/media/org.volantis/icon/2439351-arrows/042-arrows.svg +1 -0
  610. package/source/media/org.volantis/icon/2439351-arrows/043-arrows.svg +1 -0
  611. package/source/media/org.volantis/icon/2439351-arrows/044-arrows.svg +1 -0
  612. package/source/media/org.volantis/icon/2439351-arrows/045-arrows.svg +1 -0
  613. package/source/media/org.volantis/icon/2439351-arrows/046-arrows.svg +1 -0
  614. package/source/media/org.volantis/icon/2439351-arrows/047-arrows.svg +1 -0
  615. package/source/media/org.volantis/icon/2439351-arrows/048-arrows.svg +1 -0
  616. package/source/media/org.volantis/icon/2439351-arrows/049-arrows.svg +1 -0
  617. package/source/media/org.volantis/icon/2439351-arrows/050-arrows.svg +1 -0
  618. package/source/media/org.volantis/icon/2820262-cloud-networking/001-download.svg +1 -0
  619. package/source/media/org.volantis/icon/2820262-cloud-networking/002-upload.svg +1 -0
  620. package/source/media/org.volantis/icon/2820262-cloud-networking/003-cloud.svg +1 -0
  621. package/source/media/org.volantis/icon/2820262-cloud-networking/004-storage.svg +1 -0
  622. package/source/media/org.volantis/icon/2820262-cloud-networking/005-downloading.svg +1 -0
  623. package/source/media/org.volantis/icon/2820262-cloud-networking/006-upload.svg +1 -0
  624. package/source/media/org.volantis/icon/2820262-cloud-networking/007-direct download.svg +1 -0
  625. package/source/media/org.volantis/icon/2820262-cloud-networking/008-button.svg +1 -0
  626. package/source/media/org.volantis/icon/2820262-cloud-networking/009-file.svg +1 -0
  627. package/source/media/org.volantis/icon/2820262-cloud-networking/010-save file.svg +1 -0
  628. package/source/media/org.volantis/icon/2820262-cloud-networking/011-save.svg +1 -0
  629. package/source/media/org.volantis/icon/2820262-cloud-networking/012-image.svg +1 -0
  630. package/source/media/org.volantis/icon/2820262-cloud-networking/013-bar.svg +1 -0
  631. package/source/media/org.volantis/icon/2820262-cloud-networking/014-loading.svg +1 -0
  632. package/source/media/org.volantis/icon/2820262-cloud-networking/015-button.svg +1 -0
  633. package/source/media/org.volantis/icon/2820262-cloud-networking/016-save button.svg +1 -0
  634. package/source/media/org.volantis/icon/2820262-cloud-networking/017-download.svg +1 -0
  635. package/source/media/org.volantis/icon/2820262-cloud-networking/018-upload.svg +1 -0
  636. package/source/media/org.volantis/icon/2820262-cloud-networking/019-download.svg +1 -0
  637. package/source/media/org.volantis/icon/2820262-cloud-networking/020-upload.svg +1 -0
  638. package/source/media/org.volantis/icon/2820262-cloud-networking/021-download.svg +1 -0
  639. package/source/media/org.volantis/icon/2820262-cloud-networking/022-export.svg +1 -0
  640. package/source/media/org.volantis/icon/2820262-cloud-networking/023-download.svg +1 -0
  641. package/source/media/org.volantis/icon/2820262-cloud-networking/024-uploading.svg +1 -0
  642. package/source/media/org.volantis/icon/2820262-cloud-networking/025-download.svg +1 -0
  643. package/source/media/org.volantis/icon/2820262-cloud-networking/026-upload.svg +1 -0
  644. package/source/media/org.volantis/icon/2820262-cloud-networking/027-upload.svg +1 -0
  645. package/source/media/org.volantis/icon/2820262-cloud-networking/028-upload button.svg +1 -0
  646. package/source/media/org.volantis/icon/2820262-cloud-networking/029-up arrow.svg +1 -0
  647. package/source/media/org.volantis/icon/2820262-cloud-networking/030-up arrow.svg +1 -0
  648. package/source/media/org.volantis/icon/2820262-cloud-networking/031-upload button.svg +1 -0
  649. package/source/media/org.volantis/icon/2820262-cloud-networking/032-upload file.svg +1 -0
  650. package/source/media/org.volantis/icon/725277-social-media/001-livejournal.svg +75 -0
  651. package/source/media/org.volantis/icon/725277-social-media/002-linkedin.svg +67 -0
  652. package/source/media/org.volantis/icon/725277-social-media/003-ello.svg +60 -0
  653. package/source/media/org.volantis/icon/725277-social-media/004-hi5.svg +85 -0
  654. package/source/media/org.volantis/icon/725277-social-media/005-skype.svg +90 -0
  655. package/source/media/org.volantis/icon/725277-social-media/006-quora.svg +77 -0
  656. package/source/media/org.volantis/icon/725277-social-media/007-daily-motion.svg +58 -0
  657. package/source/media/org.volantis/icon/725277-social-media/008-air-bnb.svg +77 -0
  658. package/source/media/org.volantis/icon/725277-social-media/009-buzznet.svg +55 -0
  659. package/source/media/org.volantis/icon/725277-social-media/010-meetup.svg +130 -0
  660. package/source/media/org.volantis/icon/725277-social-media/011-diaspora.svg +64 -0
  661. package/source/media/org.volantis/icon/725277-social-media/012-bebo.svg +59 -0
  662. package/source/media/org.volantis/icon/725277-social-media/013-filmaffinity.svg +89 -0
  663. package/source/media/org.volantis/icon/725277-social-media/014-tinder.svg +57 -0
  664. package/source/media/org.volantis/icon/725277-social-media/015-skyrock.svg +74 -0
  665. package/source/media/org.volantis/icon/725277-social-media/016-snapchat.svg +86 -0
  666. package/source/media/org.volantis/icon/725277-social-media/017-nextdoor.svg +54 -0
  667. package/source/media/org.volantis/icon/725277-social-media/018-reverbnation.svg +54 -0
  668. package/source/media/org.volantis/icon/725277-social-media/019-tripadvisor.svg +85 -0
  669. package/source/media/org.volantis/icon/725277-social-media/020-snapfish.svg +72 -0
  670. package/source/media/org.volantis/icon/725277-social-media/021-path.svg +73 -0
  671. package/source/media/org.volantis/icon/725277-social-media/022-etsy.svg +65 -0
  672. package/source/media/org.volantis/icon/725277-social-media/023-medium.svg +63 -0
  673. package/source/media/org.volantis/icon/725277-social-media/024-renren.svg +88 -0
  674. package/source/media/org.volantis/icon/725277-social-media/025-xing.svg +57 -0
  675. package/source/media/org.volantis/icon/725277-social-media/026-tout.svg +61 -0
  676. package/source/media/org.volantis/icon/725277-social-media/027-twitter.svg +75 -0
  677. package/source/media/org.volantis/icon/725277-social-media/028-howcast.svg +64 -0
  678. package/source/media/org.volantis/icon/725277-social-media/029-yelp.svg +88 -0
  679. package/source/media/org.volantis/icon/725277-social-media/030-classmates.svg +105 -0
  680. package/source/media/org.volantis/icon/725277-social-media/031-deviantart.svg +50 -0
  681. package/source/media/org.volantis/icon/725277-social-media/032-foursquare.svg +62 -0
  682. package/source/media/org.volantis/icon/725277-social-media/033-kickstarter.svg +56 -0
  683. package/source/media/org.volantis/icon/725277-social-media/034-dots.svg +76 -0
  684. package/source/media/org.volantis/icon/725277-social-media/035-tagged.svg +67 -0
  685. package/source/media/org.volantis/icon/725277-social-media/036-periscope.svg +65 -0
  686. package/source/media/org.volantis/icon/725277-social-media/037-stumbleupon.svg +66 -0
  687. package/source/media/org.volantis/icon/725277-social-media/038-youtube.svg +62 -0
  688. package/source/media/org.volantis/icon/725277-social-media/039-lastfm.svg +76 -0
  689. package/source/media/org.volantis/icon/725277-social-media/040-reddit.svg +77 -0
  690. package/source/media/org.volantis/icon/725277-social-media/041-weheartit.svg +66 -0
  691. package/source/media/org.volantis/icon/725277-social-media/042-pinterest.svg +81 -0
  692. package/source/media/org.volantis/icon/725277-social-media/043-viadeo.svg +74 -0
  693. package/source/media/org.volantis/icon/725277-social-media/044-taringa.svg +59 -0
  694. package/source/media/org.volantis/icon/725277-social-media/045-google-plus.svg +84 -0
  695. package/source/media/org.volantis/icon/725277-social-media/046-uber.svg +54 -0
  696. package/source/media/org.volantis/icon/725277-social-media/047-sina-weibo.svg +116 -0
  697. package/source/media/org.volantis/icon/725277-social-media/048-vimeo.svg +76 -0
  698. package/source/media/org.volantis/icon/725277-social-media/049-facebook.svg +55 -0
  699. package/source/media/org.volantis/icon/725277-social-media/050-vk.svg +77 -0
  700. package/source/media/org.volantis/icon/725277-social-media/051-badoo.svg +60 -0
  701. package/source/media/org.volantis/icon/725277-social-media/052-dribbble.svg +113 -0
  702. package/source/media/org.volantis/icon/725277-social-media/053-delicious.svg +45 -0
  703. package/source/media/org.volantis/icon/725277-social-media/054-soundcloud.svg +67 -0
  704. package/source/media/org.volantis/icon/725277-social-media/055-tumblr.svg +54 -0
  705. package/source/media/org.volantis/icon/725277-social-media/056-myspace.svg +69 -0
  706. package/source/media/org.volantis/icon/725277-social-media/057-spotify.svg +88 -0
  707. package/source/media/org.volantis/icon/725277-social-media/058-flickr.svg +54 -0
  708. package/source/media/org.volantis/icon/725277-social-media/059-behance.svg +83 -0
  709. package/source/media/org.volantis/icon/725277-social-media/060-instagram.svg +61 -0
  710. package/source/media/org.volantis/icon/ui-interface-21/plus.svg +61 -0
  711. package/source/media/org.volantis/logo/128/facebook.png +0 -0
  712. package/source/media/org.volantis/logo/128/github.png +0 -0
  713. package/source/media/org.volantis/logo/128/google_icon.png +0 -0
  714. package/source/media/org.volantis/logo/128/google_logo.png +0 -0
  715. package/source/media/org.volantis/logo/128/googleplus.png +0 -0
  716. package/source/media/org.volantis/logo/128/linkedin.png +0 -0
  717. package/source/media/org.volantis/logo/128/qq.png +0 -0
  718. package/source/media/org.volantis/logo/128/qrcode.png +0 -0
  719. package/source/media/org.volantis/logo/128/qzone.png +0 -0
  720. package/source/media/org.volantis/logo/128/telegram.png +0 -0
  721. package/source/media/org.volantis/logo/128/twitter.png +0 -0
  722. package/source/media/org.volantis/logo/128/wechat.png +0 -0
  723. package/source/media/org.volantis/logo/128/weibo.png +0 -0
  724. package/source/media/org.volantis/logo/128/youdao.png +0 -0
  725. package/source/media/org.volantis/logo/256/chrome.png +0 -0
  726. package/source/media/org.volantis/logo/256/facebook.png +0 -0
  727. package/source/media/org.volantis/logo/256/firefox.png +0 -0
  728. package/source/media/org.volantis/logo/256/github.png +0 -0
  729. package/source/media/org.volantis/logo/256/google_icon.png +0 -0
  730. package/source/media/org.volantis/logo/256/google_logo.png +0 -0
  731. package/source/media/org.volantis/logo/256/googleplus.png +0 -0
  732. package/source/media/org.volantis/logo/256/linkedin.png +0 -0
  733. package/source/media/org.volantis/logo/256/qq.png +0 -0
  734. package/source/media/org.volantis/logo/256/qrcode.png +0 -0
  735. package/source/media/org.volantis/logo/256/qzone.png +0 -0
  736. package/source/media/org.volantis/logo/256/safari.png +0 -0
  737. package/source/media/org.volantis/logo/256/telegram.png +0 -0
  738. package/source/media/org.volantis/logo/256/twitter.png +0 -0
  739. package/source/media/org.volantis/logo/256/wechat.png +0 -0
  740. package/source/media/org.volantis/logo/256/weibo.png +0 -0
  741. package/source/media/org.volantis/logo/256/youdao.png +0 -0
  742. package/source/media/org.volantis/logo/64/chrome.png +0 -0
  743. package/source/media/org.volantis/logo/64/facebook.png +0 -0
  744. package/source/media/org.volantis/logo/64/firefox.png +0 -0
  745. package/source/media/org.volantis/logo/64/github.png +0 -0
  746. package/source/media/org.volantis/logo/64/google_icon.png +0 -0
  747. package/source/media/org.volantis/logo/64/google_logo.png +0 -0
  748. package/source/media/org.volantis/logo/64/googleplus.png +0 -0
  749. package/source/media/org.volantis/logo/64/linkedin.png +0 -0
  750. package/source/media/org.volantis/logo/64/qq.png +0 -0
  751. package/source/media/org.volantis/logo/64/qrcode.png +0 -0
  752. package/source/media/org.volantis/logo/64/qzone.png +0 -0
  753. package/source/media/org.volantis/logo/64/safari.png +0 -0
  754. package/source/media/org.volantis/logo/64/telegram.png +0 -0
  755. package/source/media/org.volantis/logo/64/twitter.png +0 -0
  756. package/source/media/org.volantis/logo/64/wechat.png +0 -0
  757. package/source/media/org.volantis/logo/64/weibo.png +0 -0
  758. package/source/media/org.volantis/logo/64/youdao.png +0 -0
  759. package/source/media/org.volantis/placeholder/c617bfd2497fcea598e621413e315c368f8d8e.svg +23 -0
  760. package/source/media/org.volantis/placeholder/d570170f4f12e1ee829ca0e85a7dffeb77343a.svg +29 -0
  761. package/source/media/org.volantis/placeholder/f107c4d98691c0e2f4592acf09f83acb46fdf7.svg +20 -0
  762. package/source/media/placeholder/404/1c830bfcd517d.svg +70 -0
  763. package/source/media/placeholder/LICENSE +21 -0
  764. package/source/media/placeholder/README.md +8 -0
  765. package/source/media/placeholder/arrow/064b95430caf4.svg +11 -0
  766. package/source/media/placeholder/arrow/f049bbd4e88ec.svg +11 -0
  767. package/source/media/placeholder/avatar/rect/2922565.svg +1 -0
  768. package/source/media/placeholder/avatar/round/3442055.svg +1 -0
  769. package/source/media/placeholder/avatar/round/3442075.svg +1 -0
  770. package/source/media/placeholder/avatar/round/3442091.svg +1 -0
  771. package/source/media/placeholder/avatar/round/547413.svg +116 -0
  772. package/source/media/placeholder/avatar/round/547420.svg +108 -0
  773. package/source/media/placeholder/avatar/round/rainbow64@2x.webp +0 -0
  774. package/source/media/placeholder/avatar/round/rainbow64@3x.webp +0 -0
  775. package/source/media/placeholder/badge/3279dd441df8b.svg +1 -0
  776. package/source/media/placeholder/cover/76b86c0226ffd.svg +95 -0
  777. package/source/media/placeholder/frame/iphone11.svg +1 -0
  778. package/source/media/placeholder/image/2659360.svg +1 -0
  779. package/source/media/placeholder/link/8f277b4ee0ecd.svg +1 -0
  780. package/source/media/placeholder/social/08a41b181ce68.svg +27 -0
  781. package/source/media/placeholder/social/25678f144c438.svg +65 -0
  782. package/source/media/placeholder/social/3616429.svg +1 -0
  783. package/source/media/placeholder/social/3845874.svg +114 -0
  784. package/source/media/placeholder/social/80c07e4dbb303.svg +1 -0
  785. package/source/media/placeholder/social/8411ed322ced6.svg +21 -0
  786. package/source/media/placeholder/social/942ebbf1a4b91.svg +43 -0
  787. package/source/media/placeholder/social/a1b00e20f425d.svg +39 -0
  788. package/source/media/placeholder/social/b32ef3da1162a.svg +55 -0
  789. package/source/media/placeholder/social/cf1ae151f9e83.svg +110 -0
  790. package/source/media/twemoji/LICENSE +19 -0
  791. package/source/media/twemoji/README.md +256 -0
  792. package/source/media/twemoji/assets/svg/1f389.svg +1 -0
  793. package/source/media/twemoji/assets/svg/1f396.svg +1 -0
  794. package/source/media/twemoji/assets/svg/1f4cc.svg +1 -0
  795. package/source/media/twemoji/assets/svg/1f4f0.svg +1 -0
  796. package/source/media/twemoji/assets/svg/1f516.svg +1 -0
  797. package/source/media/twemoji/assets/svg/1f5c3.svg +1 -0
  798. package/source/media/twemoji/assets/svg/1f9ec.svg +1 -0
  799. package/.eslintrc.json +0 -111
  800. package/layout/_partial/rightmenu.ejs +0 -204
  801. package/layout/_partial/scripts/cover.ejs +0 -45
  802. package/layout/_partial/scripts/darkmode.ejs +0 -83
  803. package/layout/_partial/scripts/issues.ejs +0 -15
  804. package/layout/_partial/scripts/loadfunction.ejs +0 -72
  805. package/layout/_partial/scripts/search.ejs +0 -62
  806. package/layout/_partial/snackbar.ejs +0 -22
  807. package/layout/_third-party/analytics/script.ejs +0 -24
  808. package/layout/_third-party/aplayer/script.ejs +0 -24
  809. package/layout/_third-party/clipboard/script.ejs +0 -53
  810. package/layout/_third-party/comments/disqus/layout.ejs +0 -5
  811. package/layout/_third-party/comments/disqus/script.ejs +0 -90
  812. package/layout/_third-party/comments/disqusjs/layout.ejs +0 -1
  813. package/layout/_third-party/comments/disqusjs/script.ejs +0 -37
  814. package/layout/_third-party/comments/gitalk/layout.ejs +0 -1
  815. package/layout/_third-party/comments/gitalk/script.ejs +0 -22
  816. package/layout/_third-party/comments/hashover/layout.ejs +0 -2
  817. package/layout/_third-party/comments/hashover/script.ejs +0 -1
  818. package/layout/_third-party/comments/isso/layout.ejs +0 -1
  819. package/layout/_third-party/comments/isso/script.ejs +0 -1
  820. package/layout/_third-party/comments/livere/layout.ejs +0 -3
  821. package/layout/_third-party/comments/livere/script.ejs +0 -10
  822. package/layout/_third-party/comments/minivaline/layout.ejs +0 -3
  823. package/layout/_third-party/comments/minivaline/script.ejs +0 -36
  824. package/layout/_third-party/comments/twikoo/layout.ejs +0 -3
  825. package/layout/_third-party/comments/twikoo/script.ejs +0 -34
  826. package/layout/_third-party/comments/valine/layout.ejs +0 -3
  827. package/layout/_third-party/comments/vssue/layout.ejs +0 -1
  828. package/layout/_third-party/comments/vssue/script.ejs +0 -22
  829. package/layout/_third-party/comments/waline/layout.ejs +0 -3
  830. package/layout/_third-party/comments/waline/script.ejs +0 -33
  831. package/layout/_third-party/fancybox/script.ejs +0 -50
  832. package/layout/_third-party/killOldVersionsOfIE/script.ejs +0 -7
  833. package/layout/_third-party/pjax/index.ejs +0 -128
  834. package/layout/_third-party/pjax/pdata.ejs +0 -47
  835. package/layout/_third-party/scrollreveal/script.ejs +0 -20
  836. package/layout/_third-party/tidio/script.ejs +0 -3
  837. package/layout/artitalk.ejs +0 -13
  838. package/layout/bb.ejs +0 -10
  839. package/package-lock.json +0 -916
  840. package/scripts/tags/issues.js +0 -41
  841. package/source/css/_highlight/index.styl +0 -316
  842. package/source/css/_layout/friends.styl +0 -79
  843. package/source/css/_plugins/clipboard.styl +0 -37
  844. package/source/css/_plugins/darkmode.styl +0 -9
  845. package/source/css/_plugins/twikoo.styl +0 -21
  846. package/source/css/_tag-plugins/simpleuser.styl +0 -21
  847. package/source/css/_tag-plugins/site-card.styl +0 -70
  848. package/source/js/aplayer.js +0 -159
  849. package/source/js/issues.js +0 -186
  850. package/source/js/search/algolia.js +0 -344
  851. package/source/js/search/azure.js +0 -355
  852. package/source/js/search/baidu.js +0 -340
  853. package/source/js/search/google.js +0 -339
@@ -0,0 +1,874 @@
1
+ LazyLoad is a lightweight (2.4 kB) and flexible script that **speeds up your web application** by deferring the loading of your below-the-fold images, videos and iframes to **when they will enter the viewport**. It's written in plain "vanilla" JavaScript, it leverages the [IntersectionObserver](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API) API, it supports [responsive images](https://alistapart.com/article/responsive-images-in-practice), it optimizes your website for slower connections, and can enable native lazy loading. See [notable features](#-notable-features) for more.
2
+
3
+ [![vanilla-lazyload (latest)](https://img.shields.io/npm/v/vanilla-lazyload/latest.svg)](https://www.npmjs.com/package/vanilla-lazyload)
4
+ [![vanilla-lazyload (downloads)](https://img.shields.io/npm/dy/vanilla-lazyload.svg)](https://www.npmjs.com/package/vanilla-lazyload)
5
+ [![](https://data.jsdelivr.com/v1/package/npm/vanilla-lazyload/badge)](https://www.jsdelivr.com/package/npm/vanilla-lazyload)
6
+
7
+ ➡️ Jump to: [👨‍💻 Getting started - HTML](#-getting-started---html) - [👩‍💻 Getting started - Script](#-getting-started---script) - [🥧 Recipes](#-recipes) - [📺 Demos](#-demos) - [😋 Tips & tricks](#-tips--tricks) - [🔌 API](#-api) - [😯 Notable features](#-notable-features)
8
+
9
+ ---
10
+
11
+ **Love this project? 😍 [Buy me a coffee!](https://ko-fi.com/verlok)**
12
+
13
+ ---
14
+
15
+ ## 👨‍💻 Getting started - HTML
16
+
17
+ In order to make your content be loaded by LazyLoad, you must use some `data-` attributes instead of the actual attributes. Examples below.
18
+
19
+ #### Lazy image:
20
+
21
+ ```html
22
+ <img alt="A lazy image" data-src="lazy.jpg" />
23
+ ```
24
+
25
+ #### Lazy image with low quality placeholder:
26
+
27
+ ```html
28
+ <img
29
+ alt="A lazy image"
30
+ src="lazy-lowQuality.jpg"
31
+ data-src="lazy.jpg"
32
+ />
33
+ ```
34
+
35
+ #### Lazy responsive image with `srcset` and `sizes`:
36
+
37
+ ```html
38
+ <img
39
+ alt="A lazy image"
40
+ class="lazy"
41
+ data-src="lazy.jpg"
42
+ data-srcset="lazy_400.jpg 400w,
43
+ lazy_800.jpg 800w"
44
+ data-sizes="100w"
45
+ />
46
+ ```
47
+
48
+ To have a low quality placeholder, add the `src` attribute pointing to a very small version of the image. E.g. `src="lazy_10.jpg"`.
49
+
50
+ #### Lazy responsive image with hi-dpi support using the `picture` tag:
51
+
52
+ ```html
53
+ <picture>
54
+ <source
55
+ media="(min-width: 1200px)"
56
+ data-srcset="lazy_1200.jpg 1x,
57
+ lazy_2400.jpg 2x"
58
+ />
59
+ <source
60
+ media="(min-width: 800px)"
61
+ data-srcset="lazy_800.jpg 1x,
62
+ lazy_1600.jpg 2x"
63
+ />
64
+ <img
65
+ alt="A lazy image"
66
+ class="lazy"
67
+ data-src="lazy.jpg"
68
+ />
69
+ </picture>
70
+ ```
71
+
72
+ To have a low quality placeholder, add the `src` attribute pointing to a very small version of the image to the `img` tag. E.g. `src="lazy_10.jpg"`.
73
+
74
+ #### Lazy responsive image with automatic _WebP_ format selection, using the `picture` tag:
75
+
76
+ ```html
77
+ <picture>
78
+ <source
79
+ type="image/webp"
80
+ data-srcset="lazy_400.webp 400w,
81
+ lazy_800.webp 800w"
82
+ data-sizes="100w"
83
+ />
84
+ <img
85
+ alt="A lazy image"
86
+ class="lazy"
87
+ data-src="lazy.jpg"
88
+ data-srcset="lazy_400.jpg 400w,
89
+ lazy_800.jpg 800w"
90
+ data-sizes="100w"
91
+ />
92
+ </picture>
93
+ ```
94
+
95
+ To have a low quality placeholder, add the `src` attribute pointing to a very small version of the image to the `img` tag. E.g. `src="lazy_10.jpg"`.
96
+
97
+ #### Lazy background image
98
+
99
+ ⚠ **IMPORTANT NOTE**: To display content images on your pages, always use the `img` tag. This would benefit the SEO and the accessibility of your website. To understand if your images are content or background, ask yourself: "would my website user like to see those images when printing out the page?". If the answer is "yes", then your images are content images and you should avoid using background images to display them.
100
+
101
+ Single background image:
102
+
103
+ ```html
104
+ <div class="lazy" data-bg="lazy.jpg"></div>
105
+ ```
106
+
107
+ Single background, with HiDPI screen support:
108
+
109
+ ```html
110
+ <div
111
+ class="lazy"
112
+ data-bg="lazy.jpg"
113
+ data-bg-hidpi="lazy@2x.jpg"
114
+ ></div>
115
+ ```
116
+
117
+ Multiple backgrounds:
118
+
119
+ ```html
120
+ <div
121
+ class="lazy"
122
+ data-bg-multi="url(lazy-head.jpg),
123
+ url(lazy-body.jpg),
124
+ linear-gradient(#fff, #ccc)"
125
+ >
126
+ ...
127
+ </div>
128
+ ```
129
+
130
+ ℹ Please note that you must use `url()` to wrap the URLs in your `data-bg-multi` attributes.
131
+
132
+ Multiple backgrounds, HiDPI screen support:
133
+
134
+ ```html
135
+ <div
136
+ class="lazy"
137
+ data-bg-multi="url(lazy-head.jpg),
138
+ url(lazy-body.jpg),
139
+ linear-gradient(#fff, #ccc)"
140
+ data-bg-multi-hidpi="url(lazy-head@2x.jpg),
141
+ url(lazy-body@2x.jpg),
142
+ linear-gradient(#fff, #ccc)"
143
+ >
144
+ ...
145
+ </div>
146
+ ```
147
+
148
+ ℹ Please note that you must use `url()` to wrap the URLs in your `data-bg-multi-hidpi` attributes.
149
+
150
+ #### Lazy video
151
+
152
+ ```html
153
+ <video
154
+ class="lazy"
155
+ controls
156
+ width="620"
157
+ data-src="lazy.mp4"
158
+ data-poster="lazy.jpg"
159
+ >
160
+ <source type="video/mp4" data-src="lazy.mp4" />
161
+ <source type="video/ogg" data-src="lazy.ogg" />
162
+ <source type="video/avi" data-src="lazy.avi" />
163
+ </video>
164
+ ```
165
+
166
+ Please note that the video poster can be lazily loaded too.
167
+
168
+ #### Lazy iframe
169
+
170
+ ```html
171
+ <iframe class="lazy" data-src="lazyFrame.html"></iframe>
172
+ ```
173
+
174
+ ---
175
+
176
+ **Love this project? 😍 [Buy me a coffee!](https://ko-fi.com/verlok)**
177
+
178
+ ---
179
+
180
+ ## 👩‍💻 Getting started - Script
181
+
182
+ The latest, recommended version of LazyLoad is **17.1.0**.
183
+
184
+ Quickly understand how to upgrade from a previous version reading the [practical upgrade guide](UPGRADE.md).
185
+
186
+ ### To polyfill or not to polyfill IntersectionObserver?
187
+
188
+ On browser NOT supporting IntersectionObserver such as Internet explorer and older versions of Safari **you can choose whether or not to add a javascript polyfill** for it.
189
+
190
+ If you **don't use a polyfill**, LazyLoad will **load all the images** as soon as it's downloaded and executed. The number of impacted users would be [relatively small](https://caniuse.com/intersectionobserver), so this is a completely acceptable choice.
191
+
192
+ If you prefer to load a polyfill, the regular LazyLoad behaviour is granted.
193
+
194
+ ### The simple, easiest way
195
+
196
+ The easiest way to use LazyLoad is to include the script from a CDN:
197
+
198
+ ```html
199
+ <script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@17.1.0/dist/lazyload.min.js"></script>
200
+ ```
201
+
202
+ Or, with the IntersectionObserver polyfill:
203
+
204
+ ```html
205
+ <script src="https://cdn.jsdelivr.net/npm/intersection-observer@0.7.0/intersection-observer.js"></script>
206
+ <script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@17.1.0/dist/lazyload.min.js"></script>
207
+ ```
208
+
209
+ Then, in your javascript code:
210
+
211
+ ```js
212
+ var lazyLoadInstance = new LazyLoad({
213
+ // Your custom settings go here
214
+ });
215
+ ```
216
+
217
+ To be sure that DOM for your lazy content is ready when you instantiate LazyLoad, **place the script tag right before the closing `</body>` tag**. If more DOM arrives later, e.g. via an AJAX call, you'll need to call `lazyLoadInstance.update();` to make LazyLoad check the DOM again.
218
+
219
+ ```js
220
+ lazyLoadInstance.update();
221
+ ```
222
+
223
+ ### Include via RequireJS
224
+
225
+ You can use [RequireJS](https://requirejs.org) to dynamically and asynchronously load modules in your website.
226
+
227
+ You can also find the original W3C'S [IntersectionObserver Polyfill packed in AMD](https://github.com/verlok/IntersectionObserverAMD) so you can `require` it conditionally, along with LazyLoad.
228
+
229
+ Include RequireJS:
230
+
231
+ ```html
232
+ <script src="https://cdn.jsdelivr.net/npm/requirejs@2.3.6/bin/r.min.js"></script>
233
+ ```
234
+
235
+ Then `require` the AMD version of LazyLoad, like this:
236
+
237
+ ```js
238
+ var lazyLoadAmdUrl = "https://cdn.jsdelivr.net/npm/vanilla-lazyload@17.1.0/dist/lazyload.amd.min.js";
239
+ var polyfillAmdUrl = "https://cdn.jsdelivr.net/npm/intersection-observer-amd@2.0.1/intersection-observer-amd.js";
240
+
241
+ /// Dynamically define the dependencies
242
+ var dependencies = [
243
+ "IntersectionObserver" in window
244
+ ? null // <- Doesn't require the polyfill
245
+ : polyfillAmdUrl,
246
+ lazyLoadAmdUrl
247
+ ];
248
+
249
+ // Initialize LazyLoad inside the callback
250
+ require(dependencies, function(_, LazyLoad) {
251
+ var lazyLoadInstance = new LazyLoad({
252
+ // Your custom settings go here
253
+ });
254
+ }
255
+ ```
256
+
257
+ [DEMO](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/amd_polyfill.html) - [SOURCE](https://github.com/verlok/vanilla-lazyload/blob/master/demos/amd_polyfill.html)
258
+
259
+ ### Using an `async` script
260
+
261
+ If you prefer, it's possible to include LazyLoad's script using `async` script and initialize it as soon as it's loaded.
262
+
263
+ To do so, **you must define the options before including the script**. You can pass:
264
+
265
+ - `{}` an object to get a single instance of LazyLoad
266
+ - `[{}, {}]` an array of objects to get multiple instances of LazyLoad, each one with different options.
267
+
268
+ ```html
269
+ <script>
270
+ // Set the options globally
271
+ // to make LazyLoad self-initialize
272
+ window.lazyLoadOptions = {
273
+ // Your custom settings go here
274
+ };
275
+ </script>
276
+ ```
277
+
278
+ Then include the script.
279
+
280
+ ```html
281
+ <script
282
+ async
283
+ src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@17.1.0/dist/lazyload.min.js"
284
+ ></script>
285
+ ```
286
+
287
+ **Possibly place the script tag right before the closing `</body>` tag**. If you can't do that, LazyLoad could be executed before the browser has loaded all the DOM, and you'll need to call its `update()` method to make it check the DOM again.
288
+
289
+ ### Using an `async` script + getting the instance reference
290
+
291
+ Same as above, but you must put the `addEventListener` code shown below before including the `async` script.
292
+
293
+ ```html
294
+ <script>
295
+ // Set the options globally
296
+ // to make LazyLoad self-initialize
297
+ window.lazyLoadOptions = {
298
+ // Your custom settings go here
299
+ };
300
+ // Listen to the initialization event
301
+ // and get the instance of LazyLoad
302
+ window.addEventListener(
303
+ "LazyLoad::Initialized",
304
+ function (event) {
305
+ window.lazyLoadInstance = event.detail.instance;
306
+ },
307
+ false
308
+ );
309
+ </script>
310
+ ```
311
+
312
+ Then include the script.
313
+
314
+ ```html
315
+ <script
316
+ async
317
+ src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@17.1.0/dist/lazyload.min.js"
318
+ ></script>
319
+ ```
320
+
321
+ Now you'll be able to call its methods, like:
322
+
323
+ ```js
324
+ lazyLoadInstance.update();
325
+ ```
326
+
327
+ Note about Internet Explorer: because this technique uses a `CustomEvent` to trigger the `LazyLoad::Initialized` event, you might want to add [this polyfill](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill) to make it work on Internet Explorer.
328
+
329
+ [DEMO](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/async.html) - [SOURCE](https://github.com/verlok/vanilla-lazyload/blob/master/demos/async.html) &larr; for a single LazyLoad instance
330
+
331
+ [DEMO](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/async_multiple.html) - [SOURCE](https://github.com/verlok/vanilla-lazyload/blob/master/demos/async_multiple.html) &larr; for multiple LazyLoad instances
332
+
333
+ ### Local install
334
+
335
+ If you prefer to install LazyLoad locally in your project, you can!
336
+
337
+ #### Using npm
338
+
339
+ ```
340
+ npm install vanilla-lazyload
341
+ ```
342
+
343
+ #### Using bower
344
+
345
+ ```
346
+ bower install vanilla-lazyload
347
+ ```
348
+
349
+ #### Manual download
350
+
351
+ Download one the latest [releases](https://github.com/verlok/vanilla-lazyload/releases/). The files you need are inside the `dist` folder. If you don't know which one to pick, use `lazyload.min.js`, or read [about bundles](#bundles).
352
+
353
+ ### Local usage
354
+
355
+ Should you install LazyLoad locally, you can import it as ES module like the following:
356
+
357
+ ```js
358
+ import LazyLoad from "vanilla-lazyload";
359
+ ```
360
+
361
+ It's also possible (but unadvised) to use the `require` commonJS syntax.
362
+
363
+ More information about bundling LazyLoad with WebPack are available on [this specific repo](https://github.com/verlok/vanilla-lazyload-es2015-webpack-test).
364
+
365
+ ### Usage with React
366
+
367
+ Take a look at this example of [usage of React with LazyLoad](https://codesandbox.io/s/20306yk96p) on Sandbox.
368
+
369
+ This implementation takes the same props that you would normally pass to the `img` tag, but it renders a lazy image. Feel free to fork and improve it!
370
+
371
+ ### Bundles
372
+
373
+ Inside the `dist` folder you will find different bundles.
374
+
375
+ | Filename | Module Type | Advantages |
376
+ | ---------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
377
+ | `lazyload.min.js` | UMD <small>(Universal Module Definition)</small> | Works pretty much everywhere, even in common-js contexts |
378
+ | `lazyload.iife.min.js` | IIFE <small>(Immediately Invoked Function Expression)</small> | Works as in-page `<script src="...">`, ~0.5kb smaller than UMD version |
379
+ | `lazyload.amd.min.js` | AMD <small>(Asynchronous Module Definition)</small> | Works with _RequireJS_ module loader, ~0.5kb smaller than UMD version |
380
+ | `lazyload.esm.js` | ES Module | Exports `LazyLoad` so you can import it in your project both using `<script type="module" src="...">` and a bundler like WebPack or Rollup |
381
+
382
+ ---
383
+
384
+ **Love this project? 😍 [Buy me a coffee!](https://ko-fi.com/verlok)**
385
+
386
+ ---
387
+
388
+ ## 🥧 Recipes
389
+
390
+ This is the section where you can find _ready to copy & paste_ code for your convenience.
391
+
392
+ ### Dynamic content
393
+
394
+ > 💡 **Use case**: when you want to lazily load images, but the number of images change in the scrolling area changes, maybe because they are added asynchronously.
395
+
396
+ HTML
397
+
398
+ _The HTML to use depends on your case, see other recipes' HTML_
399
+
400
+ Javascript
401
+
402
+ ```js
403
+ var myLazyLoad = new LazyLoad();
404
+ // After your content has changed...
405
+ myLazyLoad.update();
406
+ ```
407
+
408
+ [DEMO](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/dynamic_content.html) - [SOURCE](https://github.com/verlok/vanilla-lazyload/blob/master/demos/dynamic_content.html) - [API](#-api)
409
+
410
+ ### Mixed native and JS-based lazy loading
411
+
412
+ > 💡 **Use case**: you want to use the `use_native` option to delegate the loading of images to the browsers engine where supported, but you also want to lazily load backgroud images or videos.
413
+
414
+ HTML
415
+
416
+ ```html
417
+ <img class="lazy" alt="A lazy image" data-src="lazy.jpg" />
418
+ <iframe class="lazy" data-src="lazyFrame.html"></iframe>
419
+ <video
420
+ class="lazy"
421
+ controls
422
+ data-src="lazy.mp4"
423
+ data-poster="lazy.jpg"
424
+ >
425
+ ...
426
+ </video>
427
+ <div class="lazy" data-bg="lazy.jpg"></div>
428
+ ```
429
+
430
+ Javascript
431
+
432
+ ```js
433
+ // Instance using native lazy loading
434
+ const lazyContent = new LazyLoad({
435
+ use_native: true // <-- there you go
436
+ });
437
+
438
+ // Instance without native lazy loading
439
+ const lazyBackground = new LazyLoad({
440
+ // DON'T PASS use_native: true HERE
441
+ });
442
+ ```
443
+
444
+ ### Scrolling panel(s)
445
+
446
+ > 💡 **Use case**: when your scrolling container is not the main browser window, but a scrolling container.
447
+
448
+ HTML
449
+
450
+ ```html
451
+ <div class="scrollingPanel" id="scrollingPanel">
452
+ <!-- Set of images -->
453
+ </div>
454
+ ```
455
+
456
+ Javascript
457
+
458
+ ```js
459
+ var myLazyLoad = new LazyLoad({
460
+ container: document.getElementById("scrollingPanel")
461
+ });
462
+ ```
463
+
464
+ [DEMO](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/container_single.html) - [SOURCE](https://github.com/verlok/vanilla-lazyload/blob/master/demos/container_single.html) - [API](#-api)
465
+
466
+ If you have _multiple_ scrolling panels, you can use the following markup and code.
467
+
468
+ HTML
469
+
470
+ ```html
471
+ <div id="scrollingPanel1" class="scrollingPanel">
472
+ <!-- Set of images -->
473
+ </div>
474
+ <div id="scrollingPanel2" class="scrollingPanel">
475
+ <!-- Set of images -->
476
+ </div>
477
+ ```
478
+
479
+ Javascript
480
+
481
+ ```js
482
+ var myLazyLoad1 = new LazyLoad({
483
+ container: document.getElementById("scrollingPanel1")
484
+ });
485
+ var myLazyLoad2 = new LazyLoad({
486
+ container: document.getElementById("scrollingPanel2")
487
+ });
488
+ ```
489
+
490
+ [DEMO](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/container_multiple.html) - [SOURCE](https://github.com/verlok/vanilla-lazyload/blob/master/demos/container_multiple.html) - [API](#-api)
491
+
492
+ ### Lazy functions
493
+
494
+ > 💡 **Use case**: when you want to execute arbitrary scripts or functions when given elements enter the viewport
495
+
496
+ HTML
497
+
498
+ ```html
499
+ <div class="lazy" data-lazy-function="foo">...</div>
500
+ <div class="lazy" data-lazy-function="bar">...</div>
501
+ <div class="lazy" data-lazy-function="buzz">...</div>
502
+ <div class="lazy" data-lazy-function="booya">...</div>
503
+ ```
504
+
505
+ JS
506
+
507
+ ```js
508
+ // It's a best practice to scope the function names inside a namespace like `lazyFunctions`.
509
+ window.lazyFunctions = {
510
+ foo: function (element) {
511
+ element.style.color = "red";
512
+ console.log("foo");
513
+ },
514
+ bar: function (element) {
515
+ element.remove(element);
516
+ console.log("bar");
517
+ },
518
+ buzz: function (element) {
519
+ var span = document.createElement("span");
520
+ span.innerText = " - buzz!";
521
+ element.appendChild(span);
522
+ console.log("buzz");
523
+ },
524
+ booya: function (element) {
525
+ element.classList.add("boo");
526
+ console.log("booya");
527
+ }
528
+ };
529
+ ```
530
+
531
+ ```js
532
+ function executeLazyFunction(element) {
533
+ var lazyFunctionName = element.getAttribute(
534
+ "data-lazy-function"
535
+ );
536
+ var lazyFunction = window.lazyFunctions[lazyFunctionName];
537
+ if (!lazyFunction) return;
538
+ lazyFunction(element);
539
+ }
540
+
541
+ var ll = new LazyLoad({
542
+ unobserve_entered: true, // <- Avoid executing the function multiple times
543
+ callback_enter: executeLazyFunction // Assigning the function defined above
544
+ });
545
+ ```
546
+
547
+ Use `unobserve_entered` to avoid executing the function multiple times.
548
+
549
+ That's it. Whenever an element with the `data-lazy-function` attribute enters the viewport, LazyLoad calls the `executeLazyScript` function, which gets the function name from the `data-lazy-function` attribute itself and executes it.
550
+
551
+ [DEMO](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/lazy_functions.html) - [SOURCE](https://github.com/verlok/vanilla-lazyload/blob/master/demos/lazy_functions.html) - [API](#-api)
552
+
553
+ ### Lazy initialization of multiple LazyLoad instances
554
+
555
+ > 💡 **Use case**: when you have a lot of horizontally scrolling containers and you want to instantiate a LazyLoad instance on them, but only when they entered the viewport.
556
+
557
+ HTML
558
+
559
+ ```html
560
+ <div class="horizContainer">
561
+ <img
562
+ src=""
563
+ alt="Row 01, col 01"
564
+ data-src="https://placeholdit.imgix.net/~text?txtsize=19&amp;txt=row_01_col_01&amp;w=200&amp;h=200"
565
+ />
566
+ <img
567
+ src=""
568
+ alt="Row 01, col 02"
569
+ data-src="https://placeholdit.imgix.net/~text?txtsize=19&amp;txt=row_01_col_02&amp;w=200&amp;h=200"
570
+ />
571
+ <!-- ... -->
572
+ </div>
573
+ <div class="horizContainer">
574
+ <img
575
+ src=""
576
+ alt="Row 02, col 01"
577
+ data-src="https://placeholdit.imgix.net/~text?txtsize=19&amp;txt=row_02_col_01&amp;w=200&amp;h=200"
578
+ />
579
+ <img
580
+ src=""
581
+ alt="Row 02, col 02"
582
+ data-src="https://placeholdit.imgix.net/~text?txtsize=19&amp;txt=row_02_col_02&amp;w=200&amp;h=200"
583
+ />
584
+ <!-- ... -->
585
+ </div>
586
+ ```
587
+
588
+ Javascript
589
+
590
+ ```js
591
+ var lazyLoadInstances = [];
592
+
593
+ var initOneLazyLoad = function (horizContainerElement) {
594
+ // When the .horizContainer element enters the viewport,
595
+ // instantiate a new LazyLoad on the horizContainerElement
596
+ var oneLL = new LazyLoad({
597
+ container: horizContainerElement
598
+ });
599
+ // Optionally push it in the lazyLoadInstances
600
+ // array to keep track of the instances
601
+ lazyLoadInstances.push(oneLL);
602
+ };
603
+
604
+ // The "lazyLazy" instance of lazyload is used to check
605
+ // when the .horizContainer divs enter the viewport
606
+ var lazyLazy = new LazyLoad({
607
+ elements_selector: ".horizContainer",
608
+ callback_enter: initOneLazyLoad,
609
+ unobserve_entered: true // Stop observing .horizContainer(s) after they entered
610
+ });
611
+ ```
612
+
613
+ That's it. Whenever a `.horizContainer` element enters the viewport, LazyLoad calls the `initOneLazyLoad` function, which creates a new instance of LazyLoad on the `.horizContainer` element.
614
+
615
+ [DEMO](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/lazily_load_lazyLoad.html) - [SOURCE](https://github.com/verlok/vanilla-lazyload/blob/master/demos/lazily_load_lazyLoad.html) - [API](#-api)
616
+
617
+ ---
618
+
619
+ **Love this project? 😍 [Buy me a coffee!](https://ko-fi.com/verlok)**
620
+
621
+ ---
622
+
623
+ ## 📺 Demos
624
+
625
+ Didn't find the [recipe](#-recipes) that exactly matches your case? We have demos!
626
+
627
+ The [demos](https://github.com/verlok/vanilla-lazyload/tree/master/demos) folder contains 30+ use cases of vanilla-lazyload. You might find there what you're looking for.
628
+
629
+ | Type | Title | Code | Demo |
630
+ | --------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------- | ---------------------------------------------------------------------------------------------- |
631
+ | Content | Simple lazy loaded images, not using any placeholder | [Code](demos/image_basic.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/image_basic.html) |
632
+ | Content | Lazy images that use an inline SVG as a placeholder | [Code](demos/image_ph_inline.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/image_ph_inline.html) |
633
+ | Content | Lazy images that use an external SVG file as a placeholder | [Code](demos/image_ph_external.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/image_ph_external.html) |
634
+ | Content | Lazy responsive images with `srcset` | [Code](demos/image_srcset.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/image_srcset.html) |
635
+ | Content | Lazy responsive images with the `<picture>` tag and the `media` attribute (art direction) | [Code](demos/picture_media.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/picture_media.html) |
636
+ | Content | Lazy responsive images with `srcset` and `sizes` (using `data-sizes`) | [Code](demos/image_srcset_lazy_sizes.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/image_srcset_lazy_sizes.html) |
637
+ | Content | Lazy responsive images with `srcset` and `sizes` (using plain `sizes`) | [Code](demos/image_srcset_sizes.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/image_srcset_sizes.html) |
638
+ | Content | Lazy video with multiple `<source>` tags | [Code](demos/video.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/video.html) |
639
+ | Content | Lazy loading background images | [Code](demos/background_images.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/background_images.html) |
640
+ | Content | Lazy loading multiple background images | [Code](demos/background_images_multi.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/background_images_multi.html) |
641
+ | Content | Lazy WebP images with the `<picture>` tag and the `type` attribute for WebP | [Code](demos/picture_type_webp.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/picture_type_webp.html) |
642
+ | Loading | Asynchronous loading LazyLoad with requireJS | [Code](demos/amd.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/amd.html) |
643
+ | Loading | Asynchronous loading LazyLoad + InterserctionObserver with requireJS | [Code](demos/amd_polyfill.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/amd_polyfill.html) |
644
+ | Loading | Asynchronous loading LazyLoad with `<script async>` | [Code](demos/async.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/async.html) |
645
+ | Loading | Asynchronous loading multiple LazyLoad instances with `<script async>` | [Code](demos/async_multiple.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/async_multiple.html) |
646
+ | Technique | Fade in images as they load | [Code](demos/fade_in.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/fade_in.html) |
647
+ | Technique | Lazily create lazyload instances | [Code](demos/lazily_load_lazyLoad.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/lazily_load_lazyLoad.html) |
648
+ | Technique | Lazily execute functions as specific elements enter the viewport | [Code](demos/lazy_functions.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/lazy_functions.html) |
649
+ | Technique | How to manage the print of a page with lazy images | [Code](demos/print.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/print.html) |
650
+ | Technique | A popup layer containing lazy images in a scrolling container | [Code](demos/popup_layer.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/popup_layer.html) |
651
+ | Settings | Multiple scrolling containers | [Code](demos/container_multiple.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/container_multiple.html) |
652
+ | Settings | Single scrolling container | [Code](demos/container_single.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/container_single.html) |
653
+ | Methods | How to `destroy()` LazyLoad | [Code](demos/destroy.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/destroy.html) |
654
+ | Methods | Adding dynamic content, then `update()` LazyLoad | [Code](demos/dynamic_content.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/dynamic_content.html) |
655
+ | Methods | Adding dynamic content, then `update()` LazyLoad passing a NodeSet of elements | [Code](demos/dynamic_content_nodeset.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/dynamic_content_nodeset.html) |
656
+ | Methods | Load punctual images using the `load()` method | [Code](demos/load.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/load.html) |
657
+ | Methods | Load all images at once using `loadAll()` | [Code](demos/load_all.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/load_all.html) |
658
+ | Test | Test for multiple thresholds | [Code](demos/thresholds.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/thresholds.html) |
659
+ | Test | Test behaviour with hidden images | [Code](demos/image_hidden.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/image_hidden.html) |
660
+ | Test | Test performance, lazy loading of hundreds of images | [Code](demos/hundreds.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/hundreds.html) |
661
+ | Native | Test the native lazy loading of images _WITHOUT_ any line of javascript, not even this script | [Code](demos/native_lazyload.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/native_lazyload.html) |
662
+ | Native | Test the native lazy loading of images _conditionally_ using the `use_native` option (see API) | [Code](demos/native_lazyload_conditional.html) | [Live](https://www.andreaverlicchi.eu/vanilla-lazyload/demos/native_lazyload_conditional.html) |
663
+
664
+ ---
665
+
666
+ **Love this project? 😍 [Buy me a coffee!](https://ko-fi.com/verlok)**
667
+
668
+ ---
669
+
670
+ ## 😋 Tips & tricks
671
+
672
+ ### Occupy space and avoid content reflow
673
+
674
+ It's a good idea to make sure that your lazy images occupy some space even **before they are loaded**, otherwise the `img` elements will be shrinked to zero-height, causing your layout to reflow and making lazyload inefficient.
675
+
676
+ There are [many ways to avoid content reflow](https://css-tricks.com/preventing-content-reflow-from-lazy-loaded-images/). I've [tested three of them](https://github.com/verlok/vanilla-lazyload_placeholders_test) and found that the fastest is to **avoid using a placeholder at all**, and use the vertical padding trick.
677
+
678
+ #### Vertical padding trick
679
+
680
+ ```html
681
+ <div class="image-wrapper">
682
+ <img
683
+ class="lazy image"
684
+ alt="An image"
685
+ data-src="lazy.jpg"
686
+ />
687
+ </div>
688
+ ```
689
+
690
+ ```css
691
+ .image-wrapper {
692
+ width: 100%;
693
+ height: 0;
694
+ padding-bottom: 150%;
695
+ /* 👆 image height / width * 100% */
696
+ position: relative;
697
+ }
698
+ .image {
699
+ width: 100%;
700
+ height: auto;
701
+ position: absolute;
702
+ }
703
+ ```
704
+
705
+ More info in [Sizing Fluid Image Containers with a Little CSS Padding Hack](http://andyshora.com/css-image-container-padding-hack.html) by Andy Shora. Find also a useful [SASS mixin to maintain aspect ratio](https://css-tricks.com/snippets/sass/maintain-aspect-ratio-mixin/) on CSS tricks.
706
+
707
+ #### Inline SVG
708
+
709
+ If you can't use the vertical padding trick for some reason, the best option is to use an SVG placeholder of the same ratio of the lazy images.
710
+
711
+ ```html
712
+ <img
713
+ src="data:image/svg+xml,%3Csvg
714
+ xmlns='http://www.w3.org/2000/svg'
715
+ viewBox='0 0 3 2'%3E%3C/svg%3E"
716
+ data-src="//picsum.photos/900/600"
717
+ alt="Lazy loading test image"
718
+ />
719
+ ```
720
+
721
+ Alternatively (but less efficiently) you can use a tiny, scaled-down version of your images as a placeholder, stretching them to the final size of the images, and obtain a blur-up effect when the full images load.
722
+
723
+ Using a placeholder image will also make sure that browsers don't show your `alt` content instead of the images before the lazy-loading starts.
724
+
725
+ ---
726
+
727
+ **Love this project? 😍 [Buy me a coffee!](https://ko-fi.com/verlok)**
728
+
729
+ ---
730
+
731
+ ## 🔌 API
732
+
733
+ ### Constructor arguments
734
+
735
+ The `new LazyLoad()` instruction you execute on your page can take two parameters:
736
+
737
+ | Parameter | What to pass | Required | Default value | Type |
738
+ | --------- | ----------------------------------------------- | -------- | ------------- | ------------ |
739
+ | Options | The option object for this instance of LazyLoad | No | `{}` | Plain Object |
740
+ | Nodeset | A NodeSet of elements to execute LazyLoad on | No | `null` | NodeSet |
741
+
742
+ The most common usage of LazyLoad constructor is to pass only the options object (see "options" in the next section). For example:
743
+
744
+ ```js
745
+ var aLazyLoad = new LazyLoad({
746
+ /* options here */
747
+ });
748
+ ```
749
+
750
+ In the unusual cases when you can't select the elements using `elements_selector`, you could pass the elements set as a second parameter. It can be either a NodeSet or an array of DOM elements.
751
+
752
+ ```js
753
+ var elementsToLazyLoad = getElementSetFromSomewhere();
754
+ var aLazyLoad = new LazyLoad(
755
+ {
756
+ /* options here */
757
+ },
758
+ elementsToLazyLoad
759
+ );
760
+ ```
761
+
762
+ ### Options
763
+
764
+ For every instance of _LazyLoad_ you can pass in some options, to alter its default behaviour.
765
+ Here's the list of the options.
766
+
767
+ | Name | Meaning | Default value | Example value |
768
+ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------ | ---------------------------------------- |
769
+ | `container` | The scrolling container of the elements in the `elements_selector` option. | `document` | `document.querySelector('.scrollPanel')` |
770
+ | `elements_selector` | The CSS selector of the elements to load lazily, which will be selected as descendants of the `container` object. | `".lazy"` | `".lazyload"` |
771
+ | `threshold` | A number of pixels representing the outer distance off the scrolling area from which to start loading the elements. | `300` | `0` |
772
+ | `thresholds` | Similar to `threshold`, but accepting multiple values and both `px` and `%` units. It maps directly to the `rootMargin` property of IntersectionObserver ([read more](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/rootMargin)), so it must be a string with a syntax similar to the CSS `margin` property. You can use it when you need to have different thresholds for the scrolling area. It overrides `threshold` when passed. | `null` | `"500px 10%"` |
773
+ | `data_src` | The name of the data attribute containing the element URL to load, excluding the `"data-"` part. E.g. if your data attribute is named `"data-src"`, just pass `"src"` | `"src"` | `"lazy-src"` |
774
+ | `data_srcset` | The name of the data attribute containing the image URL set to load, in either `img` and `source` tags, excluding the `"data-"` part. E.g. if your data attribute is named `"data-srcset"`, just pass `"srcset"` | `"srcset"` | `"lazy-srcset"` |
775
+ | `data_sizes` | The name of the data attribute containing the sizes attribute to use, excluding the `"data-"` part. E.g. if your data attribute is named `"data-sizes"`, just pass `"sizes"` | `"sizes"` | `"lazy-sizes"` |
776
+ | `data_bg` | The name of the data attribute containing the URL of `background-image` to load lazily, excluding the `"data-"` part. E.g. if your data attribute is named `"data-bg"`, just pass `"bg"`. The attribute value must be a valid value for `background-image`, including the `url()` part of the CSS instruction. | `"bg"` | `"lazy-bg"` |
777
+ | `data_bg_hidpi` | The name of the data attribute containing the URL of `background-image` to load lazily on HiDPI screens, excluding the `"data-"` part. E.g. if your data attribute is named `"data-bg-hidpi"`, just pass `"bg-hidpi"`. The attribute value must be a valid value for `background-image`, including the `url()` part of the CSS instruction. | `"bg-hidpi"` | `"lazy-bg-hidpi"` |
778
+ | `data_bg_multi` | The name of the data attribute containing the value of multiple `background-image` to load lazily, excluding the `"data-"` part. E.g. if your data attribute is named `"data-bg-multi"`, just pass `"bg-multi"`. The attribute value must be a valid value for `background-image`, including the `url()` part of the CSS instruction. | `"bg-multi"` | `"lazy-bg-multi"` |
779
+ | `data_bg_multi_hidpi` | The name of the data attribute containing the value of multiple `background-image` to load lazily on HiDPI screens, excluding the `"data-"` part. E.g. if your data attribute is named `"data-bg-multi-hidpi"`, just pass `"bg-multi-hidpi"`. The attribute value must be a valid value for `background-image`, including the `url()` part of the CSS instruction. | `"bg-multi-hidpi"` | `"lazy-bg-multi-hidpi"` |
780
+ | `data_poster` | The name of the data attribute containing the value of `poster` to load lazily, excluding the `"data-"` part. E.g. if your data attribute is named `"data-poster"`, just pass `"poster"`. | `"poster"` | `"lazy-poster"` |
781
+ | `class_applied` | The class applied to the multiple background elements after the multiple background was applied | `"applied"` | `"lazy-applied"` |
782
+ | `class_loading` | The class applied to the elements while the loading is in progress. | `"loading"` | `"lazy-loading"` |
783
+ | `class_loaded` | The class applied to the elements when the loading is complete. | `"loaded"` | `"lazy-loaded"` |
784
+ | `class_error` | The class applied to the elements when the element causes an error. | `"error"` | `"lazy-error"` |
785
+ | `cancel_on_exit` | A boolean that defines whether or not to cancel the download of the images that exit the viewport while they are still loading, eventually restoring the original attributes. It applies only to images so to the `img` (and `picture`) tags, so it doesn't apply to background images, `iframe`s nor `video`s. | `true` | `false` |
786
+ | `unobserve_entered` | A boolean that defines whether or not to automatically unobserve elements once they entered the viewport | `false` | `true` |
787
+ | `unobserve_completed` | A boolean that defines whether or not to automatically unobserve elements once they've loaded or throwed an error | `true` | `false` |
788
+ | `callback_enter` | A callback function which is called whenever an element enters the viewport. Arguments: DOM element, intersection observer entry, lazyload instance. | `null` | `(el)=>{console.log("Entered", el)}` |
789
+ | `callback_exit` | A callback function which is called whenever an element exits the viewport. Arguments: DOM element, intersection observer entry, lazyload instance. | `null` | `(el)=>{console.log("Exited", el)}` |
790
+ | `callback_loading` | A callback function which is called whenever an element starts loading. Arguments: DOM element, lazyload instance. | `null` | `(el)=>{console.log("Loading", el)}` |
791
+ | `callback_cancel` | A callback function which is called whenever an element loading is canceled while loading, as for `cancel_on_exit: true`. | `null` | `(el)=>{console.log("Cancelled", el)}` |
792
+ | `callback_loaded` | A callback function which is called whenever an element finishes loading. Note that, in version older than 11.0.0, this option went under the name `callback_load`. Arguments: DOM element, lazyload instance. | `null` | `(el)=>{console.log("Loaded", el)}` |
793
+ | `callback_error` | A callback function which is called whenever an element triggers an error. Arguments: DOM element, lazyload instance. | `null` | `(el)=>{console.log("Error", el)}` |
794
+ | `callback_applied` | A callback function which is called whenever a multiple background element starts loading. Arguments: DOM element, lazyload instance. | `null` | `(el)=>{console.log("Applied", el)}` |
795
+ | `callback_finish` | A callback function which is called when there are no more elements to load _and_ all elements have been downloaded. Arguments: lazyload instance. | `null` | `()=>{console.log("Finish")}` |
796
+ | `use_native` | This boolean sets whether or not to use [native lazy loading](https://addyosmani.com/blog/lazy-loading/) to do [hybrid lazy loading](https://www.smashingmagazine.com/2019/05/hybrid-lazy-loading-progressive-migration-native/). On browsers that support it, LazyLoad will set the `loading="lazy"` attribute on images and iframes, and delegate their loading to the browser. | `false` | `true` |
797
+
798
+ ### Methods
799
+
800
+ **Instance methods**
801
+
802
+ You can call the following methods on any instance of LazyLoad.
803
+
804
+ | Method name | Effect | Use case |
805
+ | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
806
+ | `update()` | Make LazyLoad to re-check the DOM for `elements_selector` elements inside its `container`. | Update LazyLoad after you added or removed DOM elements to the page. |
807
+ | `loadAll()` | Loads all the lazy elements right away _and_ stop observing them, no matter if they are inside or outside the viewport, no matter if they are hidden or visible. | To load all the remaining elements in advance |
808
+ | `destroy()` | Destroys the instance, unsetting instance variables and removing listeners. | Free up some memory. Especially useful for Single Page Applications. |
809
+
810
+ **Static methods**
811
+
812
+ You can call the following static methods on the LazyLoad class itself (e.g. `LazyLoad.load(element, settings)`).
813
+
814
+ | Method name | Effect | Use case |
815
+ | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
816
+ | `load(element, settings)` | Immediately loads the lazy `element`. You can pass your custom options in the `settings` parameter. Note that the `elements_selector` option has no effect, since you are passing the element as a parameter. Also note that this method has effect only once on a specific `element`. | To load an `element` at mouseover or at any other event different than "entering the viewport" |
817
+ | `resetStatus(element)` | Resets the internal status of the given `element`. | To tell LazyLoad to consider this `element` again, for example if you changed the `data-src` attribute after the previous `data-src` was loaded, call this method, then call `update()`. |
818
+
819
+ ### Properties
820
+
821
+ You can use the following properties on any instance of LazyLoad.
822
+
823
+ | Property name | Value |
824
+ | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
825
+ | `loadingCount` | The number of elements that are currently downloading from the network (limitedly to the ones managed by the instance of LazyLoad). This is particularly useful to understand whether or not is safe to destroy this instance of LazyLoad. |
826
+ | `toLoadCount` | The number of elements that haven't been lazyloaded yet (limitedly to the ones managed by the instance of LazyLoad) |
827
+
828
+ ---
829
+
830
+ **Love this project? 😍 [Buy me a coffee!](https://ko-fi.com/verlok)**
831
+
832
+ ---
833
+
834
+ ## 😯 Notable features
835
+
836
+ ### It works with your favourite library or framework
837
+
838
+ As _LazyLoad_ doesn't rely on jQuery, you can use it in web applications using **Angular**, **React** or **Vue.js** without the need to include jQuery.
839
+
840
+ ### Intersection Observer API for optimized CPU usage
841
+
842
+ Instead of listening to the `scroll` and `resize` events, LazyLoad uses the Intersection Observer API which is a new, blazing fast method to detect if an element is inside the browser viewport. Your users will see the difference in slow and even in fast devices or computers.
843
+
844
+ ### SEO friendly
845
+
846
+ _LazyLoad_ **doesn't hide your images from search engines**, even if you don't specify any initial `src` for your image.
847
+
848
+ ### Flaky connections supported
849
+
850
+ If your users lose the internet connection causing errors on images loading, this script tries and loads those images again when the connection is restored.
851
+
852
+ ### Optimize for slow connections
853
+
854
+ _LazyLoad_ optimizes for slow connections by cancelling the download of images when they exit the viewport.
855
+
856
+ ### Support for responsive images
857
+
858
+ _LazyLoad_ supports responsive images, both via the `srcset` & `sizes` attributes and via the `picture` tag.
859
+
860
+ ### Support for single and background images, and HiDPI displays
861
+
862
+ _LazyLoad_ supports single and multiple lazy background images, with standard resolution or HiDPI (retina) displays.
863
+
864
+ ### Tested on real browsers
865
+
866
+ Legacy browsers support is from IE 9 up. This script is tested in every browser before every release using [BrowserStack](http://browserstack.com/) live, thanks to the BrowserStack Open Source initiative.
867
+
868
+ <a href="http://browserstack.com/"><img alt="BrowserStack Logo" src="./img/browserstack-logo-600x315.png" width="300" height="158"/></a>
869
+
870
+ ---
871
+
872
+ **Love this project? 😍 [Buy me a coffee!](https://ko-fi.com/verlok)**
873
+
874
+ ---