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";
% title "Error";
<h1><%= title %></h1>

View File

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

View File

@ -18,13 +18,7 @@
</header>
<main class="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
</div>
%= include "_pager"
</div>
</main>
<footer class="border-top">

View File

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

View File

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

View File

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