Turn subscribe and become-supporter banners into modules
continuous-integration/drone/push Build is passing

Fixes #1337
This commit is contained in:
2020-05-25 22:23:20 +02:00
parent bb8715201e
commit 821ebf2a72
17 changed files with 255 additions and 150 deletions
+34
View File
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- ====================================================================== -->
<!-- Helper stylesheets to include referrer for fsfe-cd -->
<!-- ====================================================================== -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- Hidden input field with referrer for https://my.fsfe.org/subscribe -->
<xsl:template match="fsfe-cd-referrer-input">
<xsl:element name="input">
<xsl:attribute name="type">hidden</xsl:attribute>
<xsl:attribute name="name">referrer</xsl:attribute>
<xsl:attribute name="value">
<xsl:text>https://fsfe.org</xsl:text>
<xsl:value-of select="/buildinfo/@filename"/>
<xsl:text>.html</xsl:text>
</xsl:attribute>
</xsl:element>
</xsl:template>
<!-- Button with referrer for https://my.fsfe.org/donate -->
<xsl:template match="fsfe-cd-donate-link">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:text>https://my.fsfe.org/donate?referrer=https://fsfe.org</xsl:text>
<xsl:value-of select="/buildinfo/@filename"/>
<xsl:text>.html</xsl:text>
</xsl:attribute>
<xsl:apply-templates select="@*|node()"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>