mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 12:19:07 +00:00
docs/site: create initial version of the layout
It requires simpler modifications than I thought. Pretty interesting.
This commit is contained in:
parent
cac3fa25cf
commit
4d24fa51c3
31
docs/assets/scss/extend.scss
Normal file
31
docs/assets/scss/extend.scss
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
:root {
|
||||||
|
--gap: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: [sidebar] 1fr [content] 3fr;
|
||||||
|
grid-gap: var(--gap);
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
max-width: unset;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.book.sidebar {
|
||||||
|
padding: 0 var(--gap);
|
||||||
|
overflow-y: auto;
|
||||||
|
resize: horizontal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.book.content {
|
||||||
|
padding: var(--gap);
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
article h1 {
|
||||||
|
font-size: 2rem;
|
||||||
|
}
|
17
docs/layouts/_default/baseof.html
Normal file
17
docs/layouts/_default/baseof.html
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="{{ .Site.LanguageCode | default "en" }}">
|
||||||
|
<head>
|
||||||
|
{{- partial "head.html" . -}}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<section class="book sidebar">
|
||||||
|
{{ partial "header.html" . }}
|
||||||
|
<hr aria-hidden="true">
|
||||||
|
{{ partialCached "chapters.html" . }}
|
||||||
|
</section>
|
||||||
|
<section class="book content">
|
||||||
|
{{ block "main" . }}{{ end }}
|
||||||
|
{{- partial "footer.html" . -}}
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</html>
|
5
docs/layouts/index.html
Normal file
5
docs/layouts/index.html
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
<article>
|
||||||
|
<main>{{ .Content }}</main>
|
||||||
|
</article>
|
||||||
|
{{ end }}
|
3
docs/layouts/partials/chapters.html
Normal file
3
docs/layouts/partials/chapters.html
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{{ with .Site.GetPage "/menu" }}
|
||||||
|
{{ .Content | safeHTML }}
|
||||||
|
{{ end }}
|
Loading…
Reference in New Issue
Block a user