Open FireMasterK opened 4 years ago
I am really thinking to be using Javascript for other things, as it would make things much easier and smooth. Always without breaking the site if disabled.
That's definitely a possibility, I can start working on that
You can go ahead. I would also like to change the UI to look more 'youtube-like'. Other JS things that would be nice is using AJAX in order to be able to follow a user without reloading the whole page.
I've got a general idea of how this can be done,
We create a function like https://stackoverflow.com/a/814649
function create(htmlStr) {
var frag = document.createDocumentFragment(),
temp = document.createElement('div');
temp.innerHTML = htmlStr;
while (temp.firstChild) {
frag.appendChild(temp.firstChild);
}
return frag;
}
var fragment = create(...) // html content from a fetch request, the server generates the next set of cards for the videos, we can do this pagewise
document.querySelector(".cards").appendChild(fragment);
This definitely requires JavaScript, but is definitely a nice to have.