added phone number to contact info

This commit is contained in:
Rick van Lieshout 2022-10-09 16:12:27 +02:00
parent 9c0112d52f
commit 1c137af313
5 changed files with 11 additions and 3 deletions

View File

@ -46,7 +46,7 @@
"email": "info@rickvanlieshout.com",
"github": "mastermindzh",
"facebook": "mastermindzh",
"rss": "",
"rss": "rss.xml",
"twitter": "mastermindzh",
"linkedin": "rickvanlieshout",
"youtube": "RickvanLieshoutt",
@ -57,7 +57,8 @@
"gitlab": "",
"medium": "",
"codepen": "",
"soundcloud": ""
"soundcloud": "",
"phone": "+31614436562"
}
}
}
}

View File

@ -59,6 +59,10 @@ const ICONS = {
path: "M2.846 6.887a.928.928 0 00-.303-.784l-2.24-2.7V3h6.958l5.378 11.795L17.367 3H24v.403L22.084 5.24a.561.561 0 00-.213.538v13.498a.56.56 0 00.213.537l1.871 1.837v.403h-9.412v-.403l1.939-1.882c.19-.19.19-.246.19-.537V8.321l-5.389 13.688h-.728L4.28 8.321v9.174c-.052.385.076.774.347 1.052l2.521 3.058v.404H0v-.404l2.521-3.058c.27-.279.39-.67.325-1.052V6.887z",
viewBox: "0 0 24 24",
},
phone: {
path: "M3.6,7.8 C5,10.6 7.4,12.9 10.2,14.4 L12.4,12.2 C12.7,11.9 13.1,11.8 13.4,12 C14.5,12.4 15.7,12.6 17,12.6 C17.6,12.6 18,13 18,13.6 L18,17 C18,17.6 17.6,18 17,18 C7.6,18 0,10.4 0,1 C0,0.4 0.4,0 1,0 L4.5,0 C5.1,0 5.5,0.4 5.5,1 C5.5,2.2 5.7,3.4 6.1,4.6 C6.2,4.9 6.1,5.3 5.9,5.6 L3.6,7.8 L3.6,7.8 Z",
viewBox: "0 0 18 18",
},
};
export default ICONS;

View File

@ -26,6 +26,7 @@ const useSiteMetadata = () => {
telegram
instagram
soundcloud
phone
}
}
menu {

View File

@ -16,4 +16,5 @@ test("getContactHref", () => {
expect(getContactHref("soundcloud", "#")).toBe("https://soundcloud.com/#");
expect(getContactHref("instagram", "#")).toBe("https://www.instagram.com/#");
expect(getContactHref("linkedin", "#")).toBe("https://www.linkedin.com/in/#");
expect(getContactHref("phone", "+123")).toBe("tel:+123");
});

View File

@ -15,6 +15,7 @@ const getContactHref = (name: string, contact: string) => {
instagram: `https://www.instagram.com/${contact}`,
linkedin: `https://www.linkedin.com/in/${contact}`,
youtube: `https://www.youtube.com/c/${contact}`,
phone: `tel:${contact}`,
};
return hrefs[name] ?? contact;