woo footer

This commit is contained in:
Jill 2022-05-04 01:08:28 +03:00
parent 86ad0c5ee7
commit 734dcca462
7 changed files with 97 additions and 17 deletions

View File

@ -19,15 +19,6 @@ body {
padding: 0;
}
main {
max-width: 1200px;
margin: 0 auto;
margin-bottom: 100px;
display: flex;
flex-direction: column;
align-items: center;
}
code, pre {
font-family: var(--font-monospace);
}
@ -47,4 +38,19 @@ a:hover {
background-color: rgb(30,31,31);
color: #eee;
}
}
html, body {
height: 100%;
}
body {
display: flex;
flex-direction: column;
align-items: center;
}
body > main {
flex: 1 0 auto;
}
body > footer {
flex-shrink: 0;
}

View File

@ -8,6 +8,6 @@
%svelte.head%
</head>
<body>
<div>%svelte.body%</div>
%svelte.body%
</body>
</html>

34
src/lib/Footer.svelte Normal file
View File

@ -0,0 +1,34 @@
<style>
.footer {
background-color: rgb(220, 226, 221);
padding: 2em;
font-size: small;
color: #555;
}
a {
color: #444;
}
a:hover {
color: #222;
}
@media (prefers-color-scheme: dark) {
.footer {
background-color: rgb(20, 21, 21);
color: #888;
}
a {
color: #aaa;
}
a:hover {
color: #ccc;
}
}
</style>
<div class="footer">
<a href="https://git.oat.zone/oat/guidebook" target="_blank"><b>Guidebook</b></a> is maintained by <b>Jill "oatmealine" Monoids</b> and is licensed under <a href="https://git.oat.zone/oat/guidebook/src/branch/main/LICENSE" target="_blank"><b>GPL-3.0</b></a>.
</div>

View File

@ -7,7 +7,7 @@
width: calc(100%);
padding: 0;
margin: 0;
box-shadow: 0px 2px 15px rgba(10, 10, 10, 0.4);
box-shadow: 0px 2px 8px rgba(10, 10, 10, 0.2);
background-color: rgb(140, 241, 100);
color: rgb(30,31,31);
font-weight: 600;

View File

@ -4,6 +4,7 @@
import themeDark from 'svelte-highlight/styles/apprentice';
import themeLight from 'svelte-highlight/styles/atelier-forest-light';
import Header from '$lib/Header.svelte';
import Footer from '$lib/Footer.svelte';
let theme = `<style>
@media (prefers-color-scheme: light) {
@ -20,9 +21,31 @@ ${themeDark.slice(7, -7)}
{@html theme}
</svelte:head>
<header>
<Header/>
</header>
<style>
main {
width: 100%;
}
.content {
max-width: 1200px;
margin: 0 auto;
margin-bottom: 100px;
display: flex;
flex-direction: column;
align-items: center;
}
footer {
width: 100%;
}
</style>
<main>
<slot></slot>
</main>
<header>
<Header/>
</header>
<div class="content">
<slot></slot>
</div>
</main>
<footer>
<Footer/>
</footer>

View File

@ -10,6 +10,10 @@
}
</style>
<svelte:head>
<title>Guidebook</title>
</svelte:head>
<div class="shortdesc">
<Page content=
{`

View File

@ -29,6 +29,17 @@
padding: 8px;
min-width: 0;
}
.other {
color: #888;
margin-top: 2em;
max-width: 90%;
padding-left: 4em;
padding-right: 4em;
text-align: center;
padding-bottom: 1em;
margin-bottom: 1em;
border-bottom: 1px solid #888;
}
@media screen and (max-width: 1300px) {
.side {
display: none;
@ -84,6 +95,8 @@
</content>
</div>
{#if pages}
{#if pages && pages.length > 0}
<div class="other">Other pages in this category:</div>
<br>
<Pages pages={pages.slice(0, 3)}/>
{/if}