Add social media share btns

This commit is contained in:
samaradel
2021-07-25 09:00:40 +00:00
parent 23e367179f
commit 52ded64556
4 changed files with 77 additions and 6 deletions

View File

@@ -69,6 +69,18 @@
</g-link>
</p>
</div>
<share-it
icons
:targets="['twitter', 'linkedin', 'facebook']"
class="ml-auto"
/>
<font-awesome
:icon="['fas', 'link']"
class="cursor-pointer"
@click="copyLink"
/>
</div>
</section>
</div>
@@ -209,5 +221,15 @@ export default {
title: this.$page.blog.title,
};
},
methods: {
copyLink() {
const el = document.createElement("input");
el.value = window.location.href;
document.body.appendChild(el);
el.select();
document.execCommand("copy");
document.body.removeChild(el);
},
},
};
</script>