From aaf12cb7c2b3cfb0f24a5a495ccb402560584c90 Mon Sep 17 00:00:00 2001 From: Lucas Date: Sun, 19 Mar 2023 21:59:41 +0000 Subject: [PATCH] backend: use % for control flow and directives, <%= %> for interpolation --- templates/_pager.html.ep | 4 ++-- templates/layouts/main.html.ep | 10 +++++++--- templates/media.html.ep | 2 +- templates/tags.html.ep | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/templates/_pager.html.ep b/templates/_pager.html.ep index 571ed64..0c9aaa7 100644 --- a/templates/_pager.html.ep +++ b/templates/_pager.html.ep @@ -1,4 +1,4 @@ -<% if (my $pager = stash("pager")) { %> +% if (my $pager = stash("pager")) { -<% } %> +% } diff --git a/templates/layouts/main.html.ep b/templates/layouts/main.html.ep index 0087319..2b9d4c0 100644 --- a/templates/layouts/main.html.ep +++ b/templates/layouts/main.html.ep @@ -21,12 +21,16 @@ % if (defined title) {

<%= title %>

% } -
<%= content %>
- <%= include '_pager' %> +
+%= content +
+%= include "_pager" diff --git a/templates/media.html.ep b/templates/media.html.ep index 968893e..9fb1f28 100644 --- a/templates/media.html.ep +++ b/templates/media.html.ep @@ -2,7 +2,7 @@

<%= link_to $media->{download} => begin %> - <%= image $media->{download} %> + <%= image $media->{download} %> <% end %>

diff --git a/templates/tags.html.ep b/templates/tags.html.ep index 9526cb4..74261b5 100644 --- a/templates/tags.html.ep +++ b/templates/tags.html.ep @@ -2,6 +2,6 @@

% for my $t (@$tags) { -<%= link_to "$t->{name} ($t->{count})" => $t->{uri} %> + <%= link_to "$t->{name} ($t->{count})" => $t->{uri} %> % }