summaryrefslogtreecommitdiff
path: root/examples/docs/public
diff options
context:
space:
mode:
Diffstat (limited to 'examples/docs/public')
-rw-r--r--examples/docs/public/code.css155
-rw-r--r--examples/docs/public/favicon.svg11
-rw-r--r--examples/docs/public/index.css350
-rw-r--r--examples/docs/public/theme.css73
-rw-r--r--examples/docs/public/theme.js8
5 files changed, 597 insertions, 0 deletions
diff --git a/examples/docs/public/code.css b/examples/docs/public/code.css
new file mode 100644
index 000000000..54b2c5094
--- /dev/null
+++ b/examples/docs/public/code.css
@@ -0,0 +1,155 @@
+.language-css > code,
+.language-sass > code,
+.language-scss > code {
+ color: #fd9170;
+}
+
+[class*="language-"] .namespace {
+ opacity: 0.7;
+}
+
+.token.atrule {
+ color: #c792ea;
+}
+
+.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;
+}
+
+.token.class-name {
+ color: #f2ff00;
+}
+
+.token.comment {
+ color: #616161;
+}
+
+.token.constant {
+ color: #c792ea;
+}
+
+.token.deleted {
+ color: #ff6666;
+}
+
+.token.doctype {
+ color: #616161;
+}
+
+.token.entity {
+ color: #ff6666;
+}
+
+.token.function {
+ color: #c792ea;
+}
+
+.token.hexcode {
+ color: #f2ff00;
+}
+
+.token.id {
+ color: #c792ea;
+ font-weight: bold;
+}
+
+.token.important {
+ color: #c792ea;
+ font-weight: bold;
+}
+
+.token.inserted {
+ color: #80cbc4;
+}
+
+.token.keyword {
+ color: #c792ea;
+}
+
+.token.number {
+ color: #fd9170;
+}
+
+.token.operator {
+ color: #89ddff;
+}
+
+.token.prolog {
+ color: #616161;
+}
+
+.token.property {
+ color: #80cbc4;
+}
+
+.token.pseudo-class {
+ color: #a5e844;
+}
+
+.token.pseudo-element {
+ color: #a5e844;
+}
+
+.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;
+}
diff --git a/examples/docs/public/favicon.svg b/examples/docs/public/favicon.svg
new file mode 100644
index 000000000..542f90aec
--- /dev/null
+++ b/examples/docs/public/favicon.svg
@@ -0,0 +1,11 @@
+<svg width="256" height="256" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <style>
+ #flame { fill: #FF5D01; }
+ #a { fill: #000014; }
+ @media (prefers-color-scheme: dark) {
+ #a { fill: #fff; }
+ }
+ </style>
+ <path id="a" fill-rule="evenodd" clip-rule="evenodd" d="M163.008 18.929c1.944 2.413 2.935 5.67 4.917 12.181l43.309 142.27a180.277 180.277 0 00-51.778-17.53l-28.198-95.29a3.67 3.67 0 00-7.042.01l-27.857 95.232a180.225 180.225 0 00-52.01 17.557l43.52-142.281c1.99-6.502 2.983-9.752 4.927-12.16a15.999 15.999 0 016.484-4.798c2.872-1.154 6.271-1.154 13.07-1.154h31.085c6.807 0 10.211 0 13.086 1.157a16.004 16.004 0 016.487 4.806z" />
+ <path id="flame" fill-rule="evenodd" clip-rule="evenodd" d="M168.19 180.151c-7.139 6.105-21.39 10.268-37.804 10.268-20.147 0-37.033-6.272-41.513-14.707-1.602 4.835-1.961 10.367-1.961 13.902 0 0-1.056 17.355 11.015 29.426 0-6.268 5.081-11.349 11.349-11.349 10.743 0 10.731 9.373 10.721 16.977v.679c0 11.542 7.054 21.436 17.086 25.606a23.27 23.27 0 01-2.339-10.2c0-11.008 6.463-15.107 13.974-19.87 5.976-3.79 12.616-8.001 17.192-16.449a31.024 31.024 0 003.743-14.82c0-3.299-.513-6.479-1.463-9.463z" />
+</svg>
diff --git a/examples/docs/public/index.css b/examples/docs/public/index.css
new file mode 100644
index 000000000..c5ae87f5c
--- /dev/null
+++ b/examples/docs/public/index.css
@@ -0,0 +1,350 @@
+@import './theme';
+@import './code';
+
+* {
+ box-sizing: border-box;
+ margin: 0;
+}
+
+:root {
+ --user-font-scale: 1rem - 16px;
+ --max-width: calc(100% - 2rem);
+}
+
+@media (min-width: 50em) {
+ :root {
+ --max-width: 48em;
+ }
+}
+
+body {
+ display: flex;
+ flex-direction: column;
+ 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;
+}
+
+nav ul {
+ list-style: none;
+ padding: 0;
+}
+
+.content main > * + * {
+ margin-top: 1rem;
+}
+
+/* Typography */
+:is(h1, h2, h3, h4, h5, h6) {
+ margin-bottom: 1.38rem;
+ font-weight: 400;
+ line-height: 1.3;
+}
+
+:is(h1, h2) {
+ max-width: 40ch;
+}
+
+:is(h2, h3):not(:first-child) {
+ margin-top: 3rem;
+}
+
+h1 {
+ font-size: clamp(2.488rem, 1.9240rem + 1.4100vw, 3.052rem);
+}
+
+h2 {
+ font-size: clamp(2.074rem, 1.7070rem + 0.9175vw, 2.441rem);
+}
+
+h3 {
+ font-size: clamp(1.728rem, 1.5030rem + 0.5625vw, 1.953rem);
+}
+
+h4 {
+ font-size: clamp(1.44rem, 1.3170rem + 0.3075vw, 1.563rem);
+}
+
+h5 {
+ font-size: clamp(1.2rem, 1.1500rem + 0.1250vw, 1.25rem);
+}
+
+p {
+ color: var(--theme-text-light);
+}
+
+small, .text_small {
+ font-size: 0.833rem;
+}
+
+a {
+ color: var(--theme-accent);
+ font-weight: 400;
+ text-underline-offset: 0.08em;
+ text-decoration: none;
+ display: inline-flex;
+ align-items: center;
+ gap: 0.5rem;
+}
+
+a > code:not([class*="language"]) {
+ position: relative;
+ color: var(--theme-accent);
+ background: transparent;
+ text-underline-offset: var(--padding-block);
+}
+
+a > code:not([class*="language"])::before {
+ content: '';
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ display: block;
+ background: var(--theme-accent);
+ opacity: var(--theme-accent-opacity);
+ border-radius: var(--border-radius);
+}
+
+a:hover,
+a:focus {
+ text-decoration: underline;
+}
+
+a:focus {
+ outline: 2px solid currentColor;
+ outline-offset: 0.25em;
+}
+
+strong {
+ font-weight: 600;
+ color: inherit;
+}
+
+/* Supporting Content */
+
+code:not([class*="language"]) {
+ --border-radius: 3px;
+ --padding-block: 0.2rem;
+ --padding-inline: 0.33rem;
+
+ font-family: var(--font-mono);
+ font-size: .85em;
+ color: inherit;
+ background-color: var(--theme-code-inline-bg);
+ padding: var(--padding-block) var(--padding-inline);
+ margin: calc(var(--padding-block) * -1) -0.125em;
+ border-radius: var(--border-radius);
+}
+
+pre > code:not([class*="language"]) {
+ background-color: transparent;
+ padding: 0;
+ margin: 0;
+ border-radius: 0;
+ color: inherit;
+}
+
+pre {
+ position: relative;
+ background-color: var(--theme-code-bg);
+ color: var(--theme-code-text);
+ --padding-block: 1rem;
+ --padding-inline: 2rem;
+ padding: var(--padding-block) var(--padding-inline);
+ padding-right: calc(var(--padding-inline) * 2);
+ margin-left: calc(50vw - var(--padding-inline));
+ transform: translateX(-50vw);
+
+ line-height: 1.414;
+ width: calc(100vw + 4px);
+ max-width: calc(100% + (var(--padding-inline) * 2));
+ overflow-y: hidden;
+ overflow-x: auto;
+}
+
+@media (min-width: 37.75em) {
+ pre {
+ --padding-inline: 1.25rem;
+ border-radius: 8px;
+ }
+}
+
+blockquote {
+ margin: 2rem 0;
+ padding: 0.5em 1rem;
+ border-left: 3px solid rgba(0, 0, 0, 0.35);
+ background-color: rgba(0, 0, 0, 0.05);
+ border-radius: 0 0.25rem 0.25rem 0;
+}
+
+.flex {
+ display: flex;
+ align-items: center;
+}
+
+header button {
+ background-color: var(--theme-bg);
+}
+header button:hover,
+header button:focus {
+ background: var(--theme-text);
+ color: var(--theme-bg);
+}
+
+button {
+ display: flex;
+ align-items: center;
+ justify-items: center;
+ gap: 0.25em;
+ padding: 0.33em 0.67em;
+ border: 0;
+ background: var(--theme-bg);
+ display: flex;
+ font-size: 1rem;
+ align-items: center;
+ gap: 0.25em;
+ border-radius: 99em;
+ background-color: var(--theme-bg);
+}
+button:hover {
+
+}
+
+#theme-toggle {
+ display: flex;
+ align-items: center;
+ gap: 0.25em;
+ padding: 0.33em 0.67em;
+ margin-left: -0.67em;
+ margin-right: -0.67em;
+ border-radius: 99em;
+ background-color: var(--theme-bg);
+}
+#theme-toggle:focus-within {
+ outline: 2px solid transparent;
+ box-shadow: 0 0 0 0.08em var(--theme-accent), 0 0 0 0.12em white;
+}
+
+#theme-toggle > label {
+ position: relative;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 1.5rem;
+ width: 1.5rem;
+ height: 1.5rem;
+ opacity: 0.5;
+ transition: transform 120ms ease-out, opacity 120ms ease-out;
+}
+
+#theme-toggle > label:hover,
+#theme-toggle > label:focus {
+ transform: scale(1.125);
+ opacity: 1;
+}
+
+#theme-toggle .checked {
+ color: var(--theme-accent);
+ transform: scale(1.125);
+ opacity: 1;
+}
+
+input[name="theme-toggle"] {
+ position: absolute;
+ opacity: 0;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: -1;
+}
+
+nav h4 {
+ font-weight: 400;
+ font-size: 1.25rem;
+ margin: 0;
+ margin-bottom: 1em;
+}
+
+.edit-on-github,
+.header-link {
+ font-size: 1rem;
+ padding-left: 1rem;
+ border-left: 4px solid var(--theme-divider);
+}
+
+.edit-on-github:hover,
+.edit-on-github:focus,
+.header-link:hover,
+.header-link:focus {
+ color: var(--theme-text-light);
+ border-left-color: var(--theme-text-lighter);
+}
+
+.header-link:focus-within {
+ color: var(--theme-text-light);
+ border-left-color: var(--theme-text-lighter);
+}
+
+.header-link.active {
+ border-left-color: var(--theme-accent);
+ color: var(--theme-accent);
+}
+
+.header-link.depth-2 {
+ font-weight: 600;
+}
+
+.header-link.depth-3 {
+ padding-left: 2rem;
+}
+.header-link.depth-4 {
+ padding-left: 3rem;
+}
+
+.edit-on-github,
+.header-link a {
+ font: inherit;
+ color: inherit;
+ text-decoration: none;
+}
+
+.edit-on-github {
+ margin-top: 2rem;
+ text-decoration: none;
+}
+.edit-on-github > * {
+ text-decoration: none;
+}
+
+.nav-link {
+ font-size: 1rem;
+ margin-bottom: 0;
+ transform: translateX(0);
+ transition: 120ms transform ease-out;
+}
+
+.nav-link:hover,
+.nav-link:focus {
+ color: var(--theme-text-lighter);
+ transform: translateX(0.25em);
+}
+
+.nav-link:focus-within {
+ color: var(--theme-text-lighter);
+ transform: translateX(0.25em);
+}
+
+.nav-link a {
+ font: inherit;
+ color: inherit;
+ text-decoration: none;
+}
+
+.nav-groups > li + li {
+ margin-top: 2rem;
+}
diff --git a/examples/docs/public/theme.css b/examples/docs/public/theme.css
new file mode 100644
index 000000000..d381604c8
--- /dev/null
+++ b/examples/docs/public/theme.css
@@ -0,0 +1,73 @@
+:root {
+ --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;
+
+ --color-white: #FFF;
+ --color-black: #000014;
+
+ --color-gray-50: #F9FAFB;
+ --color-gray-100: #F3F4F6;
+ --color-gray-200: #E5E7EB;
+ --color-gray-300: #D1D5DB;
+ --color-gray-400: #9CA3AF;
+ --color-gray-500: #6B7280;
+ --color-gray-600: #4B5563;
+ --color-gray-700: #374151;
+ --color-gray-800: #1F2937;
+ --color-gray-900: #111827;
+
+ --color-blue: #3894FF;
+ --color-blue-rgb: 56,148,255;
+ --color-green: #17C083;
+ --color-green-rgb: 23,192,131;
+ --color-orange: #FF5D01;
+ --color-orange-rgb: 255,93,1;
+ --color-purple: #882DE7;
+ --color-purple-rgb: 136,45,231;
+ --color-red: #FF1639;
+ --color-red-rgb: 255,22,57;
+ --color-yellow: #FFBE2D;
+ --color-yellow-rgb: 255,190,45;
+}
+
+:root {
+ color-scheme: light;
+ --theme-accent: var(--color-blue);
+ --theme-accent-rgb: var(--color-blue-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-bg: var(--color-white);
+ --theme-bg-offset: var(--color-gray-100);
+ --theme-bg-accent: rgba(var(--theme-accent-rgb), var(--theme-accent-opacity));
+ --theme-code-inline-bg: var(--color-gray-100);
+ --theme-code-text: var(--color-gray-100);
+ --theme-code-bg: var(--color-gray-700);
+}
+
+body {
+ background: var(--theme-bg);
+ color: var(--theme-text);
+}
+
+:root.theme-dark {
+ color-scheme: dark;
+ --theme-accent-opacity: 0.3;
+ --theme-divider: var(--color-gray-900);
+ --theme-text: var(--color-gray-200);
+ --theme-text-light: var(--color-gray-400);
+ --theme-text-lighter: var(--color-gray-600);
+ --theme-bg: var(--color-black);
+ --theme-bg-offset: var(--color-gray-900);
+ --theme-code-inline-bg: var(--color-gray-800);
+ --theme-code-text: var(--color-gray-200);
+ --theme-code-bg: var(--color-gray-900);
+}
+
+::selection {
+ color: var(--theme-accent);
+ background-color: rgba(var(--theme-accent-rgb), var(--theme-accent-opacity));
+}
diff --git a/examples/docs/public/theme.js b/examples/docs/public/theme.js
new file mode 100644
index 000000000..d75d0bf99
--- /dev/null
+++ b/examples/docs/public/theme.js
@@ -0,0 +1,8 @@
+(() => {
+ const root = document.documentElement;
+ if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
+ root.classList.add('theme-dark');
+ } else {
+ root.classList.remove('theme-dark');
+ }
+})();