Improve performance and accessibility
This commit is contained in:
parent
33fdf80443
commit
51350d6257
6 changed files with 19 additions and 13 deletions
|
|
@ -33,7 +33,7 @@ const Description = () => (
|
||||||
<InfoLine label="Hobbies" value="🖖 🎮 🧗 🏃 🧑💻" />
|
<InfoLine label="Hobbies" value="🖖 🎮 🧗 🏃 🧑💻" />
|
||||||
<BlankLine />
|
<BlankLine />
|
||||||
<InfoLine label="Degree" value="B.C.S. Honours" />
|
<InfoLine label="Degree" value="B.C.S. Honours" />
|
||||||
<InfoLine value=" ⤷ Carleton U" />
|
<InfoLine value=" @ Carleton U " />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
// TODO: Generate JXL once it doesn't crash
|
// 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";
|
import hero from "../../assets/MichaelBradley.avif?format=avif;webp;jpeg&as=picture";
|
||||||
|
|
||||||
const ProfilePicture = () => (
|
const ProfilePicture = () => (
|
||||||
|
|
@ -7,7 +8,12 @@ const ProfilePicture = () => (
|
||||||
{Object.entries(hero.sources).map(([format, src]) => (
|
{Object.entries(hero.sources).map(([format, src]) => (
|
||||||
<source srcSet={src} type={`image/${format}`} key={format} />
|
<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>
|
</picture>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,12 @@ const Fetch = () => {
|
||||||
return (
|
return (
|
||||||
<div id="fetch">
|
<div id="fetch">
|
||||||
<ProfilePicture />
|
<ProfilePicture />
|
||||||
<div id="basic-info">
|
<main id="basic-info">
|
||||||
<Description />
|
<Description />
|
||||||
<BlankLine />
|
<BlankLine />
|
||||||
<ColouredLine light={false} />
|
<ColouredLine light={false} />
|
||||||
<ColouredLine light={true} />
|
<ColouredLine light={true} />
|
||||||
</div>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ const ImageLink = ({ href, title, Image }: ImageLinkProps) => (
|
||||||
);
|
);
|
||||||
|
|
||||||
const Links = () => (
|
const Links = () => (
|
||||||
<div className="links">
|
<footer className="links">
|
||||||
<ImageLink href="https://git.mmbradley.ca/MichaelBradley/" title="Forgejo instance" Image={Git} />
|
<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://mstdn.ca/@michaelbradley/" title="Mastodon account" Image={Mastodon} />
|
||||||
<ImageLink href="https://www.linkedin.com/in/michaelmbradley/" title="LinkedIn account" Image={LinkedIn} />
|
<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">
|
<label htmlFor="dark-mode-toggle" id="dark-mode-toggle-label" title="Toggle dark mode" className="footerAction">
|
||||||
<DarkModeToggleIcon width="100%" />
|
<DarkModeToggleIcon width="100%" />
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</footer>
|
||||||
);
|
);
|
||||||
|
|
||||||
export default Links;
|
export default Links;
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 508 KiB After Width: | Height: | Size: 84 KiB |
|
|
@ -246,9 +246,11 @@ p {
|
||||||
}
|
}
|
||||||
|
|
||||||
#michael-photo-container {
|
#michael-photo-container {
|
||||||
max-height: 9lh;
|
height: 9lh;
|
||||||
aspect-ratio: 1;
|
width: 9lh;
|
||||||
align-self: center;
|
align-self: center;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 0.2rem solid var(--highlight);
|
||||||
|
|
||||||
:active {
|
:active {
|
||||||
animation: spin 1s linear infinite forwards;
|
animation: spin 1s linear infinite forwards;
|
||||||
|
|
@ -256,12 +258,10 @@ p {
|
||||||
}
|
}
|
||||||
|
|
||||||
#michael-photo {
|
#michael-photo {
|
||||||
width: 100%;
|
width: 9lh;
|
||||||
aspect-ratio: 1;
|
height: 9lh;
|
||||||
|
text-wrap: wrap;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
object-fit: cover;
|
|
||||||
object-position: 62.5% 0;
|
|
||||||
border: 0.2rem solid var(--highlight);
|
|
||||||
|
|
||||||
@media (prefers-reduced-motion: no-preference) {
|
@media (prefers-reduced-motion: no-preference) {
|
||||||
transition: border ease var(--anim-duration);
|
transition: border ease var(--anim-duration);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue