mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-28 19:49:50 +02:00
Fix accessibility issues
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
// https://astro.build/config
|
// https://astro.build/config
|
||||||
|
import preact from '@astrojs/preact';
|
||||||
import sitemap from '@astrojs/sitemap';
|
import sitemap from '@astrojs/sitemap';
|
||||||
import tailwind from '@astrojs/tailwind';
|
import tailwind from '@astrojs/tailwind';
|
||||||
import { defineConfig } from 'astro/config';
|
|
||||||
import compress from 'astro-compress';
|
import compress from 'astro-compress';
|
||||||
|
import { defineConfig } from 'astro/config';
|
||||||
import rehypeExternalLinks from 'rehype-external-links';
|
import rehypeExternalLinks from 'rehype-external-links';
|
||||||
import { serializeSitemap, shouldIndexPage } from './sitemap.mjs';
|
import { serializeSitemap, shouldIndexPage } from './sitemap.mjs';
|
||||||
import preact from '@astrojs/preact';
|
|
||||||
|
|
||||||
// https://astro.build/config
|
// https://astro.build/config
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
<div class='text-sm sm:text-base leading-relaxed text-left p-2 sm:p-4 text-md text-gray-800 border-t border-t-gray-300 bg-gray-100 rounded-bl-md rounded-br-md [&>p:not(:last-child)]:mb-3 [&>p>a]:underline [&>p>a]:text-blue-500'>
|
<div class='text-sm sm:text-base leading-relaxed text-left p-2 sm:p-4 text-md text-gray-800 border-t border-t-gray-300 bg-gray-100 rounded-bl-md rounded-br-md [&>p:not(:last-child)]:mb-3 [&>p>a]:underline [&>p>a]:text-blue-700'>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
@@ -53,9 +53,8 @@ export function PageSponsor(props: PageSponsorProps) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// We load the sponsor after 1 second of the page load
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
loadSponsor();
|
window.setTimeout(loadSponsor, 500);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
if ($isSponsorHidden || !sponsor) {
|
if ($isSponsorHidden || !sponsor) {
|
||||||
@@ -81,8 +80,6 @@ export function PageSponsor(props: PageSponsorProps) {
|
|||||||
<span
|
<span
|
||||||
class="absolute right-1.5 top-1.5 text-gray-300 hover:text-gray-800"
|
class="absolute right-1.5 top-1.5 text-gray-300 hover:text-gray-800"
|
||||||
aria-label="Close"
|
aria-label="Close"
|
||||||
aria-role="button"
|
|
||||||
close-sponsor
|
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopImmediatePropagation();
|
e.stopImmediatePropagation();
|
||||||
|
@@ -5,7 +5,7 @@ import Footer from '../components/Footer.astro';
|
|||||||
import Navigation from '../components/Navigation/Navigation.astro';
|
import Navigation from '../components/Navigation/Navigation.astro';
|
||||||
import OpenSourceBanner from '../components/OpenSourceBanner.astro';
|
import OpenSourceBanner from '../components/OpenSourceBanner.astro';
|
||||||
import { PageProgress } from '../components/PageProgress';
|
import { PageProgress } from '../components/PageProgress';
|
||||||
import { PageSponsor,PageSponsorType } from '../components/PageSponsor';
|
import { PageSponsor } from '../components/PageSponsor';
|
||||||
import { siteConfig } from '../lib/config';
|
import { siteConfig } from '../lib/config';
|
||||||
import '../styles/global.css';
|
import '../styles/global.css';
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@ const gaPageIdentifier = Astro.url.pathname
|
|||||||
<Analytics />
|
<Analytics />
|
||||||
<Authenticator />
|
<Authenticator />
|
||||||
<PageProgress client:idle />
|
<PageProgress client:idle />
|
||||||
<PageSponsor gaPageIdentifier={briefTitle || gaPageIdentifier} client:idle />
|
<PageSponsor gaPageIdentifier={briefTitle || gaPageIdentifier} client:load />
|
||||||
|
|
||||||
<slot name='after-footer' />
|
<slot name='after-footer' />
|
||||||
</body>
|
</body>
|
||||||
|
Reference in New Issue
Block a user