Adds an e-mail share button
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Michael Weimann 2019-10-02 09:29:56 +02:00
parent 433b7dd964
commit d2c7688fdb
Signed by: mweimann
GPG Key ID: 34F0524D4DA694A1
2 changed files with 28 additions and 16 deletions

View File

@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:str="http://exslt.org/strings">
<xsl:template name="sharebuttons">
<!-- normalized article title -->
@ -134,7 +137,7 @@
</xsl:attribute>
<xsl:text>Reddit</xsl:text>
</xsl:element>
<!-- Flattr -->
<xsl:element name="button">
<xsl:attribute name="type">submit</xsl:attribute>
@ -165,6 +168,15 @@
<xsl:text>Hacker News</xsl:text>
</xsl:element>
<!-- e-mail -->
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="concat('mailto:?subject=', str:encode-uri($share-title, 'true', 'UTF-8'), '&amp;body=', str:encode-uri($share-url, 'true', 'UTF-8'))"/>
</xsl:attribute>
<xsl:attribute name="class">button share-mail</xsl:attribute>
<xsl:text>E-Mail</xsl:text>
</xsl:element>
<!-- Twitter -->
<xsl:element name="button">
<xsl:attribute name="type">submit</xsl:attribute>

View File

@ -856,26 +856,26 @@ form.thankyou {
.share-button-top,
.share-button-sidebar,
.share-buttons.bottom a.button,
.share-buttons.bottom button.button,
.share-buttons.bottom label.button {
display: inline-block;
margin: 2.5px 5px 2.5px 0;
color: #fff;
font-weight: normal;
font-size: 1em;
line-height: normal;
text-align: center;
text-decoration: none;
padding: 7px 7px 7px 20px;
width: 19%;
min-width: 100px;
max-width: 110px;
border: none;
border-radius: 3px;
background-position: left 5px center;
background-repeat: no-repeat;
background-size: 20px auto;
border: none;
border-radius: 3px;
color: #fff;
cursor: pointer;
display: inline-block;
font-size: 1em;
font-weight: normal;
line-height: normal;
margin: 2.5px 5px 2.5px 0;
min-width: 100px;
opacity: 0.9;
padding: 7px 7px 7px 30px;
text-align: center;
text-decoration: none;
vertical-align: top;
}