lightningnetworkstores.github.io
lightningnetworkstores.github.io copied to clipboard
Should render without 3rd party assets
Coming Soon?
Without jQuery.com unblocked the page fails to display and instead renders alternate content which suggests the site has completely loaded, but lacks actual listings.
No indication is given that further assets are required or that the page has not finished loading as intended.
https://github.com/lightningnetworkstores/lightningnetworkstores.github.io/blob/eeb2e53bf00c74a99b54f1a076d87da066e99205/js/main.js#L20-L41
Actually Javascript isn't required at all here, seems to be used to avoid any "server-side" code for gh-pages.
Here's a similar loop through JSON data being templated with nunjucks. Built offline from local JSON then committed to the docs directory for gh-pages to pickup.
https://github.com/mryellow/ethercraft_farm_ui/blob/f11f2a3b2896b418d6f51cd124e9aecd76628f54/src/index.html#L345-L358
Here the JSON is fed to Nunjucks by Gulp:
https://github.com/mryellow/ethercraft_farm_ui/blob/f11f2a3b2896b418d6f51cd124e9aecd76628f54/gulp-tasks/build/html.js#L12-L17
edit: More info on the gulp tasks for that boilerplate https://github.com/mryellow/gulp-nunjucks-boilerplate (without the extra contracts.json stuff)
I moved jquery-3.3.1.min.js to a local folder. Regarding the loop through JSON, feel free to make a pull request, I don't mind if the code is not super optimized... As long as the page loads successfully and quickly on all devices and browsers I am ok with it.