diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/guff/views/pages/login.cr | 21 | ||||
-rw-r--r-- | src/views/pages/login.ecr | 19 |
2 files changed, 25 insertions, 15 deletions
diff --git a/src/guff/views/pages/login.cr b/src/guff/views/pages/login.cr index dae1a82..8dc7b65 100644 --- a/src/guff/views/pages/login.cr +++ b/src/guff/views/pages/login.cr @@ -1,10 +1,31 @@ require "../html" class Guff::Views::Pages::Login < Guff::Views::HTMLView + TITLE = "Guff" + + 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 + } + + SCRIPTS = %w{ + assets/jquery-2.2.1.min.js + assets/bootstrap-3.3.6/js/bootstrap.min.js + } + def initialize(context : Context, @error : String? = nil) super(context) end + private def styles + super(STYLES) + end + + private def scripts + super(SCRIPTS) + end + def get_csrf_token @context.models.csrf.create_token end diff --git a/src/views/pages/login.ecr b/src/views/pages/login.ecr index 16f63a4..4762104 100644 --- a/src/views/pages/login.ecr +++ b/src/views/pages/login.ecr @@ -2,15 +2,9 @@ <html lang='en-US'> <head> <meta charset="utf-8"/> - <title>Guff Login</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> @@ -25,7 +19,7 @@ class='navbar-brand' > <i class='fa fa-bomb'></i> - Guff + <%= h(TITLE) %> </a><!-- navbar-brand --> </div><!-- navbar-default --> </div><!-- container-fluid --> @@ -105,10 +99,5 @@ </div><!-- container --> </body> - <%= - scripts %w{ - assets/jquery-2.2.1.min.js - assets/bootstrap-3.3.6/js/bootstrap.min.js - } - %> + <%= scripts %> </html> |