summaryrefslogtreecommitdiff
path: root/docs/public
diff options
context:
space:
mode:
Diffstat (limited to 'docs/public')
-rw-r--r--docs/public/code.css175
-rw-r--r--docs/public/index.css151
-rw-r--r--docs/public/nav.js37
-rw-r--r--docs/public/theme.css24
4 files changed, 210 insertions, 177 deletions
diff --git a/docs/public/code.css b/docs/public/code.css
index 76b44bd24..58a631e57 100644
--- a/docs/public/code.css
+++ b/docs/public/code.css
@@ -8,148 +8,91 @@
opacity: 0.7;
}
-.token.atrule {
- color: #c792ea;
+.token.plain-text,
+[class*="language-bash"] span.token,
+[class*="language-shell"] span.token {
+ color: var(--color-gray-200);
}
-.token.attr-name {
- color: #ffcb6b;
-}
-
-.token.attr-value {
- color: #a5e844;
-}
-
-.token.attribute {
- color: #a5e844;
-}
-
-.token.boolean {
- color: #c792ea;
-}
-
-.token.builtin {
- color: #ffcb6b;
-}
-
-.token.cdata {
- color: #80cbc4;
-}
-
-.token.char {
- color: #80cbc4;
-}
-
-.token.class {
- color: #ffcb6b;
+[class*="language-bash"] span.token,
+[class*="language-shell"] span.token {
+ font-style: bold;
}
-.token.class-name {
- color: #f2ff00;
-}
-
-.token.comment {
- color: #999;
-}
-
-.token.constant {
- color: #c792ea;
+.token.prolog,
+.token.comment,
+[class*="language-bash"] span.token.comment,
+[class*="language-shell"] span.token.comment {
+ color: var(--color-gray-400);
}
+.token.selector,
+.token.tag,
+.token.unit,
+.token.url,
+.token.variable,
+.token.entity,
.token.deleted {
- color: #ff6666;
-}
-
-.token.doctype {
- color: #999;
-}
-
-.token.entity {
- color: #ff6666;
+ color: #FA5E5B;
+}
+
+.token.boolean,
+.token.constant,
+.token.doctype,
+.token.number,
+.token.regex,
+.token.builtin,
+.token.class,
+.token.hexcode,
+.token.class-name,
+.token.attr-name {
+ color: var(--color-yellow);
}
-.token.function {
- color: #c792ea;
+.token.atrule,
+.token.attribute,
+.token.attr-value .token.punctuation,
+.token.attr-value,
+.token.pseudo-class,
+.token.pseudo-element,
+.token.string {
+ color: var(--color-green);
}
-.token.hexcode {
- color: #f2ff00;
+.token.symbol,
+.token.function,
+.token.id,
+.token.important
+ {
+ color: var(--color-blue);
}
+.token.important,
.token.id {
- color: #c792ea;
- font-weight: bold;
+ font-weight: bold;
}
-.token.important {
- color: #c792ea;
- font-weight: bold;
+
+.token.cdata,
+.token.char,
+.token.property {
+ color: #23B1AF;
}
.token.inserted {
- color: #80cbc4;
+ color: var(--color-green);
}
.token.keyword {
- color: #c792ea;
-}
-
-.token.number {
- color: #fd9170;
+ color: #FF657C;
+ font-style: italic;
}
.token.operator {
- color: #89ddff;
-}
-
-.token.prolog {
- color: #999;
-}
-
-.token.property {
- color: #80cbc4;
-}
-
-.token.pseudo-class {
- color: #a5e844;
-}
-
-.token.pseudo-element {
- color: #a5e844;
+ color: var(--color-gray-300);
}
+.token.attr-value .token.attr-equals,
.token.punctuation {
- color: #89ddff;
-}
-
-.token.regex {
- color: #f2ff00;
-}
-
-.token.selector {
- color: #ff6666;
-}
-
-.token.string {
- color: #a5e844;
-}
-
-.token.symbol {
- color: #c792ea;
-}
-
-.token.tag {
- color: #ff6666;
-}
-
-.token.unit {
- color: #fd9170;
-}
-
-.token.url {
- color: #ff6666;
-}
-
-.token.variable {
- color: #ff6666;
+ color: var(--color-gray-200);
}
diff --git a/docs/public/index.css b/docs/public/index.css
index 2b41accad..14f7e3518 100644
--- a/docs/public/index.css
+++ b/docs/public/index.css
@@ -5,7 +5,7 @@
:root {
--user-font-scale: 1rem - 16px;
- --max-width: calc(100% - 2rem);
+ --max-width: calc(100% - 1rem);
}
@media (min-width: 50em) {
@@ -20,12 +20,8 @@ body {
min-height: 100vh;
font-family: var(--font-body);
font-size: 1rem;
- font-size: clamp(
- 0.875rem,
- 0.4626rem + 1.0309vw + var(--user-font-scale),
- 1.125rem
- );
- line-height: 1.625;
+ font-size: clamp(0.9rem, 0.7500rem + 0.3750vw + var(--user-font-scale), 1rem);
+ line-height: 1.5;
}
nav ul {
@@ -37,11 +33,15 @@ nav ul {
margin-top: 1rem;
}
+.content main > :first-child {
+ margin-top: 0;
+}
+
/* Typography */
:is(h1, h2, h3, h4, h5, h6) {
- margin-bottom: 1.38rem;
+ margin-bottom: 1rem;
font-weight: 400;
- line-height: 1.3;
+ line-height: 1.25;
}
:is(h1, h2) {
@@ -53,27 +53,26 @@ nav ul {
}
h1 {
- font-size: 3.5rem;
+ font-size: 2.5rem;
font-weight: bold;
}
h2 {
- font-size: 32px;
+ font-size: 1.75rem;
font-weight: bold;
}
h3 {
- font-size: 24px;
- font-weight: bold;
+ font-size: 1.25rem;
}
h4 {
font-size: 1rem;
- font-weight: bold;
}
h5 {
- font-size: clamp(1.2rem, 1.15rem + 0.125vw, 1.25rem);
+ font-size: 0.8rem;
+ font-weight: bold;
}
p,
@@ -95,6 +94,20 @@ a {
gap: 0.5rem;
}
+article :is(ul, ol) > * + *,
+article li > * + * {
+ margin-top: 0.75rem;
+}
+
+article :is(ul, ol) {
+ padding-left: 0;
+}
+
+article ::marker {
+ font-weight: bold;
+ color: var(--theme-text-light);
+}
+
a > code:not([class*='language']) {
position: relative;
color: var(--theme-text-accent);
@@ -162,16 +175,26 @@ pre {
--padding-inline: 2rem;
padding: var(--padding-block) var(--padding-inline);
padding-right: calc(var(--padding-inline) * 2);
+ margin-left: calc(var(--padding-inline) * -1);
+ margin-right: calc(var(--padding-inline) * -1);
+ font-family: var(--font-mono);
- line-height: 1.414;
+ line-height: 1.5;
+ font-size: 0.85rem;
overflow-y: hidden;
overflow-x: auto;
}
+pre code {
+ font: inherit;
+}
+
@media (min-width: 37.75em) {
pre {
--padding-inline: 1.25rem;
border-radius: 8px;
+ margin-left: 0;
+ margin-right: 0;
}
}
@@ -193,6 +216,30 @@ img {
align-items: center;
}
+header {
+ position: relative;
+ transition: transform 300ms 200ms cubic-bezier(0.23, 1, 0.320, 1);
+}
+
+header::after {
+ content: '';
+ display: block;
+ position: absolute;
+ top: 100%;
+ left: 0;
+ right: 0;
+ height: 0.5rem;
+ background: var(--theme-navbar-bg);
+}
+
+header.hidden {
+ transform: translateY(calc(-100% - 1px));
+ transition: transform 200ms 100ms cubic-bezier(0.755, 0.05, 0.855, 0.06);
+}
+header.hidden:is(:hover, :focus, :focus-within) {
+ transform: translateY(0);
+}
+
header button {
background-color: var(--theme-bg);
}
@@ -258,7 +305,7 @@ button {
}
#theme-toggle .checked {
- color: var(--theme-accent);
+ color: var(--theme-navbar-bg);
transform: scale(1.125);
opacity: 1;
}
@@ -276,13 +323,13 @@ input[name='theme-toggle'] {
.sidebar-nav {
width: 100%;
position: sticky;
- min-height: calc(100vh - 3.5rem);
- height: calc(100vh - 3.5rem);
- top: 3.5rem;
+ min-height: calc(100vh - var(--theme-navbar-height));
+ height: calc(100vh - var(--theme-navbar-height));
+ top: var(--theme-navbar-height);
}
.sidebar-nav-inner {
height: 100%;
- padding: 2rem 0;
+ padding: 0;
overflow: auto;
}
@@ -302,7 +349,8 @@ h2.heading {
.header-link:hover,
.header-link:focus {
- border-left-color: var(--color-gray-300);
+ border-left-color: var(--theme-accent);
+ color: var(--theme-accent);
}
.header-link:focus-within {
color: var(--theme-text-light);
@@ -335,36 +383,6 @@ h2.heading {
font-size: 1rem;
}
-/* Scrollbar */
-
-/* width */
-::-webkit-scrollbar {
- width: 0.5rem;
-}
-
-/* Track */
-::-webkit-scrollbar-track {
- background: var(--theme-divider);
- border-radius: 1rem;
-}
-
-/* Handle */
-::-webkit-scrollbar-thumb {
- background: var(--theme-text-lighter);
- border-radius: 1rem;
-}
-
-/* Handle on hover */
-::-webkit-scrollbar-thumb:hover {
- background: var(--theme-text-light);
-}
-
-/* Buttons */
-::-webkit-scrollbar-button {
- display: none;
-}
-/* Scrollbar - End */
-
/* Screenreader Only Text */
.sr-only {
position: absolute;
@@ -382,3 +400,32 @@ h2.heading {
:target {
scroll-margin-top: 4rem;
}
+
+#site-title {
+ display: flex;
+ align-items: center;
+ gap: 0.25em;
+ font-size: 1.5rem;
+ font-weight: 700;
+ margin: 0;
+ line-height: 1;
+ color: var(--color-white);
+ text-decoration: none;
+}
+
+#site-title svg {
+ width: 118px;
+ height: 48px;
+ display: block;
+}
+
+#site-title:hover,
+#site-title:focus {
+ opacity: 0.8;
+}
+
+#site-title h1 {
+ font: inherit;
+ color: inherit;
+ margin: 0;
+}
diff --git a/docs/public/nav.js b/docs/public/nav.js
new file mode 100644
index 000000000..93fadcd61
--- /dev/null
+++ b/docs/public/nav.js
@@ -0,0 +1,37 @@
+const nav = document.querySelector('body > header');
+
+if (!window.matchMedia('(prefers-reduced-motion)').matches) {
+ window.addEventListener('scroll', onScroll, { passive: true });
+}
+
+let prev = -1;
+let prevDir = 0;
+let threshold = 32;
+
+function onScroll() {
+ const curr = window.scrollY;
+ const dir = curr > prev ? 1 : -1;
+
+ if (curr < threshold) {
+ show();
+ document.documentElement.classList.add('initial');
+ } else if (dir !== prevDir) {
+ if (dir === 1) {
+ hide();
+ } else {
+ show();
+ }
+ }
+
+ prev = curr;
+}
+
+const hide = () => {
+ nav.classList.add('hidden')
+ document.documentElement.classList.add('scrolled');
+ document.documentElement.classList.remove('initial');
+};
+const show = () => {
+ nav.classList.remove('hidden');
+ document.documentElement.classList.remove('scrolled');
+}
diff --git a/docs/public/theme.css b/docs/public/theme.css
index 22d765714..f5db78d1f 100644
--- a/docs/public/theme.css
+++ b/docs/public/theme.css
@@ -2,8 +2,7 @@
--font-fallback: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial,
sans-serif, Apple Color Emoji, Segoe UI Emoji;
--font-body: system-ui, var(--font-fallback);
- --font-mono: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
- monospace;
+ --font-mono: "IBM Plex Mono", Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace;
--color-white: #fff;
--color-black: #000014;
@@ -37,14 +36,14 @@
:root {
color-scheme: light;
- --theme-accent: var(--color-blue);
- --theme-accent-rgb: var(--color-blue-rgb);
+ --theme-accent: var(--color-purple);
+ --theme-accent-rgb: var(--color-purple-rgb);
--theme-accent-opacity: 0.1;
--theme-divider: var(--color-gray-100);
--theme-text: var(--color-gray-800);
--theme-text-light: var(--color-gray-600);
--theme-text-lighter: var(--color-gray-400);
- --theme-text-accent: var(--color-blue);
+ --theme-text-accent: var(--color-purple);
--theme-bg: var(--color-white);
--theme-bg-hover: var(--color-gray-50);
--theme-bg-offset: var(--color-gray-100);
@@ -53,6 +52,9 @@
--theme-code-inline-text: var(--theme-text);
--theme-code-bg: var(--color-gray-700);
--theme-code-text: var(--color-gray-100);
+ --theme-navbar-bg: var(--color-green);
+ --theme-navbar-height: 3.5rem;
+ --theme-sidebar-offset: var(--theme-navbar-height);
}
body {
@@ -60,6 +62,10 @@ body {
color: var(--theme-text);
}
+:root.scrolled {
+ --theme-sidebar-offset: 0;
+}
+
:root.theme-dark {
color-scheme: dark;
--theme-accent-opacity: 0.3;
@@ -67,17 +73,17 @@ body {
--theme-text: var(--color-gray-200);
--theme-text-light: var(--color-gray-300);
--theme-text-lighter: var(--color-gray-600);
- --theme-text-accent: var(--color-white);
+ --theme-text-accent: #A550FF;
--theme-bg: var(--color-gray-800);
--theme-bg-hover: var(--color-gray-600);
--theme-bg-offset: var(--color-gray-950);
- --theme-code-inline-bg: var(--color-gray-600);
+ --theme-code-inline-bg: var(--color-gray-900);
--theme-code-inline-text: var(--color-white);
--theme-code-bg: var(--color-gray-950);
--theme-code-text: var(--color-white);
}
::selection {
- color: var(--theme-text-accent);
- background-color: rgba(var(--theme-accent-rgb), var(--theme-accent-opacity));
+ color: var(--color-green);
+ background-color: rgba(var(--color-green-rgb), var(--theme-accent-opacity));
}