Skip to content

Commit e5aeb42

Browse files
authored
Merge pull request #1 from simonkovtyk/perf/insights
perf: insights and accessibility improved
2 parents c2886c8 + 38c8ce8 commit e5aeb42

File tree

6 files changed

+15
-21
lines changed

6 files changed

+15
-21
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ jobs:
3131
strip_components: 1
3232
source: "dist/"
3333
target: "/var/www"
34+
rm: true

src/components/Button.astro

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@ interface Props {
44
link?: string;
55
target?: string;
66
className?: string;
7+
ariaLabel?: string;
78
}
89
9-
const { type, link, target, className } = Astro.props;
10+
const { type, link, target, className, ariaLabel } = Astro.props;
1011
---
1112
{ type === "button" &&
1213
<button class:list={["flex justify-center items-center gap-2 p-2 bg-zinc-300 rounded-xl text-zinc-800 hover:text-zinc-600 transition-colors", className ]}>
1314
<slot />
1415
</button>
1516
}
1617
{ type === "link" &&
17-
<a href={link} target={target} class="flex justify-center items-center p-2 bg-zinc-300 rounded-xl text-zinc-800 hover:text-zinc-600 transition-colors">
18+
<a aria-label={ariaLabel} href={link} target={target} class="flex justify-center items-center p-2 bg-zinc-300 rounded-xl text-zinc-800 hover:text-zinc-600 transition-colors">
1819
<slot />
1920
</a>
2021
}

src/components/Header.astro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ import Button from "./Button.astro";
33
import Icon from "./Icon.astro";
44
---
55
<section class="flex flex-col items-start justify-start">
6-
<img alt="Picture of Simon Kovtyk" class="bg-zinc-700 w-72 rounded-3xl mb-12" src="/profile.webp" />
6+
<img alt="Picture of Simon Kovtyk" class="bg-zinc-700 w-72 rounded-3xl mb-12" width="512" height="512" src="/profile.webp" />
77
<h1 class="text-4xl font-semibold text-zinc-300 mb-4">Simon Kovtyk</h1>
88
<p class="text-2xl font-regular text-zinc-400">Software-Developer passionated in CI/CD, Architecture and Dev-Environments</p>
99
<div class="flex flex-wrap items-center gap-4 mt-8">
10-
<Button type="link" link="https://github.com/simonkovtyk" target="_blank">
10+
<Button ariaLabel="Visit my GitHub profile" type="link" link="https://github.com/simonkovtyk" target="_blank">
1111
<Icon name="github" width={24} height={24} />
1212
</Button>
13-
<Button type="link" link="https://www.npmjs.com/~simonkov" target="_blank">
13+
<Button ariaLabel="Visit my npm profile" type="link" link="https://www.npmjs.com/~simonkov" target="_blank">
1414
<Icon name="npm" width={24} height={24} />
1515
</Button>
16-
<Button type="link" link="https://x.com/simonkovtyk" target="_blank">
16+
<Button ariaLabel="Visit my X profile" type="link" link="https://x.com/simonkovtyk" target="_blank">
1717
<Icon name="twitter-x" width={24} height={24} />
1818
</Button>
1919
<div class="flex justify-center items-center gap-4">

src/components/PGP.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import Icon from "./Icon.astro";
4343
</script>
4444
<section class="flex flex-col items-start justify-start mt-24">
4545
<h2 class="text-2xl font-semibold text-zinc-300 mb-4">Public PGP Key</h2>
46-
<textarea readonly class="text-sm outline-none w-full h-72 text-zinc-400 border border-zinc-700 bg-[unset] p-4 rounded-xl text-wrap break-all select-text resize-none pgp-copy-text mb-4">
46+
<textarea aria-label="My Public PGP Key" readonly rows="2" cols="20" class="text-sm outline-none w-full h-72 text-zinc-400 border border-zinc-700 bg-[unset] p-4 rounded-xl text-wrap break-all select-text resize-none pgp-copy-text mb-4">
4747
-----BEGIN PGP PUBLIC KEY BLOCK-----
4848

4949
mQINBGb4E4gBEADDg8IiWYUpBndFowo9kVY6ycqMFbeNrvcwZqsEOpQh4uPiU2QD

src/layouts/Root.astro

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
---
22
import "../app.css";
3-
4-
interface Props {
5-
title: string;
6-
}
7-
8-
const { title } = Astro.props;
93
---
10-
114
<!DOCTYPE html>
125
<html lang="en">
136
<head>
147
<meta charset="UTF-8" />
158
<meta name="viewport" content="width=device-width" />
16-
<title>{title}</title>
179
<link rel="manifest" href="manifest.json" />
10+
<slot name="head" />
1811
</head>
1912
<body class="bg-zinc-800">
20-
<slot />
13+
<slot name="body" />
2114
</body>
2215
</html>
2316

src/pages/index.astro

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ import Root from "../layouts/Root.astro";
33
import Header from "../components/Header.astro";
44
import PGP from "../components/PGP.astro";
55
---
6-
<Root title="Portfolio">
7-
<main class="w-full flex flex-col items-center my-[max(2rem,5vw)] px-8">
6+
<Root>
7+
<title slot="head">Simon Kovtyk</title>
8+
<meta slot="head" name="description" content="Explore my portfolio as a Software Developer passionate about CI/CD, Architecture, and Development Environments 💻. Discover my work and projects." />
9+
<main class="w-full flex flex-col items-center my-[max(2rem,5vw)] px-8" slot="body">
810
<div class="max-w-[1000px]">
911
<Header />
1012
<PGP />
1113
</div>
1214
</main>
1315
</Root>
14-
<script>
15-
16-
</script>
1716

0 commit comments

Comments
 (0)