Browse Source

use summary_large_card for twitter if custom image is used. plus smaller fixes

tags/stw2018
Max Mehl 9 months ago
parent
commit
b1e3bc70c9
Signed by: max.mehl <max.mehl@fsfe.org> GPG Key ID: 2704E4AB371E2E92
1 changed files with 12 additions and 3 deletions
  1. 12
    3
      build/xslt/fsfe_head.xsl

+ 12
- 3
build/xslt/fsfe_head.xsl View File

@@ -186,7 +186,16 @@
</xsl:variable>
<!-- Twitter cards -->
<meta name="twitter:card" content="summary" />
<xsl:element name="meta">
<xsl:attribute name="name">twitter:card</xsl:attribute>
<xsl:attribute name="content">
<xsl:choose>
<!-- if there is a meta "image", use a large summary card -->
<xsl:when test="$metaimage != ''">summary_large_image</xsl:when>
<xsl:otherwise>summary</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:element>
<meta name="twitter:site" content="@fsfe" />
<xsl:element name="meta">
<xsl:attribute name="name">twitter:image</xsl:attribute>
@@ -195,7 +204,7 @@
<!-- if there is a meta "image", take that -->
<xsl:when test="$metaimage != ''"><xsl:value-of select="$metaimage" /></xsl:when>
<xsl:otherwise>
https:<xsl:value-of select="$linkresources"/>/graphics/logo-text_square.png
https://fsfe.org/graphics/logo-text_square.png
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
@@ -235,7 +244,7 @@
<!-- if there is a meta "image", take that -->
<xsl:when test="$metaimage != ''"><xsl:value-of select="$metaimage" /></xsl:when>
<xsl:otherwise>
https:<xsl:value-of select="$linkresources"/>/graphics/logo-text_square.png
https://fsfe.org/graphics/logo-text_square.png
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>

Loading…
Cancel
Save