site: use three column layout
This commit is contained in:
committed by
Johannes Kirschbauer
parent
92f87e169c
commit
6614138fb8
@@ -10,4 +10,23 @@
|
|||||||
<link rel="icon" href={favicon} />
|
<link rel="icon" href={favicon} />
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
{@render children?.()}
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li><a href="/">Home</a></li>
|
||||||
|
<li><a href="/docs/">Docs</a></li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<main>
|
||||||
|
{@render children?.()}
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
ul {
|
||||||
|
display: flex;
|
||||||
|
border-bottom: 1px solid;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
li {
|
||||||
|
padding-left: 2em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,4 +1 @@
|
|||||||
<h1>Welcome to Clan</h1>
|
<h1>Welcome to Clan</h1>
|
||||||
<p>
|
|
||||||
<a href="/docs">Show Docs</a>
|
|
||||||
</p>
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
{#each paths as path}
|
{#each paths as path}
|
||||||
<li><a href={`/docs/${path}`}>{path}</a></li>
|
<li><a href={`/docs/${path}`}>{path}</a></li>
|
||||||
{/each}
|
{/each}
|
||||||
<li><a href="/">Home</a></li>
|
|
||||||
</nav>
|
</nav>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
{@render children()}
|
{@render children()}
|
||||||
@@ -19,4 +18,8 @@
|
|||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
nav {
|
||||||
|
width: 300px;
|
||||||
|
flex: none;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import "./markdown.css";
|
||||||
import "./shiki.css";
|
import "./shiki.css";
|
||||||
import "./admonition.css";
|
import "./admonition.css";
|
||||||
let { data } = $props();
|
let { data } = $props();
|
||||||
@@ -6,9 +7,11 @@
|
|||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
<h1>{data.frontmatter.title}</h1>
|
||||||
{@html data.content}
|
{@html data.content}
|
||||||
</div>
|
</div>
|
||||||
<div class="toc">
|
<div class="toc">
|
||||||
|
<h2>On this page</h2>
|
||||||
{@html data.toc}
|
{@html data.toc}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -17,5 +20,14 @@
|
|||||||
<style>
|
<style>
|
||||||
.container {
|
.container {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
padding-left: 30px;
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
flex: 1;
|
||||||
|
max-width: 800px;
|
||||||
|
margin-left: calc(50vw - 400px - 300px);
|
||||||
|
}
|
||||||
|
.toc {
|
||||||
|
flex: none;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
10
site/src/routes/docs/[...path]/markdown.css
Normal file
10
site/src/routes/docs/[...path]/markdown.css
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
code {
|
||||||
|
font-family:
|
||||||
|
ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas,
|
||||||
|
"DejaVu Sans Mono", monospace;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre code {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
|
---
|
||||||
|
title: Add Machines
|
||||||
|
---
|
||||||
|
|
||||||
Machines can be added using the following methods
|
Machines can be added using the following methods
|
||||||
|
|
||||||
- Create a file `machines/{machine_name}/configuration.nix` (See: [File Autoincludes](../guides/inventory/autoincludes.md))
|
- Create a file `machines/{machine_name}/configuration.nix` (See: [File Autoincludes](../guides/inventory/autoincludes.md))
|
||||||
|
|||||||
@@ -2,4 +2,5 @@
|
|||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: "Geist Variable";
|
font-family: "Geist Variable";
|
||||||
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ export default function (): PluginOption {
|
|||||||
.use(remarkRehype)
|
.use(remarkRehype)
|
||||||
.use(rehypeShiki, {
|
.use(rehypeShiki, {
|
||||||
themes: {
|
themes: {
|
||||||
light: "vitesse-light",
|
light: "nord",
|
||||||
dark: "vitesse-dark",
|
dark: "nord",
|
||||||
},
|
},
|
||||||
transformers: [
|
transformers: [
|
||||||
transformerNotationDiff({
|
transformerNotationDiff({
|
||||||
@@ -53,7 +53,7 @@ export default function (): PluginOption {
|
|||||||
.use(rehypeStringify)
|
.use(rehypeStringify)
|
||||||
.use(rehypeSlug)
|
.use(rehypeSlug)
|
||||||
.use(rehypeAutolinkHeadings)
|
.use(rehypeAutolinkHeadings)
|
||||||
.process(String(code));
|
.process(String(file));
|
||||||
|
|
||||||
const parsed = await unified()
|
const parsed = await unified()
|
||||||
.use(remarkParse)
|
.use(remarkParse)
|
||||||
@@ -63,7 +63,7 @@ export default function (): PluginOption {
|
|||||||
})
|
})
|
||||||
.use(remarkRehype)
|
.use(remarkRehype)
|
||||||
.use(rehypeStringify)
|
.use(rehypeStringify)
|
||||||
.process(file);
|
.process(String(file));
|
||||||
|
|
||||||
return `
|
return `
|
||||||
export const content = ${JSON.stringify(String(html))};
|
export const content = ${JSON.stringify(String(html))};
|
||||||
|
|||||||
Reference in New Issue
Block a user