Skip to content

Commit

Permalink
svgs: Phone, Email, Website, X, Substack
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRedacted committed Sep 19, 2024
1 parent da16f06 commit eb2e405
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
3 changes: 2 additions & 1 deletion card.html
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ <h1>Phone</h1>
icon.classList.add("icon");
if (contact.icon) {
// Fetch the SVG icon and insert it inline
const svgContent = await fetchSVG(contact.icon);
const svgURL = "cardAssets/icons/" + contact.contactType + ".svg";
const svgContent = await fetchSVG(svgURL);
icon.innerHTML = svgContent; // Insert the SVG content
icon.src = contact.icon;
icon.alt = `${contact.contactType} icon`;
Expand Down
2 changes: 1 addition & 1 deletion cardAssets/contacts.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"shape": "square"
},
{
"contactType": "Substacked",
"contactType": "Substack",
"display": true,
"value": "@Username",
"link": "https://Username.substack.com",
Expand Down
File renamed without changes
9 changes: 9 additions & 0 deletions cardAssets/icons/Substack.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions cardAssets/icons/X.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit eb2e405

Please sign in to comment.