File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,8 +30,9 @@ module.exports = ctx => function(args) {
3030 for ( let item of ( links [ args . group ] || [ ] ) ) {
3131 if ( item ?. url ) {
3232 el += `<div class="grid-cell album-card">`
33- el += `<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="${ item . url } ">`
34- el += `<img src="${ item . cover || item . icon || item . avatar || ctx . theme . config . default . cover } " onerror="javascript:this.removeAttribute("data-src");this.src="${ ctx . theme . config . default . cover } ";"/>`
33+ el += `<a class="card-link lazy-box" target="_blank" rel="external nofollow noopener noreferrer" href="${ item . url } ">`
34+ el += `<img class="lazy" data-src="${ item . cover || item . icon || item . avatar || ctx . theme . config . default . cover } " onerror="javascript:this.removeAttribute("data-src");this.src="${ ctx . theme . config . default . cover } ";"/>`
35+ el += `<div class="lazy-icon" style="background-image:url(${ ctx . theme . config . default . loading } );"></div>`
3536 el += `<div class="image-meta">`
3637 if ( item . title ) {
3738 el += `<span class="image-caption">${ item . title } </span>`
Original file line number Diff line number Diff line change 1717
1818var index = 0
1919
20- function img ( src , alt ) {
20+ function img ( src , alt , loading ) {
2121 let img = ''
22- img += `<img data-fancybox="gallery-${ index } " src="${ src } "`
22+ img += `<img class="lazy" data-fancybox="gallery-${ index } " data- src="${ src } "`
2323 if ( alt ?. length > 0 ) {
2424 img += ` alt="${ alt } "`
2525 }
2626 img += `/>`
27+ img += `<div class="lazy-icon" style="background-image:url(${ loading } );"></div>`
2728 // cap
2829 img += `<div class="image-meta">`
2930 if ( alt ?. length > 0 ) {
@@ -54,7 +55,7 @@ module.exports = ctx => function(args, content) {
5455 if ( matches ?. length > 2 ) {
5556 let alt = matches [ 1 ]
5657 let src = matches [ 2 ]
57- el += `<div class="${ layoutType } -cell">${ img ( src , alt ) } </div>`
58+ el += `<div class="${ layoutType } -cell lazy-box ">${ img ( src , alt , ctx . theme . config . default . loading ) } </div>`
5859 }
5960 }
6061 el += `</div>`
Original file line number Diff line number Diff line change @@ -30,8 +30,9 @@ module.exports = ctx => function(args) {
3030 for ( let item of ( links [ args . group ] || [ ] ) ) {
3131 if ( item ?. url ) {
3232 el += `<div class="grid-cell poster-card">`
33- el += `<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="${ item . url } ">`
34- el += `<img src="${ item . cover || item . icon || item . avatar || ctx . theme . config . default . cover } " onerror="javascript:this.removeAttribute("data-src");this.src="${ ctx . theme . config . default . cover } ";"/>`
33+ el += `<a class="card-link lazy-box" target="_blank" rel="external nofollow noopener noreferrer" href="${ item . url } ">`
34+ el += `<img class="lazy" data-src="${ item . cover || item . icon || item . avatar || ctx . theme . config . default . cover } " onerror="javascript:this.removeAttribute("data-src");this.src="${ ctx . theme . config . default . cover } ";"/>`
35+ el += `<div class="lazy-icon" style="background-image:url(${ ctx . theme . config . default . loading } );"></div>`
3536 el += `<div class="image-meta">`
3637 if ( item . title ) {
3738 el += `<span class="image-caption">${ item . title } </span>`
Original file line number Diff line number Diff line change 109109 height : 100%
110110 border-radius : 8px
111111 & : has( img .loading ) ,& : has( img .error )
112+ background-color : var (-- block )
112113 img
113114 background-color : var (-- block )
114115 .image-meta
Original file line number Diff line number Diff line change 77 .atk-header ,.atk-editor-user-wrap
88 border-bottom : 1px dashed var (-- block - border )
99 padding : 0.5rem 1rem
10+ margin : 0
1011 .atk-editor-user-wrap :empty
1112 visibility : hidden
1213 padding : 0
1314 > .atk-bottom
1415 padding : 8px
16+ .atk-state-btn
17+ height : 2rem
18+ border-radius : 100px
19+ .atk-cancel
20+ background : none
1521 .atk-plug-btn
1622 border-radius : 32px
1723 height : 2rem
7783 --at-color-border : var (-- block - border )
7884 --at-color-light : var (-- link )
7985 --at-color-bg : var (-- card )
80- --at-color-bg-transl : var (-- block - border )
86+ --at-color-bg-transl : var (-- card )
8187 --at-color-bg-grey : var (-- block )
82- --at-color-bg-grey-transl : orange
83- --at-color-bg-light : rgba ( 29 , 161 , 242 , 1 )
88+ --at-color-bg-grey-transl : var ( -- block - border )
89+ --at-color-bg-light : var ( -- theme )
8490 --at-color-main : var (-- theme )
8591 --at-color-red : $c-red
8692 --at-color-green : $c-green
You can’t perform that action at this time.
0 commit comments