backend: move all header and pager display out of layout

This commit is contained in:
Lucas 2023-03-24 13:58:39 +00:00
parent 1748621469
commit c78bd0c85b
6 changed files with 11 additions and 7 deletions

View File

@ -1,2 +1,3 @@
% layout "main"; % layout "main";
% title "Error"; % title "Error";
<h1><%= title %></h1>

View File

@ -1,4 +1,5 @@
% layout "main"; % layout "main";
<h1><%= title %></h1>
<div class="flex-c-horizontal flex-c-wrap gallery"> <div class="flex-c-horizontal flex-c-wrap gallery">
% for my $m ($media->@*) { % for my $m ($media->@*) {
@ -7,3 +8,5 @@
<% end %> <% end %>
% } % }
</div> </div>
%= include "_pager";

View File

@ -18,13 +18,7 @@
</header> </header>
<main class="flex-i-fullsize flex-c-vertical"> <main class="flex-i-fullsize flex-c-vertical">
<div class="viewport flex-i-fullsize flex-c-vertical"> <div class="viewport flex-i-fullsize flex-c-vertical">
% if (defined title) {
<h1><%= title %></h1>
% }
<div class="flex-i-fullsize">
%= content %= content
</div>
%= include "_pager"
</div> </div>
</main> </main>
<footer class="border-top"> <footer class="border-top">

View File

@ -19,6 +19,8 @@
% } else { % } else {
<dd><%= c($media->{tags}->@*) <dd><%= c($media->{tags}->@*)
->map(sub { link_to $_ => url_for("tag_show", tag_id_or_name => $_) }) ->map(sub { link_to $_ => url_for("tag_show", tag_id_or_name => $_) })
->join(", ") %>.</dd> ->join(", ") %></dd>
% } % }
</dl> </dl>
%= include "_pager";

View File

@ -1,2 +1,3 @@
% layout "main"; % layout "main";
% title "Not Found"; % title "Not Found";
<h1><%= title %></h1>

View File

@ -1,7 +1,10 @@
% layout "main"; % layout "main";
<h1><%= title %></h1>
<p class="text-center"> <p class="text-center">
% for my $t ($tags->@*) { % for my $t ($tags->@*) {
<%= link_to $t->{name} => $t->{uri} %>(<%= $t->{count} %>) <%= link_to $t->{name} => $t->{uri} %>(<%= $t->{count} %>)
% } % }
</p> </p>
%= include "_pager";