backend: add /
This commit is contained in:
parent
302ec269d5
commit
6dfabdf29f
5 changed files with 83 additions and 2 deletions
9
templates/gallery.html.ep
Normal file
9
templates/gallery.html.ep
Normal file
|
@ -0,0 +1,9 @@
|
|||
% layout "main";
|
||||
|
||||
<div class="flex-c-horizontal flex-c-wrap gallery">
|
||||
% for my $m (@$media) {
|
||||
<%= link_to $m->{media_src} => begin %>
|
||||
<%= image $m->{media_src}, class => "gallery-image" %>
|
||||
<% end %>
|
||||
% }
|
||||
</div>
|
29
templates/layouts/main.html.ep
Normal file
29
templates/layouts/main.html.ep
Normal file
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>PoorBooru - <%= title %></title>
|
||||
<%= stylesheet "/css/style.css" %>
|
||||
</head>
|
||||
<body class="bg-default fg-default flex-c-vertical">
|
||||
<header>
|
||||
<nav class="viewport flex-c-horizontal main-nav-link-gap">
|
||||
<%= link_to "Pooru~" => "/" => (class => "main-nav-link") %>
|
||||
<%= link_to "random" => "/random" => (class => "main-nav-link") %>
|
||||
<%= link_to "tags" => "/tags" => (class => "main-nav-link") %>
|
||||
<span class="flex-i-fullsize"><!-- spacer --></span>
|
||||
<%= link_to login => "/login" => (class => "main-nav-link") %>
|
||||
</nav>
|
||||
</header>
|
||||
<main class="border-bottom border-top border-accent flex-i-fullsize flex-c-vertical">
|
||||
<div class="viewport flex-i-fullsize flex-c-vertical">
|
||||
<h1><%= title %></h1>
|
||||
<div class="viewport flex-i-fullsize"><%= content %></div>
|
||||
</div>
|
||||
</main>
|
||||
<footer class="text-center">
|
||||
<p class="viewport text-small">Powered by <a href="https://www.openbsd.org">OpenBSD</a> and <a href="https://mojolicious.org/">Mojolicious</a></p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
Reference in a new issue