From 9c0d077266f403ce9995ccd13f328bddc2dca5b1 Mon Sep 17 00:00:00 2001 From: swag Date: Sat, 4 Dec 2021 23:51:38 -0500 Subject: [PATCH] Add a bit to views --- templates/index.html.ep | 5 ++--- templates/layouts/default.html.ep | 17 +++++++++++++++-- templates/test.html.ep | 4 ++-- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/templates/index.html.ep b/templates/index.html.ep index 435d350..9426c20 100644 --- a/templates/index.html.ep +++ b/templates/index.html.ep @@ -1,4 +1,3 @@ % layout 'default'; -% title 'Welcome'; -

Welcome to the Mojolicious real-time web framework!

-

Test my <%= link_to(Model => 'test') %>

+% title 'Home'; +

Welcome to the Mojolicious real-time web framework!

diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep index fa73612..0a644f6 100644 --- a/templates/layouts/default.html.ep +++ b/templates/layouts/default.html.ep @@ -1,9 +1,22 @@ - <%= title %> + Guestbook-NG - <%= title %> -<%= content %> +
+

<%= title %>

+ + + + + + + + + +
<%= link_to Home => 'index' %> <%= link_to Test => 'test' %> <%= link_to Post => 'post' %>
+ <%= content %> +
diff --git a/templates/test.html.ep b/templates/test.html.ep index 92ea998..770fd8c 100644 --- a/templates/test.html.ep +++ b/templates/test.html.ep @@ -1,6 +1,6 @@ % layout 'default'; -% title 'test'; -

test page

+% title 'Test'; +

test page

<% if ($method eq 'POST') { %>

<%= $string %> at <%= $time =>

<% } else { %>