Open sc0ttj opened 5 years ago
About lazy loading, see this: https://addyosmani.com/blog/lazy-loading/
TLDR: Chrome will support it natively, so any lazy loading implementation could use that ....
Or just use lazySizes
, from https://github.com/aFarkas/lazysizes
<picture>
and srcset
better touchscreen detection:
touch: function () {
if (
('ontouchstart' in window) ||
(window.DocumentTouch && document instanceof DocumentTouch) ||
(window.hasOwnProperty &&
(
window.hasOwnProperty('ontouchstart') ||
(window.DocumentTouch && document instanceof DocumentTouch) ||
navigator.msMaxTouchPoints
)
)
) {
return true;
}
// Fallback for certain samsung devices that fail above but pass below... :/
if ('ontouchstart' in window) {
return true;
}
return false;
},
For handling data on the page, passing it around between different javascripts, while not polluting global vars ... (all data must be accessed using window.DataManager.getData('name-of-dataset')
)
<script>
window.DataManager && !window.DataManager.setData && (
window.DataManager._internal={
data:{}
},
window.DataManager.setData=function(a,t){
return window.DataManager._internal.data[a]=t,t
},
window.DataManager.getData=function(a){
return window.DataManager._internal.data[a]
}
)
</script>
Also needs a simple shopping cart built-in .. See https://github.com/sc0ttj/mdsh/issues/88
Something like:
<body>
, see issue 54).load()
alternative for loading pages or page fragments404.html
to have custom URLs)dataPres.setData()
anddataPres.getData()
).sortable-items
class, make their contents filterable/sortable.. add a little form above the table/contentAdvanced:
PWA-esque thing: