www: fix accessibility issues (#1243)
Address accessibility issues pointed out by Lighthouse.
This commit is contained in:
@@ -2,7 +2,7 @@ import PageFooter from "../components/Footer.tsx";
|
||||
import Header from "../components/Header.tsx";
|
||||
import ComponentGallery from "../islands/ComponentGallery.tsx";
|
||||
|
||||
import { Head } from "$fresh/runtime.ts";
|
||||
import { asset, Head } from "$fresh/runtime.ts";
|
||||
import { Handlers, PageProps } from "$fresh/server.ts";
|
||||
|
||||
function getSource(path: string) {
|
||||
@@ -30,19 +30,29 @@ export const handler: Handlers<HomeProps> = {
|
||||
},
|
||||
};
|
||||
|
||||
const TITLE = "Components | fresh";
|
||||
const DESCRIPTION = "A collection of components made for Fresh.";
|
||||
|
||||
interface HomeProps {
|
||||
sources: Record<string, string>;
|
||||
}
|
||||
|
||||
export default function Home(props: PageProps<HomeProps>) {
|
||||
const ogImageUrl = new URL(asset("/home-og.png"), props.url).href;
|
||||
return (
|
||||
<div class="bg-white h-full">
|
||||
<Head>
|
||||
<title>Components | fresh</title>
|
||||
<title>{TITLE}</title>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://esm.sh/prismjs@1.27.0/themes/prism-dark.min.css"
|
||||
/>
|
||||
<meta name="description" content={DESCRIPTION} />
|
||||
<meta property="og:title" content={TITLE} />
|
||||
<meta property="og:description" content={DESCRIPTION} />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content={props.url.href} />
|
||||
<meta property="og:image" content={ogImageUrl} />
|
||||
</Head>
|
||||
<Header title="components" active="/components" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user