Improve performance and accessibility
Some checks failed
Audit / Audit (push) Failing after 4s
Push / Build (push) Failing after 2m6s
Push / Lint (push) Failing after 6s

This commit is contained in:
Michael Bradley 2025-11-27 00:21:36 -05:00
parent 33fdf80443
commit 51350d6257
Signed by: MichaelBradley
SSH key fingerprint: SHA256:o/aaeYtRubILK7OYYjYP12DmU7BsPUhKji1AgaQ+ge4
6 changed files with 19 additions and 13 deletions

View file

@ -33,7 +33,7 @@ const Description = () => (
<InfoLine label="Hobbies" value="🖖 🎮 🧗 🏃 🧑‍💻" />
<BlankLine />
<InfoLine label="Degree" value="B.C.S. Honours" />
<InfoLine value=" ⤷ Carleton U" />
<InfoLine value=" @ Carleton U " />
</div>
);

View file

@ -1,4 +1,5 @@
// TODO: Generate JXL once it doesn't crash
// TODO: Use multiple widths once that's working too
import hero from "../../assets/MichaelBradley.avif?format=avif;webp;jpeg&as=picture";
const ProfilePicture = () => (
@ -7,7 +8,12 @@ const ProfilePicture = () => (
{Object.entries(hero.sources).map(([format, src]) => (
<source srcSet={src} type={`image/${format}`} key={format} />
))}
<img src={hero.img.src} alt="A picture of me in a suit smiling" id="michael-photo" />
<img
src={hero.img.src}
alt="A picture of me in winter jumping and smiling in front of a mountain"
id="michael-photo"
fetchPriority="high"
/>
</picture>
</div>
);

View file

@ -7,12 +7,12 @@ const Fetch = () => {
return (
<div id="fetch">
<ProfilePicture />
<div id="basic-info">
<main id="basic-info">
<Description />
<BlankLine />
<ColouredLine light={false} />
<ColouredLine light={true} />
</div>
</main>
</div>
);
};

View file

@ -16,7 +16,7 @@ const ImageLink = ({ href, title, Image }: ImageLinkProps) => (
);
const Links = () => (
<div className="links">
<footer className="links">
<ImageLink href="https://git.mmbradley.ca/MichaelBradley/" title="Forgejo instance" Image={Git} />
<ImageLink href="https://mstdn.ca/@michaelbradley/" title="Mastodon account" Image={Mastodon} />
<ImageLink href="https://www.linkedin.com/in/michaelmbradley/" title="LinkedIn account" Image={LinkedIn} />
@ -24,7 +24,7 @@ const Links = () => (
<label htmlFor="dark-mode-toggle" id="dark-mode-toggle-label" title="Toggle dark mode" className="footerAction">
<DarkModeToggleIcon width="100%" />
</label>
</div>
</footer>
);
export default Links;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 508 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Before After
Before After

View file

@ -246,9 +246,11 @@ p {
}
#michael-photo-container {
max-height: 9lh;
aspect-ratio: 1;
height: 9lh;
width: 9lh;
align-self: center;
border-radius: 50%;
border: 0.2rem solid var(--highlight);
:active {
animation: spin 1s linear infinite forwards;
@ -256,12 +258,10 @@ p {
}
#michael-photo {
width: 100%;
aspect-ratio: 1;
width: 9lh;
height: 9lh;
text-wrap: wrap;
border-radius: 50%;
object-fit: cover;
object-position: 62.5% 0;
border: 0.2rem solid var(--highlight);
@media (prefers-reduced-motion: no-preference) {
transition: border ease var(--anim-duration);