diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-05-21 15:59:03 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-05-21 15:59:03 -0400 |
commit | 9a5034a115d5e05eedd2ce8f3727660c08a943b6 (patch) | |
tree | 7a19930810ff7f097a64177c06517b0ccec2728b | |
parent | c32c0dd749cf8c34f20bb4e574165753fcd8660b (diff) | |
download | guff-9a5034a115d5e05eedd2ce8f3727660c08a943b6.tar.bz2 guff-9a5034a115d5e05eedd2ce8f3727660c08a943b6.zip |
add navbars to admin, login, and logout
-rw-r--r-- | src/guff.cr | 2 | ||||
-rw-r--r-- | src/views/admin-page.ecr | 41 | ||||
-rw-r--r-- | src/views/login-page.ecr | 19 | ||||
-rw-r--r-- | src/views/logout-page.ecr | 19 |
4 files changed, 71 insertions, 10 deletions
diff --git a/src/guff.cr b/src/guff.cr index 783c98a..733a76f 100644 --- a/src/guff.cr +++ b/src/guff.cr @@ -429,6 +429,7 @@ module Guff end class AdminPageView < View + TITLE = "Guff Admin" ECR.def_to_s("src/views/admin-page.ecr") end @@ -494,7 +495,6 @@ module Guff end end - # TODO: check referrer, add x-frame-options class AssetsHandler < Handler def initialize(context : Context) super(context) diff --git a/src/views/admin-page.ecr b/src/views/admin-page.ecr index 1698cb5..287e35f 100644 --- a/src/views/admin-page.ecr +++ b/src/views/admin-page.ecr @@ -2,7 +2,7 @@ <html lang='en-US'> <head> <meta charset="utf-8"/> - <title>Guff Admin</title> + <title><%= h(TITLE) %></title> <%= styles %w{ @@ -14,13 +14,40 @@ </head> <body> - <a - href='logout.html' - title='Go to logout page.' + <div + class='navbar navbar-inverse navbar-static-top' + role='navigation' > - <i class='fa fa-logout'></i> - Logout - </a> + <div class='container-fluid'> + <div class='navbar-header'> + <a + href='admin.html' + class='navbar-brand' + > + <i class='fa fa-bomb'></i> + <%= h(TITLE) %> + </a><!-- navbar-brand --> + </div><!-- navbar-default --> + + <ul class='nav navbar-nav navbar-right'> + <li> + <a + href='logout.html' + title='Log out.' + > + <i class='fa fa-power-off'></i> + Log Out + </a> + </li> + </ul><!-- nav --> + </div><!-- container-fluid --> + </div><!-- navbar --> + + <div class='container'> + <p> + TODO + </p> + </div><!-- container --> </body> <%= diff --git a/src/views/login-page.ecr b/src/views/login-page.ecr index 79a92bb..16f63a4 100644 --- a/src/views/login-page.ecr +++ b/src/views/login-page.ecr @@ -14,13 +14,30 @@ </head> <body> + <div + class='navbar navbar-inverse navbar-static-top' + role='navigation' + > + <div class='container-fluid'> + <div class='navbar-header'> + <a + href='../' + class='navbar-brand' + > + <i class='fa fa-bomb'></i> + Guff + </a><!-- navbar-brand --> + </div><!-- navbar-default --> + </div><!-- container-fluid --> + </div><!-- navbar --> + <div class='container'> <div class='col-md-6 col-md-offset-3'> <div class='panel panel-default'> <div class='panel-heading'> <b> <i class='fa fa-lock'></i> - Guff Login + Login </b> </div><!-- panel-heading --> diff --git a/src/views/logout-page.ecr b/src/views/logout-page.ecr index 61fa505..0c6d70e 100644 --- a/src/views/logout-page.ecr +++ b/src/views/logout-page.ecr @@ -14,13 +14,30 @@ </head> <body> + <div + class='navbar navbar-inverse navbar-static-top' + role='navigation' + > + <div class='container-fluid'> + <div class='navbar-header'> + <a + href='../' + class='navbar-brand' + > + <i class='fa fa-bomb'></i> + Guff + </a><!-- navbar-brand --> + </div><!-- navbar-default --> + </div><!-- container-fluid --> + </div><!-- navbar --> + <div class='container'> <div class='col-md-6 col-md-offset-3'> <div class='panel panel-default'> <div class='panel-heading'> <b> <i class='fa fa-exit'></i> - Guff Logout + Logout </b> </div><!-- panel-heading --> |