Skip to content

Commit

Permalink
Merge pull request #31 from schm00g/3-accessibility-lighthouse
Browse files Browse the repository at this point in the history
accessibility lighthouse fixes
  • Loading branch information
schm00g authored Dec 2, 2023
2 parents 643c69a + 371b77c commit 9068310
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 34 deletions.
2 changes: 1 addition & 1 deletion src/components/Experience.astro
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const experience = await getCollection("experience", ({ data }) => {
target="_blank"
rel="noopener"
class="flex flex-row text-black hover:text-purple dark:text-white dark:hover:text-purple"
aria-label="link to repository"
aria-label="View personal github repositories"
>
View personal github repositories
<svg
Expand Down
77 changes: 44 additions & 33 deletions src/components/ui/Card.astro
Original file line number Diff line number Diff line change
@@ -1,41 +1,52 @@
---
import sustainlife from '@assets/images/sustainlife.jpeg';
import axial3d from '@assets/images/axial3d.png';
import pmdsolutionsltd from '@assets/images/pmdsolutionsltd.jpg';
import { Image } from '@astrojs/image/components';
import Tags from '@components/ui/Tags.astro';
import sustainlife from "@assets/images/sustainlife.jpeg";
import axial3d from "@assets/images/axial3d.png";
import pmdsolutionsltd from "@assets/images/pmdsolutionsltd.jpg";
import { Image } from "@astrojs/image/components";
import Tags from "@components/ui/Tags.astro";
interface Props {
url?: string;
alt?: string;
title?: string;
tags: string[];
children?: HTMLElement | HTMLElement[];
url?: string;
alt?: string;
title?: string;
tags: string[];
children?: HTMLElement | HTMLElement[];
}
const { url = '#', alt = 'Project image', title = 'Project title', tags = ['Tags'] } = Astro.props;
const {
url = "#",
alt = "Project image",
title = "Project title",
tags = ["Tags"],
} = Astro.props;
---

<section class="w-full p-4 md:w-1/2 lg:w-1/3">
<article
data-testId="card"
class="rounded-xl bg-white p-3 shadow-lg duration-300 hover:scale-105 hover:transform hover:shadow-xl"
>
<a href={url} aria-label="link to project">
<div class="relative flex items-end overflow-hidden rounded-xl">
<Image
src={[axial3d, pmdsolutionsltd, sustainlife][title.toLowerCase().includes("axial") ? 0 : title.toLowerCase().includes("pmd") ? 1 : 2]}
alt={alt}
aspectRatio="4:4"
format="png"
width={400}
height={400}
loading="eager"
/>
</div>
<div class="mt-1 p-2">
<h3 class="text-xl text-purple lg:text-2xl">{title}</h3>
<Tags tags={tags} />
</div>
</a>
</article>
<article
data-testId="card"
class="rounded-xl bg-white p-3 shadow-lg duration-300 hover:scale-105 hover:transform hover:shadow-xl"
>
<div class="relative flex items-end overflow-hidden rounded-xl">
<Image
src={[axial3d, pmdsolutionsltd, sustainlife][
title.toLowerCase().includes("axial")
? 0
: title.toLowerCase().includes("pmd")
? 1
: 2
]}
alt={alt}
aspectRatio="4:4"
format="png"
width={400}
height={400}
loading="eager"
/>
</div>
<div class="mt-1 p-2">
<a href={url} aria-label={title}>
<h3 class="text-xl text-purple lg:text-2xl">{title}</h3>
</a>
<Tags tags={tags} />
</div>
</article>
</section>

0 comments on commit 9068310

Please sign in to comment.