forked from withastro/starlight
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into hd-feat-docs-components
* main: (37 commits) [ci] format i18n(ko-KR): update `manual-setup.mdx` (withastro#2294) i18n(ko-KR): update `configuration.mdx` (withastro#2295) [ci] release (withastro#2292) Add support for SSR (withastro#1255) Add Markdoc preset and example (withastro#2249) Refactor sidebar persistence logic for better slow device performance (withastro#2242) [ci] format Add docs.ryzekit.com to showcase (withastro#2291) Update astro dependency to 4.15.3 across monorepo (withastro#2289) [ci] release (withastro#2290) Prevent Zod errors from crashing build (withastro#2288) i18n(fr): update `guides/css-and-tailwind` (withastro#2286) i18n(ko-KR): update `css-and-tailwind.mdx` (withastro#2284) Add WCAG AAA colour contrast option to theme editor (withastro#2282) [ci] release (withastro#2283) Parse `<StarlightPage />` frontmatter asynchronously (withastro#2279) Ensure unhandled directives are restored without any extra whitespace (withastro#2281) i18n(fr): update `resources/plugins` (withastro#2278) i18n(ko-KR): update `plugins.mdx` (withastro#2277) ...
- Loading branch information
Showing
137 changed files
with
3,201 additions
and
1,212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,5 +26,8 @@ i18n: | |
'🌟 tailwind': | ||
- packages/tailwind/** | ||
|
||
'🌟 markdoc': | ||
- packages/markdoc/** | ||
|
||
'📚 docs': | ||
- docs/** |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"command": "./node_modules/.bin/astro dev", | ||
"cwd": "${workspaceFolder}/docs", | ||
"name": "Development server", | ||
"request": "launch", | ||
"type": "node-terminal" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
--- | ||
export interface Props { | ||
labels: { | ||
label: string; | ||
}; | ||
} | ||
const { labels = { label: 'WCAG Contrast Level' } } = Astro.props; | ||
--- | ||
|
||
<contrast-level-toggle class="sl-flex"> | ||
<fieldset class="not-content"> | ||
<legend>{labels.label}</legend> | ||
<div class="sl-flex"> | ||
<label class="sl-flex"> | ||
<input type="radio" name="contrast-level" value="4.5" checked /> | ||
AA | ||
</label> | ||
<label class="sl-flex"> | ||
<input type="radio" name="contrast-level" value="7" /> | ||
AAA | ||
</label> | ||
</div> | ||
</fieldset> | ||
</contrast-level-toggle> | ||
|
||
<script> | ||
import { minimumContrast } from './store'; | ||
|
||
class ContrastLevelToggle extends HTMLElement { | ||
#fieldset = this.querySelector('fieldset')!; | ||
constructor() { | ||
super(); | ||
this.#fieldset.addEventListener('input', (e) => { | ||
if (e.target instanceof HTMLInputElement) { | ||
const contrast = parseFloat(e.target.value); | ||
minimumContrast.set(contrast); | ||
} | ||
}); | ||
} | ||
} | ||
|
||
customElements.define('contrast-level-toggle', ContrastLevelToggle); | ||
</script> | ||
|
||
<style> | ||
fieldset { | ||
border: 0; | ||
padding: 0; | ||
} | ||
fieldset > * { | ||
float: left; | ||
float: inline-start; | ||
vertical-align: middle; | ||
} | ||
legend { | ||
color: var(--sl-color-white); | ||
margin-inline-end: 0.75rem; | ||
} | ||
label { | ||
align-items: center; | ||
padding: 0.25rem 0.75rem; | ||
gap: 0.375rem; | ||
background-color: var(--sl-color-gray-6); | ||
font-size: var(--sl-text-xs); | ||
cursor: pointer; | ||
} | ||
label:has(:focus-visible) { | ||
outline: 2px solid; | ||
outline-offset: -4px; | ||
} | ||
label:first-child { | ||
border-start-start-radius: 99rem; | ||
border-end-start-radius: 99rem; | ||
} | ||
label:last-child { | ||
border-start-end-radius: 99rem; | ||
border-end-end-radius: 99rem; | ||
} | ||
label:has(:checked) { | ||
color: var(--sl-color-black); | ||
background-color: var(--sl-color-text-accent); | ||
} | ||
input:focus-visible { | ||
outline: none; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.