-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add email icon and copy to clipboard
- Loading branch information
1 parent
fe87697
commit aa25189
Showing
5 changed files
with
63 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,60 @@ | ||
<script> | ||
import { computed } from 'vue'; | ||
export default { | ||
props: { | ||
icon: String, | ||
link: String, | ||
}, | ||
data() { | ||
return { | ||
showNotification: false | ||
}; | ||
}, | ||
computed: { | ||
svg() { | ||
return `<span class="i-social-${this.icon}" />`; | ||
}, | ||
}, | ||
methods: { | ||
handleClick() { | ||
if (this.icon === 'email') { | ||
navigator.clipboard.writeText(this.link).then(() => { | ||
this.showNotification = true; | ||
setTimeout(() => { | ||
this.showNotification = false; | ||
}, 1000); | ||
}, (err) => { | ||
console.error('Failed to copy email: ', err); | ||
}); | ||
} else { | ||
window.open(this.link, '_blank', 'noopener'); | ||
} | ||
}, | ||
} | ||
} | ||
</script> | ||
|
||
<template> | ||
<a class="flex justify-center items-center w-9 h-9 text-gray-600 transition-color duration-500 hover:text-custom-orange hover:duration-300" | ||
:href="link" target="_blank" rel="noopener" v-html="svg"></a> | ||
<transition name="fade"> | ||
<div v-if="showNotification" | ||
class="fixed top-2 left-1/2 transform -translate-x-1/2 border-2 border-custom-orange bg-white text-custom-orange text-center py-2 px-4 rounded-lg"> | ||
Email address copied to clipboard! | ||
</div> | ||
</transition> | ||
<div @click.stop="handleClick" | ||
class="flex justify-center items-center w-9 h-9 text-gray-600 transition-color duration-500 hover:text-custom-orange hover:duration-300" | ||
v-html="svg"> | ||
</div> | ||
</template> | ||
|
||
<style> | ||
/* Fade transition */ | ||
.fade-enter-active, | ||
.fade-leave-active { | ||
transition: opacity 0.5s ease; | ||
} | ||
.fade-enter, | ||
.fade-leave-to { | ||
opacity: 0; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,11 +92,13 @@ name: "Will Hannon" # <-------------- Your preferred name | |
image: "/assets/people/will-hannon.jpeg" # <-------------- The path to an image of you (a link also works) | ||
title: "Data Scientist" # <-------------- Your title. Please be as consistent as possible | ||
category: "Staff" # <-------------- One of [Graduate Students, Postdocs, or Staff] | ||
links: # <-------------- Links to your socials. Icons should be one of [github, linkedin, orcid, twitter, or website] | ||
links: # <-------------- Links to your socials. Icons should be one of [github, linkedin, orcid, twitter, email, or website] | ||
- link: "https://github.com/WillHannon-MCB" | ||
icon: "github" | ||
- link: "https://www.linkedin.com/in/williamhannon/" | ||
icon: "linkedin" | ||
- link: "[email protected]" | ||
icon: "email" | ||
--- | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,8 @@ links: | |
icon: "github" | ||
- link: "https://www.linkedin.com/in/williamhannon/" | ||
icon: "linkedin" | ||
- link: "[email protected]" | ||
icon: "email" | ||
--- | ||
|
||
As a Data Scientist in the Bloom Lab, I develop and implement computational approaches to study viral evolution and communicate with our data. I’m interested in improving access to the information-rich datasets we generate to aid in antigen engineering, therapeutic design, viral surveillance, and gaining a better understanding of viral evolution. |