diff options
Diffstat (limited to 'src/views')
-rw-r--r-- | src/views/admin-navbar.ecr | 29 | ||||
-rw-r--r-- | src/views/navbar.ecr | 31 | ||||
-rw-r--r-- | src/views/pages/login.ecr | 17 | ||||
-rw-r--r-- | src/views/pages/logout.ecr | 34 |
4 files changed, 36 insertions, 75 deletions
diff --git a/src/views/admin-navbar.ecr b/src/views/admin-navbar.ecr deleted file mode 100644 index 4a06b15..0000000 --- a/src/views/admin-navbar.ecr +++ /dev/null @@ -1,29 +0,0 @@ -<div - class='navbar navbar-inverse navbar-static-top' - role='navigation' -> - <div class='container-fluid'> - <div class='navbar-header'> - <a - href='admin.html' - class='navbar-brand' - title='Reload admin page.' - > - <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 --> diff --git a/src/views/navbar.ecr b/src/views/navbar.ecr new file mode 100644 index 0000000..4164b90 --- /dev/null +++ b/src/views/navbar.ecr @@ -0,0 +1,31 @@ +<div + class='navbar navbar-inverse navbar-static-top' + role='navigation' +> + <div class='container-fluid'> + <div class='navbar-header'> + <a + href='<%= h(@link) %>' + class='navbar-brand' + title='<%= h(@text) %>' + > + <i class='fa fa-bomb'></i> + <%= h(@name) %> + </a><!-- navbar-brand --> + </div><!-- navbar-default --> + + <% if @show_logout %> + <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 --> + <% end %> + </div><!-- container-fluid --> +</div><!-- navbar --> diff --git a/src/views/pages/login.ecr b/src/views/pages/login.ecr index 4762104..8be0734 100644 --- a/src/views/pages/login.ecr +++ b/src/views/pages/login.ecr @@ -8,22 +8,7 @@ </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> - <%= h(TITLE) %> - </a><!-- navbar-brand --> - </div><!-- navbar-default --> - </div><!-- container-fluid --> - </div><!-- navbar --> + <%= navbar %> <div class='container'> <div class='col-md-6 col-md-offset-3'> diff --git a/src/views/pages/logout.ecr b/src/views/pages/logout.ecr index b3c2eae..0891823 100644 --- a/src/views/pages/logout.ecr +++ b/src/views/pages/logout.ecr @@ -2,34 +2,13 @@ <html lang='en-US'> <head> <meta charset="utf-8"/> - <title>Guff Logout</title> + <title><%= h(TITLE) %></title> - <%= - styles %w{ - assets/font-awesome-4.5.0/css/font-awesome.min.css - assets/bootstrap-3.3.6/css/bootstrap.min.css - assets/bootstrap-3.3.6/css/bootstrap-theme.min.css - } - %> + <%= styles %> </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 --> + <%= navbar %> <div class='container'> <div class='col-md-6 col-md-offset-3'> @@ -58,10 +37,5 @@ </div><!-- container --> </body> - <%= - scripts %w{ - assets/jquery-2.2.1.min.js - assets/bootstrap-3.3.6/js/bootstrap.min.js - } - %> + <%= scripts %> </html> |