Skip to content

Commit

Permalink
feat: better mailto links with mailgo (#562)
Browse files Browse the repository at this point in the history
* feat: better mailto links with mailgo

resolves #556

* chore(deps): mailgo version 0.9.16

Co-authored-by: Damien Robinson <damien.robinson@xcommedia.com.au>
  • Loading branch information
shadow81627 and damienrobinson committed Sep 5, 2020
1 parent 7ba0227 commit 5bae934
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 24 deletions.
37 changes: 37 additions & 0 deletions components/mailgo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<template>
<v-tooltip bottom>
<template v-slot:activator="{ on, attrs }">
<v-btn
target="_blank"
v-bind="attrs"
large
text
:href="href"
rel="noopener"
class="pl-0"
v-on="on"
>
<font-awesome-icon v-if="icon" :icon="icon" fixed-width pull="left" />
<slot></slot>
</v-btn>
</template>
<span>Reach out and contact with me now!</span>
</v-tooltip>
</template>

<script>
import mailgo from 'mailgo';
export default {
props: {
href: { type: String, required: true },
icon: { type: String, required: true },
},
created() {
if (process.client) {
mailgo();
}
},
};
</script>

<style></style>
32 changes: 31 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"github-markdown-css": "4.0.0",
"koa": "2.13.0",
"luxon": "1.25.0",
"mailgo": "0.9.16",
"nuxt": "2.14.4",
"nuxt-fontawesome": "0.4.0",
"nuxt-i18n": "6.13.12",
Expand Down
30 changes: 7 additions & 23 deletions pages/resume.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,9 @@
</v-card-title>

<v-card-subtitle class="text-subtitle-1 text-break pb-0">
<v-tooltip bottom>
<template v-slot:activator="{ on, attrs }">
<v-btn
target="_blank"
v-bind="attrs"
large
text
href="mailto:damien.robinson@daim.dev"
rel="noopener"
class="pl-0"
v-on="on"
>
<font-awesome-icon
:icon="faEnvelope"
title="email"
fixed-width
pull="left"
/>
<span>damien.robinson@daim.dev</span>
</v-btn>
</template>
<span>Reach out and email me now</span>
</v-tooltip>
<mailgo href="mailto:damien.robinson@daim.dev" :icon="faEnvelope">
<span>damien.robinson@daim.dev</span>
</mailgo>

<v-tooltip bottom>
<template v-slot:activator="{ on, attrs }">
Expand Down Expand Up @@ -360,8 +340,12 @@ import {
faSass,
faJenkins,
} from '@fortawesome/free-brands-svg-icons';
import Mailgo from '@/components/mailgo.vue';
export default {
components: {
Mailgo,
},
data: () => ({
faEnvelope,
faMapMarker,
Expand Down

1 comment on commit 5bae934

@vercel
Copy link

@vercel vercel bot commented on 5bae934 Sep 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.