Rework main layout

This commit is contained in:
Lucas 2023-02-18 13:51:17 +00:00
parent f1af4314b5
commit 57b00f6c28
2 changed files with 12 additions and 6 deletions

View File

@ -31,7 +31,9 @@
body, body,
h1, h1,
p { main,
p,
section {
margin: 0; margin: 0;
} }
@ -45,7 +47,9 @@ body {
} }
h1, h1,
p { main,
p,
section {
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
} }
@ -79,7 +83,8 @@ nav {
} }
.viewport { .viewport {
margin: 0 auto; margin-left: auto;
margin-right: auto;
max-width: 60rem; max-width: 60rem;
} }

View File

@ -7,7 +7,7 @@
<link rel="stylesheet" href="[% request.uri_base %]/css/style.css"> <link rel="stylesheet" href="[% request.uri_base %]/css/style.css">
</head> </head>
<body class="bg-default fg-default flex-c-vertical"> <body class="bg-default fg-default flex-c-vertical">
<header class="border-bottom border-accent"> <header>
<nav class="viewport flex-c-horizontal nav-link-gap"> <nav class="viewport flex-c-horizontal nav-link-gap">
<a class="nav-link" href="[% uris.root %]">[% settings.appname %]</a> <a class="nav-link" href="[% uris.root %]">[% settings.appname %]</a>
<a class="nav-link" href="[% uris.random %]">random</a> <a class="nav-link" href="[% uris.random %]">random</a>
@ -16,9 +16,10 @@
<a class="nav-link" href="[% uris.login %]">login</a> <a class="nav-link" href="[% uris.login %]">login</a>
</nav> </nav>
</header> </header>
<!--<main class="viewport flex-i-fullsize flex-c-vertical flex-c-center">--> <main class="border-bottom border-top border-accent flex-i-fullsize">
<main class="viewport flex-i-fullsize"> <section class="viewport">
[% content -%] [% content -%]
</section>
</main> </main>
<footer class="text-center"> <footer class="text-center">
<p class="viewport">Powered by <a href="https://www.openbsd.org">OpenBSD</a> and <a href="https://perldancer.org/">Dancer2</a></p> <p class="viewport">Powered by <a href="https://www.openbsd.org">OpenBSD</a> and <a href="https://perldancer.org/">Dancer2</a></p>