Add skip to main content button, make things more semantic and accessible.
This commit is contained in:
parent
81bf6d6ed9
commit
19b4026a50
10 changed files with 88 additions and 58 deletions
7
pnpm-lock.yaml
generated
7
pnpm-lock.yaml
generated
|
|
@ -47,6 +47,9 @@ dependencies:
|
||||||
node-fetch:
|
node-fetch:
|
||||||
specifier: ^3.3.2
|
specifier: ^3.3.2
|
||||||
version: 3.3.2
|
version: 3.3.2
|
||||||
|
notyf:
|
||||||
|
specifier: ^3.10.0
|
||||||
|
version: 3.10.0
|
||||||
rammerhead:
|
rammerhead:
|
||||||
specifier: https://github.com/NebulaServices/rammerhead/releases/download/rammerhead-1.2.41-nebula.8/rammerhead-1.2.41-nebula.7.tgz
|
specifier: https://github.com/NebulaServices/rammerhead/releases/download/rammerhead-1.2.41-nebula.8/rammerhead-1.2.41-nebula.7.tgz
|
||||||
version: '@github.com/NebulaServices/rammerhead/releases/download/rammerhead-1.2.41-nebula.8/rammerhead-1.2.41-nebula.7.tgz(bufferutil@4.0.8)'
|
version: '@github.com/NebulaServices/rammerhead/releases/download/rammerhead-1.2.41-nebula.8/rammerhead-1.2.41-nebula.7.tgz(bufferutil@4.0.8)'
|
||||||
|
|
@ -4543,6 +4546,10 @@ packages:
|
||||||
engines: {node: '>=0.10.0'}
|
engines: {node: '>=0.10.0'}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/notyf@3.10.0:
|
||||||
|
resolution: {integrity: sha512-Mtnp+0qiZxgrH+TzVlzhWyZceHdAZ/UWK0/ju9U0HQeDpap1mZ8cC7H5wSI5mwgni6yeAjaxsTw0sbMK+aSuHw==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/npm-run-path@5.3.0:
|
/npm-run-path@5.3.0:
|
||||||
resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==}
|
resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==}
|
||||||
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
|
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,11 @@ const languageList = [
|
||||||
|
|
||||||
<div class="settings-container">
|
<div class="settings-container">
|
||||||
<div class="setting__theme">
|
<div class="setting__theme">
|
||||||
<label class="setting-label">{t("settings.customization.theme")}</label>
|
<label aria-label="Theme" class="setting-label">{t("settings.customization.theme")}</label>
|
||||||
<Dropdown buttonNameDefault="Alu" dropdownList={themeList} id="dropdown__selected-theme" />
|
<Dropdown buttonNameDefault="Alu" dropdownList={themeList} id="dropdown__selected-theme" />
|
||||||
</div>
|
</div>
|
||||||
<div class="setting__language">
|
<div class="setting__language">
|
||||||
<label class="setting-label">{t("settings.customization.language")}</label>
|
<label aria-label="Language" class="setting-label">{t("settings.customization.language")}</label>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
buttonNameDefault="English"
|
buttonNameDefault="English"
|
||||||
dropdownList={languageList}
|
dropdownList={languageList}
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ const transportsList = [
|
||||||
|
|
||||||
<div class="settings-container">
|
<div class="settings-container">
|
||||||
<div class="setting__selected-proxy">
|
<div class="setting__selected-proxy">
|
||||||
<label class="setting-label">{t("settings.proxy.selectedProxy")}</label>
|
<label aria-label="Selected Proxy" class="setting-label">{t("settings.proxy.selectedProxy")}</label>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
buttonNameDefault="Ultraviolet"
|
buttonNameDefault="Ultraviolet"
|
||||||
dropdownList={proxyList}
|
dropdownList={proxyList}
|
||||||
|
|
@ -42,7 +42,7 @@ const transportsList = [
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting__search-engine">
|
<div class="setting__search-engine">
|
||||||
<label class="setting-label">{t("settings.proxy.searchEngine")}</label>
|
<label aria-label="Search Engine" class="setting-label">{t("settings.proxy.searchEngine")}</label>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
buttonNameDefault="Google"
|
buttonNameDefault="Google"
|
||||||
dropdownList={searchEngineList}
|
dropdownList={searchEngineList}
|
||||||
|
|
@ -51,7 +51,7 @@ const transportsList = [
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting__open_with">
|
<div class="setting__open_with">
|
||||||
<label class="setting-label">{t("settings.proxy.openPageWith")}</label>
|
<label aria-label="Open Page With" class="setting-label">{t("settings.proxy.openPageWith")}</label>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
buttonNameDefault={t("settings.proxy.openPageWith.embed")}
|
buttonNameDefault={t("settings.proxy.openPageWith.embed")}
|
||||||
dropdownList={openPageWith}
|
dropdownList={openPageWith}
|
||||||
|
|
@ -60,15 +60,15 @@ const transportsList = [
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting__wisp_url">
|
<div class="setting__wisp_url">
|
||||||
<label for="wisp-url-input" class="setting-label">{t("settings.proxy.wispURL")}</label>
|
<label aria-label="Wisp URL" for="wisp-url-input" class="setting-label">{t("settings.proxy.wispURL")}</label>
|
||||||
<Input height="50px" inputName="wisp-url" />
|
<Input height="50px" inputName="wisp-url" />
|
||||||
</div>
|
</div>
|
||||||
<div class="setting__bare_url">
|
<div class="setting__bare_url">
|
||||||
<label for="bare-url-input" class="setting-label">{t("settings.proxy.bareURL")}</label>
|
<label aria-label="Bare Server URL" for="bare-url-input" class="setting-label">{t("settings.proxy.bareURL")}</label>
|
||||||
<Input height="50px" inputName="bare-url" />
|
<Input height="50px" inputName="bare-url" />
|
||||||
</div>
|
</div>
|
||||||
<div class="setting__transport">
|
<div class="setting__transport">
|
||||||
<label class="setting-label">{t("settings.proxy.transport")}</label>
|
<label aria-label="Wisp Transport" class="setting-label">{t("settings.proxy.transport")}</label>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
buttonNameDefault="Epoxy"
|
buttonNameDefault="Epoxy"
|
||||||
dropdownList={transportsList}
|
dropdownList={transportsList}
|
||||||
|
|
@ -78,6 +78,6 @@ const transportsList = [
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting__searxng-url">
|
<div class="setting__searxng-url">
|
||||||
<label for="searxng-url-input" class="setting-label">{t("settings.proxy.searxngURL")}</label>
|
<label aria-label="SearXNG URL" for="searxng-url-input" class="setting-label">{t("settings.proxy.searxngURL")}</label>
|
||||||
<Input height="50px" inputName="searxng-url" defaultTextContent="https://searxng.site/" />
|
<Input height="50px" inputName="searxng-url" defaultTextContent="https://searxng.site/" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ import WaveSVG from "../WaveSVG.astro";
|
||||||
const t = i18n.inferLangUseTranslations(Astro.url);
|
const t = i18n.inferLangUseTranslations(Astro.url);
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="footer">
|
<footer class="footer">
|
||||||
<div class="wave-svg-container">
|
<div aria-hidden="true" class="wave-svg-container">
|
||||||
<WaveSVG />
|
<WaveSVG />
|
||||||
</div>
|
</div>
|
||||||
<div class="footer-top">
|
<div class="footer-top">
|
||||||
|
|
@ -63,4 +63,4 @@ const t = i18n.inferLangUseTranslations(Astro.url);
|
||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</div>
|
</footer>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ const lang = i18n.getLangFromUrl(Astro.url);
|
||||||
const t = i18n.useTranslations(lang);
|
const t = i18n.useTranslations(lang);
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="top-header">
|
<nav class="top-header">
|
||||||
<div id="title-background" class="title-background">
|
<div id="title-background" class="title-background">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<a href={`/${lang}/`} class="header-item">{t("nav.brand")}</a>
|
<a href={`/${lang}/`} class="header-item">{t("nav.brand")}</a>
|
||||||
|
|
@ -14,7 +14,7 @@ const t = i18n.useTranslations(lang);
|
||||||
<a href={`/${lang}/settings/`} class="header-item">{t("nav.settings")}</a>
|
<a href={`/${lang}/settings/`} class="header-item">{t("nav.settings")}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</nav>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.top-header {
|
.top-header {
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@ const { title, optionalPreloads } = Astro.props;
|
||||||
<ViewTransitions />
|
<ViewTransitions />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<a href="#main-content" class="skip-to-main-content-link">Skip to main content</a>
|
||||||
<Header />
|
<Header />
|
||||||
<slot transition:animate={"fade"} />
|
<slot transition:animate={"fade"} />
|
||||||
<script src="/uv/uv.bundle.js" is:inline transition:persist></script>
|
<script src="/uv/uv.bundle.js" is:inline transition:persist></script>
|
||||||
|
|
@ -116,6 +117,26 @@ const { title, optionalPreloads } = Astro.props;
|
||||||
--dropdown-background-color: #1f1d2e;
|
--dropdown-background-color: #1f1d2e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.skip-to-main-content-link {
|
||||||
|
position: absolute;
|
||||||
|
top: 10px;
|
||||||
|
left: 15px;
|
||||||
|
z-index: 999;
|
||||||
|
padding: 0.75em;
|
||||||
|
padding-inline: 20px;
|
||||||
|
background-color: var(--background-highlight);
|
||||||
|
color: var(--text-color);
|
||||||
|
border-radius: 15px;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 250ms ease-in-out;
|
||||||
|
}
|
||||||
|
.skip-to-main-content-link:focus {
|
||||||
|
top: 10px;
|
||||||
|
left: 15px;
|
||||||
|
opacity: 1;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
body,
|
body,
|
||||||
html {
|
html {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
|
||||||
|
|
@ -3,17 +3,17 @@ import Layout from "../layouts/Layout.astro";
|
||||||
---
|
---
|
||||||
|
|
||||||
<Layout title="404 | Alu">
|
<Layout title="404 | Alu">
|
||||||
<div class="main-content error-page">
|
<main id="main-content" class="main-content error-page">
|
||||||
<h1>404!</h1>
|
<h1>404!</h1>
|
||||||
<p>The content you have requested could not be found!</p>
|
<p>The content you have requested could not be found!</p>
|
||||||
</div>
|
</main>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.error-page {
|
.error-page {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
.main-content {
|
#main-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
||||||
|
|
@ -13,14 +13,14 @@ export function getStaticPaths() {
|
||||||
|
|
||||||
<Layout title={t("pages.games")}>
|
<Layout title={t("pages.games")}>
|
||||||
<h1 class="title-text">{t("games.title")}</h1>
|
<h1 class="title-text">{t("games.title")}</h1>
|
||||||
<div class="grid">
|
<main id="main-content" class="grid">
|
||||||
{
|
{
|
||||||
Object.keys(games).map((key) => {
|
Object.keys(games).map((key) => {
|
||||||
const game = (games as any)[key];
|
const game = (games as any)[key];
|
||||||
return <GameItem name={game.name} image={game.image} slugName={game.slug} />;
|
return <GameItem name={game.name} image={game.image} slugName={game.slug} />;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</div>
|
</main>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ export function getStaticPaths() {
|
||||||
---
|
---
|
||||||
|
|
||||||
<Layout title={t("pages.home")}>
|
<Layout title={t("pages.home")}>
|
||||||
<div class="main-content">
|
<main id="main-content">
|
||||||
<h1 class="title-text">{t("menu.welcome")}</h1>
|
<h1 class="title-text">{t("menu.welcome")}</h1>
|
||||||
<div class="form-wrapper">
|
<div class="form-wrapper">
|
||||||
<form class="url-input-form" id="url-input-form">
|
<form class="url-input-form" id="url-input-form">
|
||||||
|
|
@ -67,7 +67,7 @@ export function getStaticPaths() {
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</main>
|
||||||
<ProxyRegistrar />
|
<ProxyRegistrar />
|
||||||
<script>
|
<script>
|
||||||
import { initTransport, registerSW } from "@components/ts/TransportManager";
|
import { initTransport, registerSW } from "@components/ts/TransportManager";
|
||||||
|
|
@ -142,7 +142,7 @@ export function getStaticPaths() {
|
||||||
|
|
||||||
|
|
||||||
<style is:global>
|
<style is:global>
|
||||||
.main-content {
|
#main-content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 50px;
|
margin-top: 50px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ export function getStaticPaths() {
|
||||||
---
|
---
|
||||||
|
|
||||||
<Layout title={t("pages.settings")}>
|
<Layout title={t("pages.settings")}>
|
||||||
|
<main id="main-content">
|
||||||
<h1 class="title-text">{t("settings.title")}</h1>
|
<h1 class="title-text">{t("settings.title")}</h1>
|
||||||
<div class="content-hidden">
|
<div class="content-hidden">
|
||||||
<div id="content-setting-tab-proxy">
|
<div id="content-setting-tab-proxy">
|
||||||
|
|
@ -53,6 +54,7 @@ export function getStaticPaths() {
|
||||||
</div>
|
</div>
|
||||||
<div id="current-content"></div>
|
<div id="current-content"></div>
|
||||||
</div>
|
</div>
|
||||||
|
</main>
|
||||||
<script is:inline>
|
<script is:inline>
|
||||||
window.loadedContentStorage = {};
|
window.loadedContentStorage = {};
|
||||||
window.currentlySelectedTab;
|
window.currentlySelectedTab;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue