Closed kytta closed 9 months ago
I did it myself with my project with CSS code below (add somewhere in yours CSS files):
.shareon > .mailto {
background-color: #333; // color of button
}
.shareon > .mailto::before {
background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='24px' height='24px' viewBox='0 0 24 24' version='1.1'%3E%3Cg id='surface1'%3E%3Cpath style='fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(100%25,100%25,100%25);stroke-opacity:1;stroke-miterlimit:4;' d='M 4 7 L 10.199219 11.648438 C 11.265625 12.449219 12.734375 12.449219 13.800781 11.648438 L 20 7 '/%3E%3Cpath style='fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke:rgb(100%25,100%25,100%25);stroke-opacity:1;stroke-miterlimit:4;' d='M 5 5 L 19 5 C 20.105469 5 21 5.894531 21 7 L 21 17 C 21 18.105469 20.105469 19 19 19 L 5 19 C 3.894531 19 3 18.105469 3 17 L 3 7 C 3 5.894531 3.894531 5 5 5 Z M 5 5 '/%3E%3C/g%3E%3C/svg%3E%0A");
}
// SVG credits: https://www.svgrepo.com/svg/502648/email
and in HTML for example:
<a class="mailto" href="mailto:?subject=Look at it!"></a>
If someone use Laravel can add URL of page in e-mail body for example:
<a class="mailto" href="mailto:?subject=Look at it!&body={{$page->url}}"></a>
Thank you for making this library - it was a breeze to use.
mailto: would be great to have.
I added a generic web share api as an option.
To see it in action - https://giddysouls.com/category/mushroom-supplements/mushroom-supplements.html
Released with v2.4.0 :tada:
I swear I had someone ask me for this a long time ago. The button should redirect to a
mailto:
URL. I'll have to think about how to build the message body and what to put in the title