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; padding: 0;
} }
main {
max-width: 1200px;
margin: 0 auto;
margin-bottom: 100px;
display: flex;
flex-direction: column;
align-items: center;
}
code, pre { code, pre {
font-family: var(--font-monospace); font-family: var(--font-monospace);
} }
@ -47,4 +38,19 @@ a:hover {
background-color: rgb(30,31,31); background-color: rgb(30,31,31);
color: #eee; 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% %svelte.head%
</head> </head>
<body> <body>
<div>%svelte.body%</div> %svelte.body%
</body> </body>
</html> </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%); width: calc(100%);
padding: 0; padding: 0;
margin: 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); background-color: rgb(140, 241, 100);
color: rgb(30,31,31); color: rgb(30,31,31);
font-weight: 600; font-weight: 600;

View File

@ -4,6 +4,7 @@
import themeDark from 'svelte-highlight/styles/apprentice'; import themeDark from 'svelte-highlight/styles/apprentice';
import themeLight from 'svelte-highlight/styles/atelier-forest-light'; import themeLight from 'svelte-highlight/styles/atelier-forest-light';
import Header from '$lib/Header.svelte'; import Header from '$lib/Header.svelte';
import Footer from '$lib/Footer.svelte';
let theme = `<style> let theme = `<style>
@media (prefers-color-scheme: light) { @media (prefers-color-scheme: light) {
@ -20,9 +21,31 @@ ${themeDark.slice(7, -7)}
{@html theme} {@html theme}
</svelte:head> </svelte:head>
<header> <style>
<Header/> main {
</header> 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> <main>
<slot></slot> <header>
</main> <Header/>
</header>
<div class="content">
<slot></slot>
</div>
</main>
<footer>
<Footer/>
</footer>

View File

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

View File

@ -29,6 +29,17 @@
padding: 8px; padding: 8px;
min-width: 0; 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) { @media screen and (max-width: 1300px) {
.side { .side {
display: none; display: none;
@ -84,6 +95,8 @@
</content> </content>
</div> </div>
{#if pages} {#if pages && pages.length > 0}
<div class="other">Other pages in this category:</div>
<br>
<Pages pages={pages.slice(0, 3)}/> <Pages pages={pages.slice(0, 3)}/>
{/if} {/if}