File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 35
35
36
36
<script >
37
37
import _ from ' lodash'
38
+ import Blazy from ' blazy'
38
39
import { event } from ' ./utils'
39
40
import group from ' ./components/Group.vue'
40
41
import explore from ' ./components/Explore.vue'
@@ -72,6 +73,13 @@ export default {
72
73
}
73
74
},
74
75
76
+ mounted () {
77
+ // Register lazyloading for the GitHub badges
78
+ const blazy = new Blazy ({
79
+ container: ' .right'
80
+ })
81
+ },
82
+
75
83
methods: {
76
84
/**
77
85
* Limit filtering using lodash's debounce.
Original file line number Diff line number Diff line change 8
8
<template v-else >{{ item.author.name }}</template >
9
9
</span >
10
10
<a v-if =" githubBadgeUrl" :href =" item.url" class =" github-badge" >
11
- <img :src =" githubBadgeUrl" >
11
+ <img class =" b-lazy"
12
+ src =" data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
13
+ :data-src =" githubBadgeUrl" >
12
14
</a >
13
15
</h1 >
14
16
<div class =" thin" v-if =" item.description" v-html =" item.description" ></div >
Original file line number Diff line number Diff line change 16
16
"babel-core" : " ^6.0.0" ,
17
17
"babel-loader" : " ^6.0.0" ,
18
18
"babel-preset-es2015" : " ^6.0.0" ,
19
+ "blazy" : " ^1.6.2" ,
19
20
"chalk" : " ^1.1.3" ,
20
21
"copy-webpack-plugin" : " ^3.0.1" ,
21
22
"cross-env" : " ^1.0.6" ,
You can’t perform that action at this time.
0 commit comments