From e4a56d5ed14a7ce7c960a1dd949e6cf04b81ec36 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Wed, 20 Sep 2017 16:04:58 -0700 Subject: [PATCH] made channel components DRYer --- public/assets/css/generalStyle.css | 2 +- routes/page-routes.js | 2 +- views/login.handlebars | 76 +------------ views/partials/channelCreation.handlebars | 51 +++++++++ views/partials/channelLogin.handlebars | 35 ++++++ views/partials/channelSelection.handlebars | 43 ++++++++ views/partials/publishChannel.handlebars | 121 --------------------- views/partials/publishForm.handlebars | 2 +- 8 files changed, 134 insertions(+), 198 deletions(-) create mode 100644 views/partials/channelCreation.handlebars create mode 100644 views/partials/channelLogin.handlebars create mode 100644 views/partials/channelSelection.handlebars delete mode 100644 views/partials/publishChannel.handlebars diff --git a/public/assets/css/generalStyle.css b/public/assets/css/generalStyle.css index 8d2babcc..5a777639 100644 --- a/public/assets/css/generalStyle.css +++ b/public/assets/css/generalStyle.css @@ -121,7 +121,7 @@ button { background-color: white; } -button:hover, button:focus { +button:hover { border: 1px solid blue; color: white; background-color: blue; diff --git a/routes/page-routes.js b/routes/page-routes.js index fee208a8..855198bf 100644 --- a/routes/page-routes.js +++ b/routes/page-routes.js @@ -5,7 +5,7 @@ module.exports = (app) => { // route to log out app.get('/logout', (req, res) => { req.logout(); - res.redirect('/login'); + res.redirect('/'); }); // route to display login page app.get('/login', (req, res) => { diff --git a/views/login.handlebars b/views/login.handlebars index 7823a498..ff0f9ecd 100644 --- a/views/login.handlebars +++ b/views/login.handlebars @@ -4,35 +4,10 @@

Log In

Log in to an existing channel:

-
-
-
- - @ -
-
- - -
-
- - + {{>channelLogin}}

Create New

Create a brand new channel:

-
-
-
- - @ - -
-
-
- - -
-
- + {{>channelCreation}} {{> footer}} @@ -40,50 +15,3 @@ - diff --git a/views/partials/channelCreation.handlebars b/views/partials/channelCreation.handlebars new file mode 100644 index 00000000..e0f3c692 --- /dev/null +++ b/views/partials/channelCreation.handlebars @@ -0,0 +1,51 @@ +
+

+

+
+
+ + @ + +
+
+
+ + +
+
+

+ +
+ + \ No newline at end of file diff --git a/views/partials/channelLogin.handlebars b/views/partials/channelLogin.handlebars new file mode 100644 index 00000000..fe715c5c --- /dev/null +++ b/views/partials/channelLogin.handlebars @@ -0,0 +1,35 @@ +

+

+
+
+ + @ +
+
+ + +
+ +
+

+ + + \ No newline at end of file diff --git a/views/partials/channelSelection.handlebars b/views/partials/channelSelection.handlebars new file mode 100644 index 00000000..1056d17a --- /dev/null +++ b/views/partials/channelSelection.handlebars @@ -0,0 +1,43 @@ +
+

+

+ + +

+ + + + +
+ + + \ No newline at end of file diff --git a/views/partials/publishChannel.handlebars b/views/partials/publishChannel.handlebars deleted file mode 100644 index 32bf8c32..00000000 --- a/views/partials/publishChannel.handlebars +++ /dev/null @@ -1,121 +0,0 @@ -
-

-

- - -

- - - - -
- - - \ No newline at end of file diff --git a/views/partials/publishForm.handlebars b/views/partials/publishForm.handlebars index 79eab66a..91da57ad 100644 --- a/views/partials/publishForm.handlebars +++ b/views/partials/publishForm.handlebars @@ -20,7 +20,7 @@

- {{> publishChannel}} + {{> channelSelection}}
{{> publishDetails}}