mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-12 06:19:00 +00:00
docs/site: convert CSS grid to "simpler" solution
It's "simpler" because it doesn't use CSS grid but I think CSS grid is simpler though.
This commit is contained in:
parent
c62cb37426
commit
70cee0c7f3
@ -1,12 +1,9 @@
|
|||||||
:root {
|
:root {
|
||||||
--gap: 1rem;
|
--gap: 1rem;
|
||||||
|
--sidebar-width: 300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
display: grid;
|
|
||||||
grid-template-columns: [sidebar] 1fr [content] 3fr;
|
|
||||||
grid-gap: var(--gap);
|
|
||||||
overflow: hidden;
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
@ -16,14 +13,35 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.book.sidebar {
|
.book.sidebar {
|
||||||
padding: 0 var(--gap);
|
margin: 0;
|
||||||
|
padding: var(--gap);
|
||||||
|
background: var(--base01);
|
||||||
|
height: 100vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
resize: horizontal;
|
outline: none;
|
||||||
|
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: var(--sidebar-width);
|
||||||
|
|
||||||
|
& ul, & ol {
|
||||||
|
padding-left: 1em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.book.content {
|
.book.content {
|
||||||
padding: var(--gap);
|
padding: var(--gap);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
margin: 0 auto;
|
||||||
|
margin-left: var(--sidebar-width);
|
||||||
|
|
||||||
|
max-width: var(--content-width);
|
||||||
|
}
|
||||||
|
|
||||||
|
.site__toc-header {
|
||||||
|
font-size: 1.25em;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
article h1 {
|
article h1 {
|
||||||
|
@ -4,14 +4,14 @@
|
|||||||
{{- partial "head.html" . -}}
|
{{- partial "head.html" . -}}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<section class="book sidebar">
|
<nav class="book sidebar" aria-label="Table of contents">
|
||||||
|
{{ partialCached "chapters.html" . }}
|
||||||
|
</nav>
|
||||||
|
<section class="book content">
|
||||||
{{ partial "header.html" . }}
|
{{ partial "header.html" . }}
|
||||||
<hr aria-hidden="true">
|
<hr aria-hidden="true">
|
||||||
{{ partialCached "chapters.html" . }}
|
|
||||||
</section>
|
|
||||||
<section class="book content">
|
|
||||||
{{ block "main" . }}{{ end }}
|
{{ block "main" . }}{{ end }}
|
||||||
{{- partial "footer.html" . -}}
|
{{ partial "footer.html" . }}
|
||||||
</section>
|
</section>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<div class="site__toc-header">{{ T "table_of_contents" | default "Table of contents" }}</div>
|
||||||
{{ with .Site.GetPage "/menu" }}
|
{{ with .Site.GetPage "/menu" }}
|
||||||
{{ .Content | safeHTML }}
|
{{ .Content | safeHTML }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user