From db0a816882d91ee20c851468abb08135866877f5 Mon Sep 17 00:00:00 2001 From: PickNChew Date: Fri, 20 Oct 2017 11:07:00 -0400 Subject: [PATCH 1/2] Switch to Bulma Signed-off-by: PickNChew --- public/css/common.css | 4 ++ public/js/common.js | 16 +++++ views/index.hbs | 24 ++++---- views/login.hbs | 62 +++++++++---------- views/partials/layouts/base.hbs | 10 ++- views/partials/menu.hbs | 104 +++++++++++++++++--------------- views/register.hbs | 89 ++++++++++++--------------- 7 files changed, 164 insertions(+), 145 deletions(-) create mode 100644 public/css/common.css create mode 100644 public/js/common.js diff --git a/public/css/common.css b/public/css/common.css new file mode 100644 index 0000000..f77ef7c --- /dev/null +++ b/public/css/common.css @@ -0,0 +1,4 @@ +/* hide scrollbar on full sized pages */ +html { + overflow: auto; +} \ No newline at end of file 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"}} -
-

Shine Index

-

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

+
+
+

Shine Index

+

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}} +

+
{{/inline}} diff --git a/views/login.hbs b/views/login.hbs index 495fa78..807752d 100644 --- a/views/login.hbs +++ b/views/login.hbs @@ -1,44 +1,40 @@ {{#> layouts/base title="Login" }} {{#*inline "body"}} -
-
-
Login
- -
- {{#alerts.error}} - - {{/alerts.error}} - -
-
-
- - - - - +
+
+
+

Login

+ +
+ +
+
+ +
-
-
-
- - - - - +
+
+ +
-
-
- -
+
+
+ +
+
- - +
+
+ +
+
+ +
diff --git a/views/partials/layouts/base.hbs b/views/partials/layouts/base.hbs index 0ff9eef..2cc5ae0 100644 --- a/views/partials/layouts/base.hbs +++ b/views/partials/layouts/base.hbs @@ -2,9 +2,13 @@ + + Shine | {{title}} - + + + {{#> head }} {{!-- custom head content from other pages --}} {{/head}} @@ -17,8 +21,8 @@ {{!-- body content --}} {{/body}} - - + + {{#> scripts }} {{!-- custom scripts from other pages --}} {{/scripts}} diff --git a/views/partials/menu.hbs b/views/partials/menu.hbs index 6b72185..0ca3f12 100644 --- a/views/partials/menu.hbs +++ b/views/partials/menu.hbs @@ -1,53 +1,61 @@ - diff --git a/views/register.hbs b/views/register.hbs index e540697..121b8a0 100644 --- a/views/register.hbs +++ b/views/register.hbs @@ -1,69 +1,58 @@ {{#> layouts/base title="Home" }} {{#*inline "body"}} -
-
-
Register
- -
-
-
-
- - - - - +
+
+
+

Register

+ +
+ +
+
+ +
-
-
-
-
- - - - - +
+
+
-
- +
+
+
+
+ +
+
+ +
+
+ +
+
+
-
- -
-
-
- - - - +
+
+
-
- +
+
+ +
-
- -
- -
- - - + +
{{/inline}} - - {{#*inline "scripts"}} - - {{/inline}} - {{/layouts/base}} From 371c14b3e49d2e4e7a140f368ae2e908d8e1f6fc Mon Sep 17 00:00:00 2001 From: PickNChew Date: Fri, 20 Oct 2017 11:38:53 -0400 Subject: [PATCH 2/2] Line ending Signed-off-by: PickNChew --- public/css/common.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/css/common.css b/public/css/common.css index f77ef7c..a1518fb 100644 --- a/public/css/common.css +++ b/public/css/common.css @@ -1,4 +1,4 @@ /* hide scrollbar on full sized pages */ html { overflow: auto; -} \ No newline at end of file +}