From fb6e44aa22557aac0795a2e077470b0e3848a6ad Mon Sep 17 00:00:00 2001 From: Denis Fedoseev Date: Tue, 1 Aug 2017 15:55:21 +0300 Subject: [PATCH] Navbar was added --- fotostore.pl | 2 +- templates/index.html.ep | 10 +--------- templates/layouts/base.html.ep | 32 +++++++++++++++++++++++++++++++- templates/logout.html.ep | 3 +++ 4 files changed, 36 insertions(+), 11 deletions(-) create mode 100644 templates/logout.html.ep diff --git a/fotostore.pl b/fotostore.pl index d8dc0d5..f4f0760 100755 --- a/fotostore.pl +++ b/fotostore.pl @@ -78,7 +78,7 @@ get '/logout' => sub { my $self = shift; $self->logout(); - $self->render( text => 'bye' ); + $self->render( message => 'bye' ); }; get '/register' => ( authenticated => 0 ) => sub { diff --git a/templates/index.html.ep b/templates/index.html.ep index d15117b..289227e 100644 --- a/templates/index.html.ep +++ b/templates/index.html.ep @@ -1,17 +1,9 @@ % layout 'base'; -

Rough, Slow, Stupid, Contrary Photohosting

<% if (is_user_authenticated()) { %> %= include 'includes/images_list' <% } else { %> - -
-
- - - -
-
+

Please login to access your images

<% } %> diff --git a/templates/layouts/base.html.ep b/templates/layouts/base.html.ep index aca3d9d..a3c18a5 100644 --- a/templates/layouts/base.html.ep +++ b/templates/layouts/base.html.ep @@ -24,7 +24,37 @@ - <%= content %> + +
+ <%= content %> +
\ No newline at end of file diff --git a/templates/logout.html.ep b/templates/logout.html.ep new file mode 100644 index 0000000..093ae75 --- /dev/null +++ b/templates/logout.html.ep @@ -0,0 +1,3 @@ +% layout 'base'; + +<%= $message %> \ No newline at end of file