diff options
Diffstat (limited to 'lume/src/_includes')
| -rw-r--r-- | lume/src/_includes/blog.njk | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lume/src/_includes/blog.njk b/lume/src/_includes/blog.njk index 9e8d625..07f3b6d 100644 --- a/lume/src/_includes/blog.njk +++ b/lume/src/_includes/blog.njk @@ -38,7 +38,9 @@ layout: base.njk </svg> </button> - <script> + <script type="module"> + import swal from "/js/swal.js"; + const shareButton = document.getElementById("shareButton"); function doShareButton() { const shareData = { @@ -62,8 +64,10 @@ layout: base.njk console.log("Thanks for sharing!"); }) .catch(console.error); + swal("Link copied to clipboard", "Feel free to paste it anywhere you like!", "success"); } else { console.log("can't share directly, but feel free to copy the url from addressbar manually"); + swal("Can't share directly", "Feel free to copy the url from addressbar manually!", "info"); } } shareButton.addEventListener("click", doShareButton); |
