Remove deprecated `showOnPage`

Usage has been removed from all other pages on the website.
v3
Florine W. Dekker 2 years ago
parent 9a3227b43f
commit cbcb30aba0
Signed by: FWDekker
GPG Key ID: B1B567AF58D6EE0F
  1. 2
      package.json
  2. 15
      src/main/js/main.js
  3. 6
      src/test/index.html

@ -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",

@ -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};

@ -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>

Loading…
Cancel
Save