Improvements to documentation

This commit is contained in:
Adam Hopkins
2023-09-10 14:29:49 +03:00
parent 81d986a413
commit 5a7ed4d4fe
14 changed files with 607 additions and 100 deletions

View File

@@ -290,3 +290,68 @@ h3 + .code-block { margin-top: 1rem; }
.tabs {
.tab-content { display: none; }
}
.table-of-contents {
position: fixed;
right: 0;
bottom: 0;
z-index: 1000;
max-width: 500px;
padding: 1rem 2rem;
background-color: $white-bis;
box-shadow: 0 0 2px rgba(63, 63, 68, 0.5);
@media (prefers-color-scheme: dark) {
background-color: $black;
box-shadow: 0 0 2px rgba(191, 191, 191, 0.5);
}
.table-of-contents-item {
display: block;
margin-bottom: 0.5rem;
text-decoration: none;
&:hover {
text-decoration: underline;
color: $primary;
strong, small {
color: $primary;
}
}
strong {
color: $black-bis;
font-size: 1.15em;
display: block;
line-height: 1rem;
margin-top: 0.75rem;
}
small {
color: $grey;
font-size: 0.85em;
}
@media (prefers-color-scheme: dark) {
strong { color: $grey-lighter; }
}
}
@media (max-width: 768px) {
position: static;
max-width: calc(100vw - 2rem);
.table-of-contents-item {
display: flex;
flex-direction: row-reverse;
justify-content: start;
strong {
display: inline;
margin: 0 0 0 0.75rem;
}
}
}
}

View File

@@ -7,9 +7,18 @@ code { color: #{$grey-dark}; }
}
}
a[target=_blank]::after {
content: "";
margin-left: 0.25em;
a{
&[target=_blank]::after {
content: "";
margin-left: 0.25em;
}
& > code {
border-bottom: 1px solid $primary;
&:hover {
background-color: $primary;
color: $white;
}
}
}
h1 a.anchor,
h2 a.anchor,
@@ -49,4 +58,8 @@ p + p { margin-top: 1rem; }
h2 { margin-left: 0; }
article { margin-left: 0; }
}
@media screen and (min-width: $widescreen) {
.section {
padding: 3rem 0rem;
}
}

View File

@@ -1,4 +1,4 @@
$body-size: 18px;
$body-size: 24px;

View File

@@ -60,7 +60,7 @@ $menu-width: 360px;
hr { background-color: var(--menu-divider); }
.is-anchor {
font-size: 0.85em;
font-size: 0.75em;
& a::before {
content: '# ';
color: var(--menu-contrast);
@@ -68,6 +68,7 @@ $menu-width: 360px;
}
.menu-label { margin-bottom: 1rem; }
li.is-group > a {
font-size: 0.85rem;
&::after {
content: '';
position: relative;
@@ -119,3 +120,14 @@ $menu-width: 360px;
}
.burger { display: block; }
}
.menu-list li ul {
margin: 0;
padding-left: 0;
}
.menu-list ul li:not(.is-anchor) {
margin-left: 0.75em;
}
.menu-list .menu-list li a {
font-size: 0.85em;
}