|
43 | 43 | <xsl:call-template name="body"><xsl:with-param select="@lang" name="lang"/></xsl:call-template></html> |
44 | 44 | </xsl:template> |
45 | 45 |
|
| 46 | +<xsl:template match="years/year[@year]"> |
| 47 | + <xsl:if test="position() = 1"> |
| 48 | + <xsl:text disable-output-escaping="yes"> |
| 49 | + <div class="dropdown"> |
| 50 | + <button class="dropbtn">news archive ▾</button> |
| 51 | + <div class="dropdown-content"> |
| 52 | + </xsl:text> |
| 53 | + </xsl:if> |
| 54 | + |
| 55 | + <xsl:if test="position() != last()"> |
| 56 | + <xsl:choose><xsl:when test="$YEAR=@year"> |
| 57 | + <b><a href="{@href}"><xsl:value-of select="@year"/></a></b> |
| 58 | + </xsl:when><xsl:otherwise> |
| 59 | + <a href="{@href}"><xsl:value-of select="@year"/></a> |
| 60 | + </xsl:otherwise></xsl:choose> |
| 61 | + </xsl:if> |
| 62 | + |
| 63 | + <xsl:if test="position() = last()"> |
| 64 | + <xsl:choose><xsl:when test="$YEAR=@year"> |
| 65 | + <b><a href="{@href}"><xsl:value-of select="@year"/></a></b> |
| 66 | + </xsl:when><xsl:otherwise> |
| 67 | + <a href="{@href}"><xsl:value-of select="@year"/></a> |
| 68 | + </xsl:otherwise></xsl:choose> |
| 69 | + <xsl:text disable-output-escaping="yes"> |
| 70 | + </div></div> |
| 71 | + </xsl:text> |
| 72 | + </xsl:if> |
| 73 | +</xsl:template> |
46 | 74 |
|
47 | 75 | <xsl:template match="event"> |
48 | 76 |
|
49 | 77 | <xsl:variable name="year"> <xsl:value-of select="substring(../event[position()=1]/@date, 1, 4)"/> </xsl:variable> |
50 | 78 | <xsl:variable name="y"> <xsl:value-of select="substring(@date, 1, 4)"/> </xsl:variable> |
51 | 79 |
|
52 | | - <xsl:if test="position() = 1"> |
| 80 | + <!-- News items start at position 2 so that we skip the dropdown menu --> |
| 81 | + <xsl:if test="position() = 2"> |
53 | 82 | <xsl:text disable-output-escaping="yes"> |
54 | 83 | <table class="news"> |
55 | 84 | </xsl:text> |
56 | 85 | </xsl:if> |
57 | 86 |
|
58 | | - <xsl:if test="(not($YEAR) and ($year = $y or position() < 11)) or $YEAR=$y"> |
| 87 | + <xsl:if test="(not($YEAR) and ($year = $y or position() < 12)) or $YEAR=$y"> |
59 | 88 | <tr> |
60 | 89 | <td class="date"> |
61 | 90 | <a name="{@date}"/> <xsl:value-of select="@date"/> |
|
0 commit comments