Skip to content

Commit 900798d

Browse files
committed
Add a Bluesky logo to the home page
I removed Twitter in 6f15a26. I haven't used it much but I intend to use Bluesky instead.
1 parent 1104349 commit 900798d

File tree

4 files changed

+54
-1
lines changed

4 files changed

+54
-1
lines changed

components/icon/index.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import folderIcon from "./svgs/folder";
99
import linkIcon from "./svgs/link";
1010
import creativeCommonsIcon from "./svgs/creativeCommons";
1111
import githubIcon from "./svgs/github";
12+
import blueskyIcon from "./svgs/bluesky";
1213

1314
/* eslint-disable no-unused-vars */
1415
enum IconNames {
@@ -21,6 +22,7 @@ enum IconNames {
2122
Tag,
2223

2324
GitHub,
25+
Bluesky,
2426
CreativeCommons,
2527
}
2628

@@ -53,6 +55,8 @@ function iconSvgByName(name: IconNames): React.ReactElement {
5355
return creativeCommonsIcon();
5456
case IconNames.GitHub:
5557
return githubIcon();
58+
case IconNames.Bluesky:
59+
return blueskyIcon();
5660
}
5761
exhasutiveCheck(name);
5862
}

components/icon/svgs/bluesky.tsx

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Official Bluesky logo from Wikimedia Commons
2+
// https://upload.wikimedia.org/wikipedia/commons/7/7a/Bluesky_Logo.svg
3+
export default function BlueskyIcon() {
4+
return (
5+
<svg width="64" height="64" viewBox="0 0 16.196743 14.260887">
6+
<g transform="translate(-0.48130957,-1.0996394)">
7+
<path
8+
d="M 3.9921673,2.0595724 C 5.849085,3.453629 7.8464109,6.2801954 8.5797285,7.7970955 9.3131012,6.280307 11.310315,3.453601 13.167288,2.0595724 c 1.339854,-1.0058955 3.510765,-1.78420027 3.510765,0.6924068 0,0.4946119 -0.283582,4.1549986 -0.449906,4.7492481 -0.578135,2.0660219 -2.684846,2.5929717 -4.558796,2.2740374 3.275631,0.5574993 4.108922,2.4041413 2.309333,4.2507833 C 10.560913,17.533182 9.0663535,13.146095 8.6832195,12.021964 8.6130152,11.815883 8.5801638,11.719477 8.5796807,11.801455 8.5791886,11.719472 8.5463466,11.815886 8.4761425,12.021964 8.0931756,13.146095 6.5986437,17.533292 3.1806762,14.026048 1.3810612,12.179406 2.2143228,10.332652 5.4900112,9.7752647 3.6160031,10.094199 1.509266,9.5672466 0.93121324,7.5012273 0.76488501,6.9069222 0.48130957,3.2465354 0.48130957,2.7519792 c 0,-2.47660707 2.17096513,-1.6983023 3.51076313,-0.6924068 z"
9+
strokeWidth="0.0279251"
10+
/>
11+
</g>
12+
</svg>
13+
);
14+
}

e2e_tests/landingPage.test.ts

+30
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,36 @@ describe("/ (Landing Page)", () => {
2020
expect(await page.title()).toEqual(LANDING_PAGE.expected.title);
2121
});
2222

23+
it("should have GitHub social link with proper attributes", async () => {
24+
await loadPage(page, LANDING_PAGE.url);
25+
26+
const githubLink = await page.$('a[aria-label="GitHub"]');
27+
expect(githubLink).not.toBeNull();
28+
29+
const href = await githubLink?.evaluate((el) => el.getAttribute("href"));
30+
expect(href).toBe("https://github.com/hockeybuggy");
31+
});
32+
33+
it("should have Bluesky social link with proper attributes", async () => {
34+
await loadPage(page, LANDING_PAGE.url);
35+
36+
const blueskyLink = await page.$('a[aria-label="Bluesky"]');
37+
expect(blueskyLink).not.toBeNull();
38+
39+
const href = await blueskyLink?.evaluate((el) => el.getAttribute("href"));
40+
expect(href).toBe("https://bsky.app/profile/hockeybuggy.bsky.social");
41+
});
42+
43+
it("should have Email social link with proper attributes", async () => {
44+
await loadPage(page, LANDING_PAGE.url);
45+
46+
const emailLink = await page.$('a[aria-label="Email"]');
47+
expect(emailLink).not.toBeNull();
48+
49+
const href = await emailLink?.evaluate((el) => el.getAttribute("href"));
50+
expect(href).toBe("mailto:[email protected]");
51+
});
52+
2353
describe("screenshots", () => {
2454
test("iPhone light", async () => {
2555
await loadPage(page, LANDING_PAGE.url, "iPhone 6");

pages/index.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ const social = [
1414
link: "https://github.com/hockeybuggy",
1515
iconName: Icon.Names.GitHub,
1616
},
17+
{
18+
label: "Bluesky",
19+
link: "https://bsky.app/profile/hockeybuggy.bsky.social",
20+
iconName: Icon.Names.Bluesky,
21+
},
1722
{
1823
label: "Email",
1924
link: "mailto:[email protected]",
@@ -68,7 +73,7 @@ const IndexPage = (): React.ReactElement => {
6873
name={socialSite.iconName}
6974
size={Icon.Sizes.Large}
7075
aria-hidden="true"
71-
label=""
76+
label={"Icon for " + socialSite.label}
7277
/>
7378
</a>
7479
</li>

0 commit comments

Comments
 (0)