Anyway, yeah, people should vote if they can.
Anyway, yeah, people should vote if they can.
<!-- head, header, nav, etc. -->
<main id="main"></main><script>main.innerHTML = await (await fetch(`${location.hash.substr(1)}.html`)).text()</script>
<!-- footer -->
index.html#/example loads content from /example.html
SEO? What's that? ^^;
<!-- head, header, nav, etc. -->
<main id="main"></main><script>main.innerHTML = await (await fetch(`${location.hash.substr(1)}.html`)).text()</script>
<!-- footer -->
index.html#/example loads content from /example.html
SEO? What's that? ^^;
HTML imports are dead. <object> and <iframe> require fixed height. SSI/PHP/CGI is more complex. Static gen would need an extra tool... Isn't "copy this JS" the simplest option?
HTML imports are dead. <object> and <iframe> require fixed height. SSI/PHP/CGI is more complex. Static gen would need an extra tool... Isn't "copy this JS" the simplest option?
<footer id="footer"></footer>
<script>
fetch('/footer.html').then( r => {
document.getElementById("footer").innerHTML = r.text();
});
</script>
Then write whatever you want in your footer in /footer.html =)
<footer id="footer"></footer>
<script>
fetch('/footer.html').then( r => {
document.getElementById("footer").innerHTML = r.text();
});
</script>
Then write whatever you want in your footer in /footer.html =)