The code and data behind xeiaso.net
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

use sweetalert for cases when you can't share directly with a native share sheet

Signed-off-by: Xe Iaso <me@xeiaso.net>

Xe Iaso c55abbb0 ccd20508

+8 -1
+5 -1
lume/src/_includes/blog.njk
··· 38 38 </svg> 39 39 </button> 40 40 41 - <script> 41 + <script type="module"> 42 + import swal from "/js/swal.js"; 43 + 42 44 const shareButton = document.getElementById("shareButton"); 43 45 function doShareButton() { 44 46 const shareData = { ··· 62 64 console.log("Thanks for sharing!"); 63 65 }) 64 66 .catch(console.error); 67 + swal("Link copied to clipboard", "Feel free to paste it anywhere you like!", "success"); 65 68 } else { 66 69 console.log("can't share directly, but feel free to copy the url from addressbar manually"); 70 + swal("Can't share directly", "Feel free to copy the url from addressbar manually!", "info"); 67 71 } 68 72 } 69 73 shareButton.addEventListener("click", doShareButton);
+3
lume/src/js/swal.js
··· 1 + import swal from "npm:sweetalert"; 2 + 3 + export default swal;