Remove deprecated `showOnPage`
Usage has been removed from all other pages on the website.
This commit is contained in:
parent
9a3227b43f
commit
cbcb30aba0
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@fwdekker/template",
|
"name": "@fwdekker/template",
|
||||||
"version": "2.2.5",
|
"version": "2.3.0",
|
||||||
"description": "The base template for pages on fwdekker.com.",
|
"description": "The base template for pages on fwdekker.com.",
|
||||||
"author": "Felix W. Dekker",
|
"author": "Felix W. Dekker",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
@ -190,18 +190,5 @@ const footerLink = function(prefix, text, url, suffix) {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unhides the main element on the page and applies default display styling.
|
|
||||||
*
|
|
||||||
* @deprecated Will be removed in the near future. Just use `$("main").classList.remove("hidden")` yourself.
|
|
||||||
*/
|
|
||||||
const showPage = function() {
|
|
||||||
const main = $("main");
|
|
||||||
// TODO: Remove .style command once all pages are migrated
|
|
||||||
main.style.display = null;
|
|
||||||
main.classList.remove("hidden");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Export to namespace
|
// Export to namespace
|
||||||
fwdekker = {stringToHtml, $, doAfterLoad, nav, header, footer, showPage};
|
fwdekker = {stringToHtml, $, doAfterLoad, nav, header, footer};
|
||||||
|
|
|
@ -39,16 +39,16 @@
|
||||||
<!--suppress HtmlUnknownTarget -->
|
<!--suppress HtmlUnknownTarget -->
|
||||||
<script src="../../dist/template.js"></script>
|
<script src="../../dist/template.js"></script>
|
||||||
<script>
|
<script>
|
||||||
const {$, doAfterLoad, footer, header, nav, showPage} = window.fwdekker;
|
const {$, doAfterLoad, footer, header, nav} = window.fwdekker;
|
||||||
|
|
||||||
doAfterLoad(() => {
|
doAfterLoad(() => {
|
||||||
$("#nav").appendChild(nav("/Tools/Dice/"));
|
$("#nav").appendChild(nav("/Tools/Dice/"));
|
||||||
$("#header").appendChild(header({title: "Test", description: "A test page"}));
|
$("#header").appendChild(header({title: "Test", description: "A test page"}));
|
||||||
$("#footer").appendChild(footer({
|
$("#footer").appendChild(footer({
|
||||||
vcsURL: "https://git.fwdekker.com/FWDekker/tools/",
|
vcsURL: "https://git.fwdekker.com/FWDekker/fwdekker-template/",
|
||||||
version: "vTEST"
|
version: "vTEST"
|
||||||
}));
|
}));
|
||||||
showPage();
|
$("main").classList.remove("hidden");
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in New Issue