From e5c176e0b95595d0dd206ab7e11e3873ee499ce4 Mon Sep 17 00:00:00 2001 From: Eshaan Aggarwal <96648934+EshaanAgg@users.noreply.github.com> Date: Sun, 2 Oct 2022 19:37:38 +0530 Subject: [PATCH 1/4] Add default avatar for team page --- components/sdgCard.vue | 29 +++++++++++++++++++++++++---- content/members/members.json | 7 ------- pages/contact/index.vue | 7 +------ 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/components/sdgCard.vue b/components/sdgCard.vue index c9c3004..2d231bb 100644 --- a/components/sdgCard.vue +++ b/components/sdgCard.vue @@ -9,13 +9,13 @@ " > -
+

{{ name }}

@@ -76,8 +76,9 @@
+ @@ -166,4 +186,5 @@ export default defineComponent({ transform: scaleY(0); transform-origin: center center -20px; } + diff --git a/content/members/members.json b/content/members/members.json index b12e47e..721da72 100644 --- a/content/members/members.json +++ b/content/members/members.json @@ -411,12 +411,5 @@ "github": "https://github.com/PaarthAgarwal", "link": "https://www.linkedin.com/in/paarth-agarwal-2291911b8/", "year": 2020 - }, - { - "name": "Eshaan Aggarwal", - "title": "Web Developer", - "github": "https://github.com/EshaanAgg", - "link": "https://www.linkedin.com/in/eshaan-aggarwal/", - "year": 2021 } ] diff --git a/pages/contact/index.vue b/pages/contact/index.vue index a1198f1..7ba519d 100644 --- a/pages/contact/index.vue +++ b/pages/contact/index.vue @@ -2,7 +2,7 @@
- Contact Us + Contact Us
From 1ed99048b62f2ff84ef0ad468c2d683c2321cf57 Mon Sep 17 00:00:00 2001 From: Eshaan Aggarwal <96648934+EshaanAgg@users.noreply.github.com> Date: Sun, 2 Oct 2022 22:32:47 +0530 Subject: [PATCH 2/4] add fix --- components/sdgCard.vue | 4 ++-- pages/contact/index.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/sdgCard.vue b/components/sdgCard.vue index 2d231bb..40e7135 100644 --- a/components/sdgCard.vue +++ b/components/sdgCard.vue @@ -15,7 +15,7 @@ loading="lazy" width="200" height="200" /> -
+

{{ name }}

@@ -125,7 +125,7 @@ export default defineComponent({ avatarURL.value = props.imageUrl; } else { - var parts = props.name.split(" ") + const parts = props.name.split(" ") avatarURL.value = `https://ui-avatars.com/api/?name=${parts[0]}+${parts[1]}&&size=200&&rounded=true` } }) diff --git a/pages/contact/index.vue b/pages/contact/index.vue index 7ba519d..4b587ed 100644 --- a/pages/contact/index.vue +++ b/pages/contact/index.vue @@ -2,7 +2,7 @@
- Contact Us + Contact Us
Date: Mon, 3 Oct 2022 12:35:01 +0530 Subject: [PATCH 3/4] Change initial value of avatarURL --- components/sdgCard.vue | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/components/sdgCard.vue b/components/sdgCard.vue index 40e7135..2826649 100644 --- a/components/sdgCard.vue +++ b/components/sdgCard.vue @@ -117,14 +117,11 @@ export default defineComponent({ } }, setup(props){ - const avatarURL = ref("") + const avatarURL = ref(props.imageUrl) fetch(props.githubLink, {method: "HEAD"}) .then((res) => { - if (res.status === 200) { - avatarURL.value = props.imageUrl; - } - else { + if (res.status != 200) { const parts = props.name.split(" ") avatarURL.value = `https://ui-avatars.com/api/?name=${parts[0]}+${parts[1]}&&size=200&&rounded=true` } From 7341403b899589ae17ab8f96d00e491854fb7a93 Mon Sep 17 00:00:00 2001 From: Eshaan Aggarwal <96648934+EshaanAgg@users.noreply.github.com> Date: Mon, 3 Oct 2022 12:36:28 +0530 Subject: [PATCH 4/4] Change initial value of avatarURL --- components/sdgCard.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/sdgCard.vue b/components/sdgCard.vue index 2826649..36d70f7 100644 --- a/components/sdgCard.vue +++ b/components/sdgCard.vue @@ -121,7 +121,7 @@ export default defineComponent({ fetch(props.githubLink, {method: "HEAD"}) .then((res) => { - if (res.status != 200) { + if (res.status !== 200) { const parts = props.name.split(" ") avatarURL.value = `https://ui-avatars.com/api/?name=${parts[0]}+${parts[1]}&&size=200&&rounded=true` }