external file with the <head>
<base href="https://gfy.com/" /><!--[if IE]></base><![endif]--> section? WHY?
instead of PHP use .phtml & javascript
unorderly list saved as phtml!
Quote:
<ul>
<li>poo</li>
<li>shit</li>
<li>scat</li>
<li>excrement</li>
<li>diarrea</li>
<li>scheiße</li>
</ul>
|
Quote:
<script>
//define location & files
const partials = {
shitlist: "./where/is/the/shitlist.phtml",
poolist:"./where/is/the/poolist.phtml",
}
//fetch the content of the files into constants
const fetchContent =async (section) => {
const contentPartial = await fetch(partials[section]);
const content = await contentPartial.text();
return content;
}
//loads section with fetched content
async funtion loadSection(section) {
const dom = document.getElementById(section);
const content = await fetchContent(section);
dom.innerHTML = content;
}
//loads sections from contants
async function main() {
await loadSection('shitlist');
await loadSection('poolist');
}
//final execution
(async function () {
await main();
})();
</script>
|
Melkanea showed off!