collective / collective.lazysizes

Integration of lazysizes, a lightweight lazy loader, into Plone.
https://pypi.org/project/collective.lazysizes
6 stars 2 forks source link

Lazy load tweets #15

Closed rodfersou closed 8 years ago

rodfersou commented 8 years ago

We need to lazy load tweets embedded. In our use case there are hundreds of tweets into the same page, that is loaded at once.

We would like to have the lazy load functionality working with these tweets, and load the tweets when needed.

So to make it happen we need to: 1) Transform the html to insert widgets.js just one time. 2) Change all tweet class to another class (or keep into data-class attribute) 3) When load one tweet, a new lazyload plugin should fix the tweet class just for the displayed tweet and fire the twttr.widgets.load() method to load the tweet.