Compare commits

..

No commits in common. "57b87d318c3210cb0412d8e715d8a6cfb75684b2" and "86ad0c5ee7a26308d1c87a95cc90732d1c9e7e3b" have entirely different histories.

13 changed files with 27 additions and 130 deletions

View File

@ -19,6 +19,15 @@ 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);
}
@ -38,19 +47,4 @@ 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>
%svelte.body%
<div>%svelte.body%</div>
</body>
</html>

View File

@ -1,34 +0,0 @@
<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 8px rgba(10, 10, 10, 0.2);
box-shadow: 0px 2px 15px rgba(10, 10, 10, 0.4);
background-color: rgb(140, 241, 100);
color: rgb(30,31,31);
font-weight: 600;

View File

@ -18,7 +18,7 @@
</style>
<!-- svelte-ignore a11y-missing-attribute -->
<a {...properties} {target} rel={isExternal ? 'nofollow noreferrer external' : ''}>
<a {...properties} {target}>
<Children {children} />
{#if isExternal}
<span class="icon">

View File

@ -1,9 +1,9 @@
<script>
import Markdown from 'svelte-exmarkdown';
import { gfmPlugin } from 'svelte-exmarkdown/gfm';
import Code from './markdown/Code.svelte';
import Link from './markdown/Link.svelte';
import Section from './markdown/Section.svelte';
import Code from './Code.svelte';
import Link from './Link.svelte';
import Section from './Section.svelte';
const highlightPlugin = {
renderer: {

View File

@ -1,6 +1,6 @@
<script>
import Children from 'svelte-exmarkdown/renderer/Children.svelte';
import { toAnchor } from '$lib/anchors';
import { toAnchor } from './anchors';
export let children;
export let properties;

View File

@ -4,7 +4,6 @@
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) {
@ -21,31 +20,9 @@ ${themeDark.slice(7, -7)}
{@html theme}
</svelte:head>
<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>
<header>
<Header/>
</header>
<main>
<header>
<Header/>
</header>
<div class="content">
<slot></slot>
</div>
</main>
<footer>
<Footer/>
</footer>
<slot></slot>
</main>

View File

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

View File

@ -2,19 +2,18 @@ import { getPost, getPostsFlat, isDir } from "$lib/pages";
export async function get({ params }) {
let dir = await isDir(params.name);
let split = params.name.split('/');
if (dir === null) {
return {status: 404};
} else if (dir) {
return {
body: {
pages: await getPostsFlat(params.name),
loc: split[split.length - 1]
pages: await getPostsFlat(params.name)
}
}
} else {
let pages = [];
let split = params.name.split('/');
if (split.length > 1) {
pages = await getPostsFlat(split[split.length - 2]);
}
@ -26,8 +25,7 @@ export async function get({ params }) {
return {
body: {
page: post,
pages: pages,
loc: split[split.length - 2]
pages: pages
}
}
}

View File

@ -3,22 +3,11 @@
import PageRenderer from './_page.svelte';
export let page;
export let pages;
export let loc;
</script>
{#if page}
<PageRenderer {page} {pages} {loc}/>
<PageRenderer {page} {pages}/>
{:else if pages}
<style>
.pagesin {
font-size: 1.5em;
margin-top: 1em;
margin-bottom: 1em;
}
</style>
<div class="pagesin">Pages in <b>{loc}</b>:</div>
<Pages {pages}/>
{:else}
404!

View File

@ -4,7 +4,6 @@
import Pages from "$lib/Pages.svelte";
export let page;
export let pages;
export let loc;
</script>
<style>
@ -12,7 +11,6 @@
display: flex;
flex-direction: row;
gap: 1em;
max-width: 100%;
}
.side {
min-width: 120px;
@ -31,24 +29,6 @@
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;
}
.viewall {
margin-top: 2em;
font-size: 0.9em;
color: #bbb;
}
@media screen and (max-width: 1300px) {
.side {
display: none;
@ -100,13 +80,10 @@
</nav>
</div>
<content>
<Page content={page.content}/>
<Page content={page.content}></Page>
</content>
</div>
{#if pages && pages.length > 0}
<div class="other">Other pages in this category:</div>
<br>
{#if pages}
<Pages pages={pages.slice(0, 3)}/>
<a class="viewall" href="/p/{page.path.split('/').slice(0, -1).join('/') + '/'}">View all pages in <b>{loc}</b></a>
{/if}