Remove deprecated `showOnPage`

Usage has been removed from all other pages on the website.
This commit is contained in:
Florine W. Dekker 2021-04-28 13:55:06 +02:00
parent 9a3227b43f
commit cbcb30aba0
Signed by: FWDekker
GPG Key ID: B1B567AF58D6EE0F
3 changed files with 5 additions and 18 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@fwdekker/template",
"version": "2.2.5",
"version": "2.3.0",
"description": "The base template for pages on fwdekker.com.",
"author": "Felix W. Dekker",
"license": "MIT",

View File

@ -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
fwdekker = {stringToHtml, $, doAfterLoad, nav, header, footer, showPage};
fwdekker = {stringToHtml, $, doAfterLoad, nav, header, footer};

View File

@ -39,16 +39,16 @@
<!--suppress HtmlUnknownTarget -->
<script src="../../dist/template.js"></script>
<script>
const {$, doAfterLoad, footer, header, nav, showPage} = window.fwdekker;
const {$, doAfterLoad, footer, header, nav} = window.fwdekker;
doAfterLoad(() => {
$("#nav").appendChild(nav("/Tools/Dice/"));
$("#header").appendChild(header({title: "Test", description: "A test page"}));
$("#footer").appendChild(footer({
vcsURL: "https://git.fwdekker.com/FWDekker/tools/",
vcsURL: "https://git.fwdekker.com/FWDekker/fwdekker-template/",
version: "vTEST"
}));
showPage();
$("main").classList.remove("hidden");
});
</script>
</body>