diff --git a/public/css/common.css b/public/css/common.css new file mode 100644 index 0000000..a1518fb --- /dev/null +++ b/public/css/common.css @@ -0,0 +1,4 @@ +/* hide scrollbar on full sized pages */ +html { + overflow: auto; +} diff --git a/public/js/common.js b/public/js/common.js new file mode 100644 index 0000000..a33111f --- /dev/null +++ b/public/js/common.js @@ -0,0 +1,16 @@ +// activate navbar burger buttons when page finishes loading +document.addEventListener("DOMContentLoaded", function () { + var $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll(".navbar-burger"), 0); + + if ($navbarBurgers.length > 0) { + $navbarBurgers.forEach(function ($el) { + $el.addEventListener("click", function () { + var target = $el.dataset.target; + var $target = document.getElementById(target); + + $el.classList.toggle("is-active"); + $target.classList.toggle("is-active"); + }); + }); + } +}); diff --git a/views/index.hbs b/views/index.hbs index 55f01a4..b3a6f6e 100644 --- a/views/index.hbs +++ b/views/index.hbs @@ -1,17 +1,19 @@ {{#> layouts/base title="Home" }} {{#*inline "body"}} -
Welcome to Shine, Glowstone's in-house download center and plugin repository.
-- {{#if user}} - You are currently logged in as {{user.username}}. - {{else}} - You are not currently logged in. Sign in or create an account to - submit plugins. - {{/if}} -
+Welcome to Shine, Glowstone's in-house download center and plugin repository.
++ {{#if user}} + You are currently logged in as {{user.username}}. + {{else}} + You are not currently logged in. Sign in or create an account to + submit plugins. + {{/if}} +
+