mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Load lazy sizes from row to reduce usingComponent
This commit is contained in:
parent
2c3e0ab688
commit
d68e5a1f56
2 changed files with 5 additions and 2 deletions
|
|
@ -16,7 +16,7 @@ export default async function ( video, options = {} ) {
|
||||||
} = options
|
} = options
|
||||||
|
|
||||||
// Setup inline lazysizes
|
// Setup inline lazysizes
|
||||||
await this.usingComponent( 'node_modules/lazysizes/lazysizes.min.js' )
|
// await this.usingComponent( 'node_modules/lazysizes/lazysizes.min.js' )
|
||||||
|
|
||||||
// console.log('video', video)
|
// console.log('video', video)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,12 @@ export default async function ( videos, options = {} ) {
|
||||||
const uid = Math.random().toString(36).substr(2, 9)
|
const uid = Math.random().toString(36).substr(2, 9)
|
||||||
const rowId = `row-${ uid }`
|
const rowId = `row-${ uid }`
|
||||||
|
|
||||||
// Setup inline lazysizes
|
// Setup inline scroll script
|
||||||
await this.usingComponent( 'helpers/scroll.js' )
|
await this.usingComponent( 'helpers/scroll.js' )
|
||||||
|
|
||||||
|
// Setup inline lazysizes
|
||||||
|
await this.usingComponent( 'node_modules/lazysizes/lazysizes.min.js' )
|
||||||
|
|
||||||
// console.log('video', video)
|
// console.log('video', video)
|
||||||
|
|
||||||
const renderedCards = await Promise.all(videos.map( async video => {
|
const renderedCards = await Promise.all(videos.map( async video => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue