From 14140d1909a06274baf2db60a44e6e9c1321f812 Mon Sep 17 00:00:00 2001 From: danielRedacted Date: Tue, 17 Sep 2024 17:15:14 -0700 Subject: [PATCH] added icon radius to json --- card.html | 7 ++++++- cardAssets/contacts.json | 18 ++++++++++++------ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/card.html b/card.html index 9947d02..c5e7a19 100644 --- a/card.html +++ b/card.html @@ -159,7 +159,7 @@ height:100%; aspect-ratio:1/1; top:0; left:-22px; - border-radius:50%; + /* border-radius:50%; */ background-color:#444; padding:auto; overflow:hidden; @@ -253,6 +253,11 @@

Phone

icon.src = contact.icon; icon.alt = `${contact.contactType} icon`; } + if (contact.shape == "circle") { + icon.style.borderRadius = "50%;" + } else { + icon.style.borderRadius = "8px;" + } button.appendChild(icon); const arrow = document.createElement('div'); diff --git a/cardAssets/contacts.json b/cardAssets/contacts.json index 2ad2c26..da0be28 100644 --- a/cardAssets/contacts.json +++ b/cardAssets/contacts.json @@ -5,42 +5,48 @@ "display": true, "value": "DanielRedacted.net", "link": "https://DanielRedacted.net", - "icon": "cardAssets/icons/website.svg" + "icon": "cardAssets/icons/website.svg", + "shape": "circle" }, { "contactType": "Email", "display": true, "value": "Him@DanielRedacted.net", "link": "mailto:Him@DanielRedacted.net", - "icon": "cardAssets/icons/mail.svg" + "icon": "cardAssets/icons/mail.svg", + "shape": "circle" }, { "contactType": "Phone", "display": true, "value": "+1-000-000-0000", "link": "tel:+10000000000", - "icon": "cardAssets/icons/phone.svg" + "icon": "cardAssets/icons/phone.svg", + "shape": "circle" }, { "contactType": "LinkedIn", "display": true, "value": "", "link": "https://www.linkedin.com/in/username", - "icon": "" + "icon": "", + "shape": "square" }, { "contactType": "X", "display": true, "value": "@DanielRedacted", "link": "https://x.com/DanielRedacted", - "icon": "" + "icon": "", + "shape": "square" }, { "contactType": "Instagram", "display": true, "value": "@DanielRedacted", "link": "https://www.instagram.com/DanielRedacted", - "icon": "" + "icon": "", + "shape": "square" } ] }