Source files of fsfe.org, pdfreaders.org, freeyourandroid.org, ilovefs.org, drm.info, and test.fsfe.org. Contribute: https://fsfe.org/contribute/web/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

default.xsl 86KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:dt="http://xsltsl.org/date-time"
  4. exclude-result-prefixes="dt"
  5. xmlns:str="http://exslt.org/strings"
  6. extension-element-prefixes="str">
  7. <xsl:import href="../tools/xsltsl/translations.xsl" />
  8. <xsl:import href="../tools/xsltsl/static-elements.xsl" />
  9. <!-- HTML 5 compatibility doctype, since our XSLT parser doesn't support disabling output escaping -->
  10. <xsl:output method="html" encoding="utf-8" indent="yes" doctype-system="about:legacy-compat" />
  11. <xsl:variable name="mode">
  12. <xsl:value-of select="'normal'" /> <!-- can be either 'normal' or 'valentine' -->
  13. </xsl:variable>
  14. <!-- The top level element of the input file is "buildinfo" -->
  15. <xsl:template match="/">
  16. <xsl:apply-templates select="buildinfo/document"/>
  17. </xsl:template>
  18. <!-- The actual HTML tree is in "buildinfo/document" -->
  19. <xsl:template match="buildinfo/document">
  20. <xsl:element name="html">
  21. <xsl:attribute name="lang">
  22. <xsl:value-of select="/buildinfo/@language"/>
  23. </xsl:attribute>
  24. <xsl:attribute name="class"><xsl:value-of select="/buildinfo/@language" /> no-js</xsl:attribute>
  25. <xsl:if test="/buildinfo/@language='ar'">
  26. <xsl:attribute name="dir">rtl</xsl:attribute>
  27. </xsl:if>
  28. <!--<xsl:apply-templates select="node()"/>-->
  29. <xsl:apply-templates select="head" />
  30. <xsl:call-template name="fsfe-body" />
  31. </xsl:element>
  32. </xsl:template>
  33. <!-- HTML head -->
  34. <xsl:template match="head">
  35. <head>
  36. <xsl:call-template name="fsfe-head" />
  37. </head>
  38. </xsl:template>
  39. <xsl:template name="fsfe-head">
  40. <!-- Don't let search engine robots index untranslated pages -->
  41. <xsl:element name="meta">
  42. <xsl:attribute name="name">robots</xsl:attribute>
  43. <xsl:attribute name="content">
  44. <xsl:choose>
  45. <xsl:when test="/buildinfo/@language=/buildinfo/document/@language">index, follow</xsl:when>
  46. <xsl:otherwise>noindex</xsl:otherwise>
  47. </xsl:choose>
  48. </xsl:attribute>
  49. </xsl:element>
  50. <!-- For pages used on external web servers, load the CSS from absolute URL -->
  51. <xsl:variable name="urlprefix">
  52. <xsl:if test="/buildinfo/document/@external">https://fsfe.org</xsl:if>
  53. </xsl:variable>
  54. <!-- For a mobile/tablet/etc. friendly website -->
  55. <xsl:element name="meta">
  56. <xsl:attribute name="name">viewport</xsl:attribute>
  57. <xsl:attribute name="content">width=device-width, initial-scale=1.0"</xsl:attribute>
  58. </xsl:element>
  59. <xsl:choose>
  60. <xsl:when test="/buildinfo/document/body[ contains( @class, 'fellowship' ) ]">
  61. <xsl:element name="link">
  62. <xsl:attribute name="rel">stylesheet</xsl:attribute>
  63. <xsl:attribute name="media">all</xsl:attribute>
  64. <xsl:attribute name="href"><xsl:value-of select="$urlprefix"/>/look/fellowship.min.css</xsl:attribute>
  65. <xsl:attribute name="type">text/css</xsl:attribute>
  66. </xsl:element>
  67. </xsl:when>
  68. <xsl:otherwise>
  69. <xsl:element name="link">
  70. <xsl:attribute name="rel">stylesheet</xsl:attribute>
  71. <xsl:attribute name="media">all</xsl:attribute>
  72. <xsl:attribute name="href"><xsl:value-of select="$urlprefix"/>/look/fsfe.min.css</xsl:attribute>
  73. <xsl:attribute name="type">text/css</xsl:attribute>
  74. </xsl:element>
  75. </xsl:otherwise>
  76. </xsl:choose>
  77. <xsl:if test="$mode = 'valentine'">
  78. <xsl:element name="link">
  79. <xsl:attribute name="rel">stylesheet</xsl:attribute>
  80. <xsl:attribute name="media">all</xsl:attribute>
  81. <xsl:attribute name="href"><xsl:value-of select="$urlprefix"/>/look/valentine.min.css</xsl:attribute>
  82. <xsl:attribute name="type">text/css</xsl:attribute>
  83. </xsl:element>
  84. </xsl:if>
  85. <xsl:element name="link">
  86. <xsl:attribute name="rel">stylesheet</xsl:attribute>
  87. <xsl:attribute name="media">print</xsl:attribute>
  88. <xsl:attribute name="href"><xsl:value-of select="$urlprefix"/>/look/print.css</xsl:attribute>
  89. <xsl:attribute name="type">text/css</xsl:attribute>
  90. </xsl:element>
  91. <xsl:if test="/buildinfo/@language='ar'">
  92. <xsl:element name="link">
  93. <xsl:attribute name="rel">stylesheet</xsl:attribute>
  94. <xsl:attribute name="media">all</xsl:attribute>
  95. <xsl:attribute name="href"><xsl:value-of select="$urlprefix"/>/look/rtl.css</xsl:attribute>
  96. <xsl:attribute name="type">text/css</xsl:attribute>
  97. </xsl:element>
  98. </xsl:if>
  99. <xsl:element name="link">
  100. <xsl:attribute name="rel">icon</xsl:attribute>
  101. <xsl:attribute name="href">
  102. <xsl:value-of select="$urlprefix"/>
  103. <xsl:choose>
  104. <xsl:when test="$mode = 'valentine'">/graphics/fsfev.png</xsl:when>
  105. <xsl:otherwise>/graphics/fsfe.ico</xsl:otherwise>
  106. </xsl:choose>
  107. </xsl:attribute>
  108. <xsl:attribute name="type">image/x-icon</xsl:attribute>
  109. </xsl:element>
  110. <link rel="apple-touch-icon" href="{$urlprefix}/graphics/touch-icon.png" type="image/png" />
  111. <link rel="apple-touch-icon-precomposed" href="{$urlprefix}/graphics/touch-icon.png" type="image/png" />
  112. <xsl:element name="link">
  113. <xsl:attribute name="rel">alternate</xsl:attribute>
  114. <xsl:attribute name="title">FSFE <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'menu1/news'" /></xsl:call-template></xsl:attribute>
  115. <xsl:attribute name="href"><xsl:value-of select="$urlprefix"/>/news/news.<xsl:value-of select="/buildinfo/@language"/>.rss</xsl:attribute>
  116. <xsl:attribute name="type">application/rss+xml</xsl:attribute>
  117. </xsl:element>
  118. <xsl:element name="link">
  119. <xsl:attribute name="rel">alternate</xsl:attribute>
  120. <xsl:attribute name="title">FSFE <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'menu1/events'" /></xsl:call-template></xsl:attribute>
  121. <xsl:attribute name="href"><xsl:value-of select="$urlprefix"/>/events/events.<xsl:value-of select="/buildinfo/@language"/>.rss</xsl:attribute>
  122. <xsl:attribute name="type">application/rss+xml</xsl:attribute>
  123. </xsl:element>
  124. <xsl:for-each select="/buildinfo/trlist/tr">
  125. <xsl:sort select="@id"/>
  126. <xsl:element name="link">
  127. <xsl:attribute name="type">text/html</xsl:attribute>
  128. <xsl:attribute name="rel">alternate</xsl:attribute>
  129. <xsl:attribute name="hreflang"><xsl:value-of select="@id" /></xsl:attribute>
  130. <xsl:attribute name="lang"><xsl:value-of select="@id" /></xsl:attribute>
  131. <xsl:attribute name="href"><xsl:value-of select="/buildinfo/@filename"/>.<xsl:value-of select="@id"/>.html</xsl:attribute>
  132. <xsl:attribute name="title"><xsl:value-of select="." disable-output-escaping="yes" /></xsl:attribute>
  133. </xsl:element>
  134. </xsl:for-each>
  135. <xsl:for-each select="/buildinfo/document/author">
  136. <xsl:variable name="id">
  137. <xsl:value-of select="@id" />
  138. </xsl:variable>
  139. <xsl:element name="meta">
  140. <xsl:attribute name="name">author</xsl:attribute>
  141. <xsl:attribute name="content">
  142. <xsl:choose>
  143. <xsl:when test="@id and document('about/people/people.en.xml')/personset/person[@id=$id]">
  144. <xsl:value-of select="document('about/people/people.en.xml')/personset/person[@id=$id]/name" />
  145. </xsl:when>
  146. <xsl:otherwise>
  147. <xsl:value-of select="name" />
  148. </xsl:otherwise>
  149. </xsl:choose>
  150. </xsl:attribute>
  151. </xsl:element>
  152. </xsl:for-each>
  153. <script src="/scripts/jquery-1.10.2.min.js"></script>
  154. <script src="/scripts/modernizr.custom.30122.js"></script>
  155. <script src="/scripts/bootstrap-3.0.3.min.js"></script>
  156. <script src="/scripts/master.js"></script>
  157. <script src="/scripts/placeholder.js"></script>
  158. <script src="/scripts/highlight.pack.js"></script>
  159. <script>
  160. hljs.tabReplace = " ";
  161. // hljs.initHighligtingOnLoad();
  162. // above line throws error: Uncaught TypeError: Object [object Object] has no method 'initHighligtingOnLoad'
  163. </script>
  164. <xsl:comment>
  165. <![CDATA[
  166. [if lt IE 8]>
  167. <script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE8.js"></script>
  168. <![endif]
  169. ]]>
  170. </xsl:comment>
  171. <xsl:apply-templates select="@*|node()"/>
  172. </xsl:template>
  173. <!-- Modify H1 -->
  174. <xsl:template match="h1">
  175. <!-- Apply news page PRE-rules -->
  176. <xsl:if test="string(/buildinfo/document/@newsdate) and
  177. (not(string(/buildinfo/document/@type)) or
  178. /buildinfo/document/@type != 'newsletter')">
  179. <!-- add link to press/press.xx.html -->
  180. <xsl:element name="p">
  181. <xsl:attribute name="id">category</xsl:attribute>
  182. <xsl:element name="a">
  183. <xsl:attribute name="href">/press/press.<xsl:value-of select="/buildinfo/@language"/>.html</xsl:attribute>
  184. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'press'" /></xsl:call-template>
  185. </xsl:element>
  186. </xsl:element>
  187. </xsl:if>
  188. <!-- Apply newsletter page PRE-rules -->
  189. <xsl:if test="string(/buildinfo/document/@newsdate) and /buildinfo/document/@type = 'newsletter'">
  190. <xsl:element name="p">
  191. <xsl:attribute name="id">category</xsl:attribute>
  192. <xsl:element name="a">
  193. <xsl:attribute name="href">/news/newsletter.<xsl:value-of select="/buildinfo/@language"/>.html</xsl:attribute>
  194. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'newsletter'" /></xsl:call-template>
  195. </xsl:element>
  196. </xsl:element>
  197. </xsl:if>
  198. <!-- auto generate ID for headings if it doesn't already exist -->
  199. <xsl:call-template name="generate-id" />
  200. <!-- Apply news page rules -->
  201. <xsl:if test="string(/buildinfo/document/@newsdate) and
  202. (not(string(/buildinfo/document/@type)) or
  203. /buildinfo/document/@type != 'newsletter')">
  204. <!-- Social Links -->
  205. <xsl:variable name="original_file"
  206. select="concat(substring(string(/buildinfo/@filename), 2), '.' ,string(/buildinfo/@original), '.xhtml')"
  207. as="xs:string" />
  208. <xsl:variable name="originalDocument" select="document($original_file)/html" />
  209. <xsl:element name="a">
  210. <xsl:attribute name="class">social-link</xsl:attribute>
  211. <xsl:attribute name="href">https://flattr.com/submit/auto?user_id=fsfe&amp;url=http://fsfe.org/<xsl:value-of select="/buildinfo/@filename" />.html&amp;title=<xsl:value-of select="$originalDocument/head/title" />&amp;description=<xsl:value-of select="$originalDocument/body/p[@newsteaser]" />&amp;tags=<xsl:for-each select="$originalDocument/tags/tag"><xsl:value-of select="node()" />,</xsl:for-each>&amp;category=text</xsl:attribute>
  212. <xsl:element name="img">
  213. <xsl:attribute name="src">/graphics/flattr-badge-large.png</xsl:attribute>
  214. <xsl:attribute name="alt">Flattr this</xsl:attribute>
  215. </xsl:element>
  216. </xsl:element>
  217. <xsl:element name="a">
  218. <xsl:attribute name="class">social-link</xsl:attribute>
  219. <xsl:attribute name="href">/support?pr</xsl:attribute>
  220. <xsl:element name="img">
  221. <xsl:attribute name="src">/graphics/supporter/FSFE_plus1_48x22_b.png</xsl:attribute>
  222. <xsl:attribute name="alt">Support FSFE</xsl:attribute>
  223. </xsl:element>
  224. </xsl:element>
  225. <!-- End Social Links -->
  226. <!-- add publishing information (author, date) -->
  227. <xsl:element name="div">
  228. <xsl:attribute name="id">article-metadata</xsl:attribute>
  229. <span class="published-on"> <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'published'" /></xsl:call-template>: </span>
  230. <xsl:element name="time">
  231. <xsl:attribute name="class">dt-published</xsl:attribute>
  232. <xsl:value-of select="/buildinfo/document/@newsdate" />
  233. </xsl:element>
  234. </xsl:element>
  235. </xsl:if>
  236. <!-- End apply news page rules -->
  237. <!-- Apply newsletter page -->
  238. <xsl:if test="string(/buildinfo/document/@newsdate) and /buildinfo/document/@type = 'newsletter'">
  239. <!-- Social Links -->
  240. <xsl:variable name="original_file"
  241. select="concat(substring(string(/buildinfo/@filename), 2), '.' ,string(/buildinfo/@original), '.xhtml')"
  242. as="xs:string" />
  243. <xsl:variable name="originalDocument" select="document($original_file)/html" />
  244. <xsl:element name="a">
  245. <xsl:attribute name="class">social-link</xsl:attribute>
  246. <xsl:attribute name="href">https://flattr.com/submit/auto?user_id=fsfe&amp;url=http://fsfe.org/<xsl:value-of select="/buildinfo/@filename" />.html&amp;title=<xsl:value-of select="$originalDocument/head/title" />&amp;description=<xsl:value-of select="$originalDocument/body/p[@newsteaser]" />&amp;tags=<xsl:for-each select="$originalDocument/tags/tag"><xsl:value-of select="node()" />,</xsl:for-each>&amp;category=text</xsl:attribute>
  247. <xsl:element name="img">
  248. <xsl:attribute name="src">/graphics/flattr-badge-large.png</xsl:attribute>
  249. <xsl:attribute name="alt">Flattr this</xsl:attribute>
  250. </xsl:element>
  251. </xsl:element>
  252. <xsl:element name="a">
  253. <xsl:attribute name="class">social-link</xsl:attribute>
  254. <xsl:attribute name="href">/support?pr</xsl:attribute>
  255. <xsl:element name="img">
  256. <xsl:attribute name="src">/graphics/supporter/FSFE_plus1_48x22_b.png</xsl:attribute>
  257. <xsl:attribute name="alt">Support FSFE</xsl:attribute>
  258. </xsl:element>
  259. </xsl:element>
  260. <!-- End Social Links -->
  261. <xsl:call-template name="subscribe-nl" />
  262. </xsl:if>
  263. <!-- End apply newsletter page rules -->
  264. <!-- Depreciated- see next block: Apply article rules -->
  265. <xsl:if test = "string(/buildinfo/document/head/meta[@name='author-name-1']/@content)">
  266. <xsl:element name="div">
  267. <xsl:attribute name="id">article-metadata</xsl:attribute>
  268. <xsl:if test = "string(/buildinfo/document/head/meta[@name='author-name-1']/@content)">
  269. <span class="written-by"><xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'author'" /></xsl:call-template>: </span>
  270. <xsl:choose>
  271. <xsl:when test="/buildinfo/document/head/meta[@name='author-link-1']">
  272. <xsl:variable name="author-link-1" select="/buildinfo/document/head/meta[@name='author-link-1']/@content" />
  273. <a class="p-author" rel='author' href='{$author-link-1}'>
  274. <xsl:value-of select="/buildinfo/document/head/meta[@name='author-name-1']/@content" /> </a>
  275. </xsl:when>
  276. <xsl:otherwise>
  277. <xsl:value-of select="/buildinfo/document/head/meta[@name='author-name-1']/@content" />
  278. </xsl:otherwise>
  279. </xsl:choose>
  280. </xsl:if>
  281. <xsl:if test = "string(/buildinfo/document/head/meta[@name='author-name-2']/@content)">
  282. <xsl:choose>
  283. <xsl:when test="/buildinfo/document/head/meta[@name='author-link-2']">
  284. <xsl:variable name="author-link-2" select="/buildinfo/document/head/meta[@name='author-link-2']/@content" />
  285. , <a class="p-author" rel='author' href='{$author-link-2}'>
  286. <xsl:value-of select="/buildinfo/document/head/meta[@name='author-name-2']/@content" /> </a>
  287. </xsl:when>
  288. <xsl:otherwise>
  289. , <xsl:value-of select="/buildinfo/document/head/meta[@name='author-name-2']/@content" />
  290. </xsl:otherwise>
  291. </xsl:choose>
  292. </xsl:if>
  293. <xsl:if test = "string(/buildinfo/document/head/meta[@name='author-name-3']/@content)">
  294. <xsl:choose>
  295. <xsl:when test="/buildinfo/document/head/meta[@name='author-link-3']">
  296. <xsl:variable name="author-link-3" select="/buildinfo/document/head/meta[@name='author-link-3']/@content" />
  297. , <a class="p-author" rel='author' href='{$author-link-3}'>
  298. <xsl:value-of select="/buildinfo/document/head/meta[@name='author-name-3']/@content" /> </a>
  299. </xsl:when>
  300. <xsl:otherwise>
  301. , <xsl:value-of select="/buildinfo/document/head/meta[@name='author-name-3']/@content" />
  302. </xsl:otherwise>
  303. </xsl:choose>
  304. </xsl:if>
  305. <span class="published-on">&#160;<xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'published'" /></xsl:call-template>: </span>
  306. <xsl:element name="time">
  307. <xsl:attribute name="class">dt-published</xsl:attribute>
  308. <xsl:value-of select="/buildinfo/document/head/meta[@name='publication-date']/@content" />
  309. </xsl:element>
  310. <xsl:if test = "string(/buildinfo/document/head/meta[@name='pdf-link']/@content)">
  311. <span class="pdf-download">&#160;PDF: </span>
  312. <xsl:variable name="pdf-link" select="/buildinfo/document/head/meta[@name='pdf-link']/@content" />
  313. <a href='{$pdf-link}'>download</a>
  314. </xsl:if>
  315. </xsl:element> <!-- </div> -->
  316. </xsl:if>
  317. <!-- End Apply article rules -->
  318. <!--Article authors, date -->
  319. <xsl:if test="/buildinfo/document/author or /buildinfo/document/date or /buildinfo/document/download">
  320. <xsl:element name="div">
  321. <xsl:attribute name="id">article-metadata</xsl:attribute>
  322. <xsl:if test="/buildinfo/document/author">
  323. <span class="written-by"><xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'writtenby'" /></xsl:call-template>&#160;</span>
  324. <xsl:for-each select="/buildinfo/document/author">
  325. <xsl:variable name="id">
  326. <xsl:value-of select="@id" />
  327. </xsl:variable>
  328. <xsl:choose>
  329. <xsl:when test="@id and document('about/people/people.en.xml')/personset/person[@id=$id]">
  330. <!-- if the author is in fsfe's people.xml then we take information from there -->
  331. <xsl:choose>
  332. <xsl:when test="document('about/people/people.en.xml')/personset/person[@id=$id]/link">
  333. <xsl:element name="a">
  334. <xsl:attribute name="class">author p-author h-card</xsl:attribute>
  335. <xsl:attribute name="rel">author</xsl:attribute>
  336. <xsl:attribute name="href"><xsl:value-of select="document('about/people/people.en.xml')/personset/person[@id=$id]/link" /></xsl:attribute>
  337. <xsl:if test="document('about/people/people.en.xml')/personset/person[@id=$id]/avatar">
  338. <xsl:element name="img">
  339. <xsl:attribute name="alt"></xsl:attribute>
  340. <xsl:attribute name="src"><xsl:value-of select="document('about/people/people.en.xml')/personset/person[@id=$id]/avatar" /></xsl:attribute>
  341. </xsl:element>
  342. </xsl:if>
  343. <xsl:value-of select="document('about/people/people.en.xml')/personset/person[@id=$id]/name" />
  344. </xsl:element>&#160;
  345. </xsl:when>
  346. <xsl:otherwise>
  347. <xsl:if test="document('about/people/people.en.xml')/personset/person[@id=$id]/avatar">
  348. <xsl:element name="img">
  349. <xsl:attribute name="alt"></xsl:attribute>
  350. <xsl:attribute name="src"><xsl:value-of select="document('about/people/people.en.xml')/personset/person[@id=$id]/avatar" /></xsl:attribute>
  351. </xsl:element>
  352. </xsl:if>
  353. <span class="author p-author">
  354. <xsl:value-of select="document('about/people/people.en.xml')/personset/person[@id=$id]/name" />&#160;
  355. </span>
  356. </xsl:otherwise>
  357. </xsl:choose>
  358. </xsl:when>
  359. <xsl:otherwise>
  360. <xsl:choose>
  361. <xsl:when test="link">
  362. <xsl:element name="a">
  363. <xsl:attribute name="class">author p-author h-card</xsl:attribute>
  364. <xsl:attribute name="rel">author</xsl:attribute>
  365. <xsl:attribute name="href"><xsl:value-of select="link" /></xsl:attribute>
  366. <xsl:if test="avatar">
  367. <xsl:element name="img">
  368. <xsl:attribute name="alt"></xsl:attribute>
  369. <xsl:attribute name="src"><xsl:value-of select="avatar" /></xsl:attribute>
  370. </xsl:element>
  371. </xsl:if>
  372. <xsl:value-of select="name" />
  373. </xsl:element>&#160;
  374. </xsl:when>
  375. <xsl:otherwise>
  376. <xsl:if test="avatar">
  377. <xsl:element name="img">
  378. <xsl:attribute name="alt"></xsl:attribute>
  379. <xsl:attribute name="src"><xsl:value-of select="avatar" /></xsl:attribute>
  380. </xsl:element>
  381. </xsl:if>
  382. <span class="author p-author">
  383. <xsl:value-of select="name" />&#160;
  384. </span>
  385. </xsl:otherwise>
  386. </xsl:choose>
  387. </xsl:otherwise>
  388. </xsl:choose>
  389. </xsl:for-each>
  390. </xsl:if>
  391. <xsl:if test="/buildinfo/document/date">
  392. <span class="published-on"><xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'published'" /></xsl:call-template>&#160;</span>
  393. <xsl:element name="time">
  394. <xsl:attribute name="class">dt-published</xsl:attribute>
  395. <xsl:value-of select="/buildinfo/document/date/original/@content" />
  396. </xsl:element>&#160;
  397. <xsl:if test="/buildinfo/document/date/revision">
  398. (<span class="revision-on"><xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'revision'" /></xsl:call-template></span>
  399. <xsl:for-each select="/buildinfo/document/date/revision">
  400. &#160;<xsl:element name="time">
  401. <xsl:attribute name="class">dt-updated</xsl:attribute>
  402. <xsl:value-of select="@content" />
  403. </xsl:element>
  404. </xsl:for-each>)&#160;
  405. </xsl:if>
  406. </xsl:if>
  407. <xsl:if test="/buildinfo/document/download">
  408. <span class="download"><xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'download'" /></xsl:call-template>&#160;</span>
  409. <xsl:element name="a">
  410. <xsl:attribute name="href"><xsl:value-of select="/buildinfo/document/download/@content" /></xsl:attribute>
  411. <xsl:value-of select="/buildinfo/document/download/@type" />
  412. </xsl:element>
  413. </xsl:if>
  414. </xsl:element>
  415. </xsl:if>
  416. <!--End Article authors, date-->
  417. </xsl:template>
  418. <!-- End modifications to H1 -->
  419. <!-- Modify H2 -->
  420. <xsl:template match="h2">
  421. <!-- auto generate ID for headings if it doesn't already exist -->
  422. <xsl:call-template name="generate-id" />
  423. </xsl:template>
  424. <!-- Modify H3 -->
  425. <xsl:template match="h3">
  426. <!-- auto generate ID for headings if it doesn't already exist -->
  427. <xsl:call-template name="generate-id" />
  428. </xsl:template>
  429. <!-- Modify H4 -->
  430. <xsl:template match="h4">
  431. <!-- auto generate ID for headings if it doesn't already exist -->
  432. <xsl:call-template name="generate-id" />
  433. </xsl:template>
  434. <!-- Modify H4 -->
  435. <xsl:template match="h4">
  436. <!-- auto generate ID for headings if it doesn't already exist -->
  437. <xsl:call-template name="generate-id" />
  438. </xsl:template>
  439. <!-- Modify H5 -->
  440. <xsl:template match="h5">
  441. <!-- auto generate ID for headings if it doesn't already exist -->
  442. <xsl:call-template name="generate-id" />
  443. </xsl:template>
  444. <!-- Modify H6 -->
  445. <xsl:template match="h6">
  446. <!-- auto generate ID for headings if it doesn't already exist -->
  447. <xsl:call-template name="generate-id" />
  448. </xsl:template>
  449. <!-- Apply support page -->
  450. <xsl:template match="support-portal-javascript">
  451. <xsl:call-template name="support-portal-javascript" />
  452. </xsl:template>
  453. <xsl:template match="support-form-javascript">
  454. <xsl:call-template name="support-form-javascript" />
  455. </xsl:template>
  456. <xsl:template match="country-list-europe">
  457. <xsl:call-template name="country-list-europe" />
  458. </xsl:template>
  459. <xsl:template match="country-list-other-continents">
  460. <xsl:call-template name="country-list-other-continents" />
  461. </xsl:template>
  462. <!-- End apply support page rules -->
  463. <!-- HTML body -->
  464. <!--<xsl:template match="body">-->
  465. <xsl:template name="fsfe-body">
  466. <body>
  467. <!--Apply appopriate styles for the whole page -->
  468. <xsl:if test="/buildinfo/document/body/@class">
  469. <xsl:attribute name="class">
  470. <xsl:value-of select="/buildinfo/document/body/@class" />
  471. </xsl:attribute>
  472. </xsl:if>
  473. <xsl:if test="/buildinfo/document/body/@id">
  474. <xsl:attribute name="id"><xsl:value-of select="/buildinfo/document/body/@id" /></xsl:attribute>
  475. </xsl:if>
  476. <!-- For pages used on external web servers, use absolute URLs -->
  477. <xsl:variable name="urlprefix"><xsl:if test="/buildinfo/document/@external">https://fsfe.org</xsl:if></xsl:variable>
  478. <!-- First of all, a comment to make clear this is generated -->
  479. <xsl:comment>This file was generated by an XSLT script. Please do not edit.</xsl:comment>
  480. <xsl:element name="div">
  481. <xsl:attribute name="id">translations</xsl:attribute>
  482. <xsl:attribute name="class">alert</xsl:attribute>
  483. <xsl:element name="a">
  484. <xsl:attribute name="class">close</xsl:attribute>
  485. <xsl:attribute name="data-toggle">collapse</xsl:attribute>
  486. <xsl:attribute name="data-target">#translations</xsl:attribute>
  487. <xsl:attribute name="href">#</xsl:attribute>
  488. ×
  489. </xsl:element>
  490. <xsl:element name="a">
  491. <xsl:attribute name="class">contribute-translation</xsl:attribute>
  492. <xsl:attribute name="href">/contribute/translators/</xsl:attribute>
  493. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'translate'" /></xsl:call-template>
  494. </xsl:element>
  495. <xsl:element name="ul">
  496. <xsl:for-each select="/buildinfo/trlist/tr">
  497. <xsl:sort select="@id" />
  498. <xsl:choose>
  499. <xsl:when test="@id=/buildinfo/@language">
  500. <xsl:element name="li">
  501. <xsl:value-of select="." disable-output-escaping="yes"/>
  502. </xsl:element>
  503. </xsl:when>
  504. <xsl:otherwise>
  505. <xsl:element name="li">
  506. <xsl:element name="a">
  507. <xsl:attribute name="href"><xsl:value-of select="/buildinfo/@filename"/>.<xsl:value-of select="@id"/>.html</xsl:attribute>
  508. <xsl:value-of select="." disable-output-escaping="yes"/>
  509. </xsl:element>
  510. </xsl:element>
  511. </xsl:otherwise>
  512. </xsl:choose>
  513. </xsl:for-each>
  514. </xsl:element>
  515. <!--/ul-->
  516. </xsl:element>
  517. <!--/div#translations-->
  518. <xsl:element name="header">
  519. <xsl:attribute name="id">top</xsl:attribute>
  520. <xsl:element name="nav">
  521. <xsl:attribute name="id">menu</xsl:attribute>
  522. <xsl:attribute name="role">navigation</xsl:attribute>
  523. <xsl:element name="div">
  524. <xsl:attribute name="id">direct-links</xsl:attribute>
  525. <xsl:element name="span">
  526. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'go-to'" /></xsl:call-template>
  527. </xsl:element>
  528. <xsl:element name="a">
  529. <xsl:attribute name="href">#menu-list</xsl:attribute>
  530. <xsl:attribute name="id">direct-to-menu-list</xsl:attribute>
  531. <xsl:attribute name="data-toggle">collapse</xsl:attribute>
  532. <xsl:attribute name="data-target">#menu-list</xsl:attribute>
  533. <xsl:element name="i">
  534. <xsl:attribute name="class">fa fa-bars fa-lg</xsl:attribute>
  535. </xsl:element>
  536. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'menu'" /></xsl:call-template>
  537. </xsl:element>
  538. <xsl:element name="a">
  539. <xsl:attribute name="href">#content</xsl:attribute>
  540. <xsl:attribute name="id">direct-to-content</xsl:attribute>
  541. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'content'" /></xsl:call-template>
  542. </xsl:element>
  543. <xsl:element name="a">
  544. <xsl:attribute name="href">#full-menu</xsl:attribute>
  545. <xsl:attribute name="id">direct-to-full-menu</xsl:attribute>
  546. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'sitemap'" /></xsl:call-template>
  547. </xsl:element>
  548. <xsl:element name="a">
  549. <xsl:attribute name="href">#source</xsl:attribute>
  550. <xsl:attribute name="id">direct-to-source</xsl:attribute>
  551. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'page-info'" /></xsl:call-template>
  552. </xsl:element>
  553. <xsl:element name="a">
  554. <xsl:attribute name="href">/fellowship/login.html</xsl:attribute>
  555. <xsl:attribute name="id">direct-to-login</xsl:attribute>
  556. <xsl:element name="i">
  557. <xsl:attribute name="class">fa fa-user fa-lg</xsl:attribute>
  558. </xsl:element>
  559. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'fellowship/login'" /></xsl:call-template>
  560. </xsl:element>
  561. <xsl:element name="a">
  562. <xsl:attribute name="href">#translations</xsl:attribute>
  563. <xsl:attribute name="id">direct-to-translations</xsl:attribute>
  564. <xsl:attribute name="data-toggle">collapse</xsl:attribute>
  565. <xsl:attribute name="data-target">#translations</xsl:attribute>
  566. <xsl:element name="i">
  567. <xsl:attribute name="class">fa fa-globe fa-lg</xsl:attribute>
  568. </xsl:element>
  569. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'change-lang'" /></xsl:call-template>
  570. </xsl:element>
  571. <xsl:element name="a">
  572. <xsl:attribute name="href">/</xsl:attribute>
  573. <xsl:attribute name="id">direct-to-home</xsl:attribute>
  574. <xsl:element name="i">
  575. <xsl:attribute name="class">fa fa-home fa-lg</xsl:attribute>
  576. </xsl:element>
  577. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'fsfeurope'" /></xsl:call-template>
  578. </xsl:element>
  579. </xsl:element>
  580. <!--/div#direct-links-->
  581. <xsl:element name="ul">
  582. <xsl:attribute name="id">menu-list</xsl:attribute>
  583. <xsl:element name="li">
  584. <xsl:element name="a">
  585. <xsl:attribute name="href">/about/about.html</xsl:attribute>
  586. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'fsfe/about'" /></xsl:call-template>
  587. </xsl:element>
  588. </xsl:element>
  589. <xsl:element name="li">
  590. <xsl:element name="a">
  591. <xsl:attribute name="href">/projects/work.html</xsl:attribute>
  592. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'fsfe/projects'" /></xsl:call-template>
  593. </xsl:element>
  594. </xsl:element>
  595. <xsl:element name="li">
  596. <xsl:element name="a">
  597. <xsl:attribute name="href">/campaigns/campaigns.html</xsl:attribute>
  598. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'fsfe/campaigns'" /></xsl:call-template>
  599. </xsl:element>
  600. </xsl:element>
  601. <xsl:element name="li">
  602. <xsl:element name="a">
  603. <xsl:attribute name="href">/contribute/contribute.html</xsl:attribute>
  604. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'fsfe/help'" /></xsl:call-template>
  605. </xsl:element>
  606. </xsl:element>
  607. <xsl:element name="li">
  608. <xsl:element name="a">
  609. <xsl:attribute name="href">/press/press.html</xsl:attribute>
  610. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'fsfe/press'" /></xsl:call-template>
  611. </xsl:element>
  612. </xsl:element>
  613. </xsl:element>
  614. <!--/ul#menu-list-->
  615. <xsl:element name="div">
  616. <xsl:attribute name="id">search</xsl:attribute>
  617. <xsl:element name="form">
  618. <xsl:attribute name="method">get</xsl:attribute>
  619. <xsl:attribute name="action">http://fsfe.yacy.net/yacysearch.html</xsl:attribute>
  620. <xsl:element name="input">
  621. <xsl:attribute name="type">hidden</xsl:attribute>
  622. <xsl:attribute name="name">verify</xsl:attribute>
  623. <xsl:attribute name="value">true</xsl:attribute>
  624. </xsl:element>
  625. <xsl:element name="input">
  626. <xsl:attribute name="type">hidden</xsl:attribute>
  627. <xsl:attribute name="name">maximumRecords</xsl:attribute>
  628. <xsl:attribute name="value">10</xsl:attribute>
  629. </xsl:element>
  630. <xsl:element name="input">
  631. <xsl:attribute name="type">hidden</xsl:attribute>
  632. <xsl:attribute name="name">meanCount</xsl:attribute>
  633. <xsl:attribute name="value">5</xsl:attribute>
  634. </xsl:element>
  635. <xsl:element name="input">
  636. <xsl:attribute name="type">hidden</xsl:attribute>
  637. <xsl:attribute name="name">resource</xsl:attribute>
  638. <xsl:attribute name="value">local</xsl:attribute>
  639. </xsl:element>
  640. <xsl:element name="input">
  641. <xsl:attribute name="type">hidden</xsl:attribute>
  642. <xsl:attribute name="name">prefermaskfilter</xsl:attribute>
  643. <xsl:attribute name="value">.*.<xsl:value-of select="/buildinfo/@language"/>.html</xsl:attribute>
  644. </xsl:element>
  645. <xsl:element name="input">
  646. <xsl:attribute name="type">hidden</xsl:attribute>
  647. <xsl:attribute name="name">prefermaskfilter</xsl:attribute>
  648. <xsl:attribute name="value">.*</xsl:attribute>
  649. </xsl:element>
  650. <xsl:element name="input">
  651. <xsl:attribute name="type">hidden</xsl:attribute>
  652. <xsl:attribute name="name">display</xsl:attribute>
  653. <xsl:attribute name="value">2</xsl:attribute>
  654. </xsl:element>
  655. <xsl:element name="input">
  656. <xsl:attribute name="type">hidden</xsl:attribute>
  657. <xsl:attribute name="name">nav</xsl:attribute>
  658. <xsl:attribute name="value">hosts</xsl:attribute>
  659. </xsl:element>
  660. <xsl:element name="p">
  661. <xsl:element name="input">
  662. <xsl:attribute name="type">image</xsl:attribute>
  663. <xsl:attribute name="src">/graphics/icons/search-button.png</xsl:attribute>
  664. <xsl:attribute name="alt">
  665. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'search'" /></xsl:call-template>
  666. </xsl:attribute>
  667. </xsl:element>
  668. <xsl:element name="input">
  669. <xsl:attribute name="type">text</xsl:attribute>
  670. <xsl:attribute name="name">query</xsl:attribute>
  671. <xsl:attribute name="placeholder">
  672. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'search'" /></xsl:call-template>
  673. </xsl:attribute>
  674. </xsl:element>
  675. <!--
  676. <xsl:element name="input">
  677. <xsl:attribute name="type">submit</xsl:attribute>
  678. <xsl:attribute name="name">search</xsl:attribute>
  679. <xsl:attribute name="value">
  680. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'submit'" /></xsl:call-template>
  681. </xsl:attribute>
  682. </xsl:element>
  683. -->
  684. </xsl:element>
  685. </xsl:element>
  686. <!--/form-->
  687. </xsl:element>
  688. <!--/div#search-->
  689. </xsl:element>
  690. <!--/nav#menu-->
  691. <xsl:element name="div">
  692. <xsl:attribute name="id">masthead</xsl:attribute>
  693. <xsl:element name="div">
  694. <xsl:attribute name="id">link-home</xsl:attribute>
  695. <xsl:element name="a">
  696. <xsl:attribute name="href"><xsl:value-of select="$urlprefix"/>/fellowship/</xsl:attribute>
  697. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'rootpage'" /></xsl:call-template>
  698. </xsl:element>
  699. </xsl:element>
  700. <!--/div#link-home-->
  701. <xsl:element name="div">
  702. <xsl:attribute name="id">logo</xsl:attribute>
  703. <xsl:element name="span">
  704. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'fsfeurope'" /></xsl:call-template>
  705. </xsl:element>
  706. </xsl:element>
  707. <!--/div#logo-->
  708. <xsl:element name="div">
  709. <xsl:attribute name="id">motto</xsl:attribute>
  710. <xsl:element name="span"><xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'motto-fellowship'" /></xsl:call-template></xsl:element>
  711. <!-- TODO different motto content depending on planet (use 'motto-planet'), wiki (use 'motto-wiki'), or fsfe dot org, page, so we may have to change this to another way-->
  712. </xsl:element>
  713. <!--/div#motto-->
  714. </xsl:element>
  715. <!--/div#masthead-->
  716. </xsl:element>
  717. <!--/header#top-->
  718. <xsl:element name="div">
  719. <xsl:attribute name="id">notifications</xsl:attribute>
  720. <!-- Service notice (for downtime, upgrades, etc. enable this)
  721. <div id="service-notice">
  722. <div class="close">
  723. <a title="dismiss this notification">×</a>
  724. </div>
  725. <div class="text">
  726. <h1>Site currently under development</h1>
  727. <p>
  728. If you want to help out, <a
  729. href="/contribute/web/web.en.html">consider joining the
  730. web team</a>.
  731. </p>
  732. </div>
  733. </div>-->
  734. <!-- Outdated note -->
  735. <xsl:if test="/buildinfo/@outdated='yes'">
  736. <xsl:element name="div">
  737. <xsl:attribute name="class">alert warning red</xsl:attribute>
  738. <xsl:element name="a">
  739. <xsl:attribute name="class">close</xsl:attribute>
  740. <xsl:attribute name="data-dismiss">alert</xsl:attribute>
  741. <xsl:attribute name="href">#</xsl:attribute>
  742. <xsl:attribute name="aria-hidden">true</xsl:attribute>
  743. ×
  744. </xsl:element>
  745. <xsl:element name="p">
  746. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'outdated'" /></xsl:call-template>
  747. </xsl:element>
  748. </xsl:element>
  749. </xsl:if>
  750. <!-- Missing translation note -->
  751. <xsl:if test="/buildinfo/@language!=/buildinfo/document/@language">
  752. <xsl:element name="div">
  753. <xsl:attribute name="class">alert warning red</xsl:attribute>
  754. <xsl:element name="a">
  755. <xsl:attribute name="class">close</xsl:attribute>
  756. <xsl:attribute name="data-dismiss">alert</xsl:attribute>
  757. <xsl:attribute name="href">#</xsl:attribute>
  758. <xsl:attribute name="aria-hidden">true</xsl:attribute>
  759. ×
  760. </xsl:element>
  761. <xsl:element name="p">
  762. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'notranslation'" /></xsl:call-template>
  763. </xsl:element>
  764. </xsl:element>
  765. </xsl:if>
  766. <!-- Info box -->
  767. <xsl:element name="div">
  768. <xsl:attribute name="id">infobox</xsl:attribute>
  769. <!-- Add under construction message -->
  770. <xsl:if test = "/buildinfo/document/head/meta[@name='under-construction' and @content='true']">
  771. <xsl:element name="div">
  772. <xsl:attribute name="class">alert warning yellow</xsl:attribute>
  773. <xsl:element name="a">
  774. <xsl:attribute name="class">close</xsl:attribute>
  775. <xsl:attribute name="data-dismiss">alert</xsl:attribute>
  776. <xsl:attribute name="href">#</xsl:attribute>
  777. <xsl:attribute name="aria-hidden">true</xsl:attribute>
  778. ×
  779. </xsl:element>
  780. <xsl:element name="p">
  781. <xsl:call-template name="fsfe-gettext">
  782. <xsl:with-param name="id" select="'under-construction'" />
  783. </xsl:call-template>
  784. </xsl:element>
  785. </xsl:element>
  786. </xsl:if>
  787. <!-- Add project completed message -->
  788. <xsl:if test = "/buildinfo/document/head/meta[@name='project-complete' and @content='true']">
  789. <xsl:element name="div">
  790. <xsl:attribute name="class">alert warning green</xsl:attribute>
  791. <xsl:element name="a">
  792. <xsl:attribute name="class">close</xsl:attribute>
  793. <xsl:attribute name="data-dismiss">alert</xsl:attribute>
  794. <xsl:attribute name="href">#</xsl:attribute>
  795. <xsl:attribute name="aria-hidden">true</xsl:attribute>
  796. ×
  797. </xsl:element>
  798. <xsl:element name="p">
  799. <xsl:call-template name="fsfe-gettext">
  800. <xsl:with-param name="id" select="'project-complete'" />
  801. </xsl:call-template>
  802. </xsl:element>
  803. </xsl:element>
  804. </xsl:if>
  805. </xsl:element>
  806. <!-- Fundraising box
  807. <xsl:element name="div">
  808. <xsl:attribute name="id">fundraising</xsl:attribute>
  809. <xsl:element name="h2">
  810. <xsl:apply-templates select="/buildinfo/fundraising/call1/node()"/>
  811. </xsl:element>
  812. <xsl:element name="div">
  813. <xsl:attribute name="class">button</xsl:attribute>
  814. <xsl:apply-templates select="/buildinfo/fundraising/call2/node()"/>
  815. </xsl:element>
  816. <xsl:element name="div">
  817. <xsl:attribute name="class">button</xsl:attribute>
  818. <xsl:apply-templates select="/buildinfo/fundraising/call3/node()"/>
  819. </xsl:element>
  820. <xsl:element name="img">
  821. <xsl:attribute name="src">/graphics/wreath.png</xsl:attribute>
  822. <xsl:attribute name="alt">wreath</xsl:attribute>
  823. <xsl:attribute name="class">right</xsl:attribute>
  824. </xsl:element>
  825. <xsl:element name="p">
  826. <xsl:attribute name="class">call4</xsl:attribute>
  827. <xsl:apply-templates select="/buildinfo/fundraising/call4/node()"/>
  828. </xsl:element>
  829. disabling the progress bar
  830. <xsl:if test="/buildinfo/fundraising/current">
  831. <xsl:element name="div">
  832. <xsl:attribute name="class">percentbox</xsl:attribute>
  833. <xsl:element name="div">
  834. <xsl:attribute name="class">percentbar</xsl:attribute>
  835. <xsl:attribute name="style">width: 45.9%</xsl:attribute>
  836. </xsl:element>
  837. </xsl:element>
  838. <xsl:element name="p">
  839. <xsl:attribute name="class">current</xsl:attribute>
  840. <xsl:apply-templates select="/buildinfo/fundraising/current/node()"/>
  841. <xsl:text>€ 45 860</xsl:text>
  842. </xsl:element>
  843. <xsl:element name="p">
  844. <xsl:attribute name="class">target</xsl:attribute>
  845. <xsl:text>€ 100 000</xsl:text>
  846. </xsl:element>
  847. </xsl:if> c
  848. </xsl:element>-->
  849. <!-- End Fundraising box -->
  850. </xsl:element>
  851. <!--/div#notifications-->
  852. <xsl:element name="section">
  853. <xsl:attribute name="id">main</xsl:attribute>
  854. <xsl:attribute name="role">main</xsl:attribute>
  855. <xsl:element name="article">
  856. <xsl:attribute name="id">content</xsl:attribute>
  857. <xsl:if test="/buildinfo/document/body/@microformats">
  858. <xsl:attribute name="class"><xsl:value-of select="/buildinfo/document/body/@microformats" /></xsl:attribute>
  859. </xsl:if>
  860. <!-- Here goes the actual content of the <body> node of the input file -->
  861. <xsl:apply-templates select="body | /buildinfo/document/event/body | /buildinfo/document/news/body" />
  862. </xsl:element>
  863. <!--/article#content-->
  864. <xsl:if test = "/buildinfo/document/sidebar">
  865. <xsl:element name="aside">
  866. <xsl:attribute name="id">sidebar</xsl:attribute>
  867. <xsl:element name="ul">
  868. <!-- Fellowship portal menu -->
  869. <xsl:element name="li">
  870. <xsl:attribute name="class">fellowship</xsl:attribute>
  871. <xsl:element name="h3">
  872. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'fellowship/fellowship'" /></xsl:call-template>
  873. </xsl:element>
  874. <xsl:element name="ul">
  875. <xsl:variable name="menu"><xsl:value-of select="@id" /></xsl:variable>
  876. <xsl:for-each select="/buildinfo/menuset/menu[@parent='fellowship']">
  877. <xsl:sort select="@priority" />
  878. <xsl:variable name="id"><xsl:value-of select="@id" /></xsl:variable>
  879. <xsl:element name="li">
  880. <xsl:choose>
  881. <xsl:when test="not(string(.))">
  882. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  883. </xsl:when>
  884. <xsl:when test=". = concat(/buildinfo/@filename ,'.html')">
  885. <xsl:element name="span">
  886. <xsl:attribute name="id">selected</xsl:attribute>
  887. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  888. </xsl:element>
  889. </xsl:when>
  890. <xsl:otherwise>
  891. <xsl:element name="a">
  892. <xsl:attribute name="href"><xsl:value-of select="." /></xsl:attribute>
  893. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  894. </xsl:element>
  895. </xsl:otherwise>
  896. </xsl:choose>
  897. </xsl:element>
  898. </xsl:for-each>
  899. </xsl:element>
  900. </xsl:element>
  901. </xsl:element>
  902. <xsl:apply-templates select="/buildinfo/document/sidebar/node()" />
  903. <!--FIXME xsl:if test = "/buildinfo/document/sidebar/@news">
  904. <xsl:element name="h4">
  905. <xsl:call-template name="fsfe-gettext">
  906. <xsl:with-param name="id" select="'related-news'" />
  907. </xsl:call-template>
  908. </xsl:element>
  909. <ul class="placeholder"><li>
  910. <span class="dt-published">11 June 2013</span><a href="/news/2013/news-20130611-01.en.html">Filing taxes without non-free software: Slovak company appeals fines</a>
  911. </li></ul>
  912. <xsl:call-template name="show-news-sidebar" />
  913. </xsl:if-->
  914. <xsl:choose>
  915. <xsl:when test = "/buildinfo/document/sidebar/@promo = 'our-work'">
  916. <xsl:element name="h3">
  917. <xsl:attribute name="class">promo</xsl:attribute>
  918. <xsl:call-template name="fsfe-gettext">
  919. <xsl:with-param name="id" select="'our-work'" />
  920. </xsl:call-template>
  921. </xsl:element>
  922. <xsl:call-template name="fsfe-gettext">
  923. <xsl:with-param name="id" select="'our-work-intro'" />
  924. </xsl:call-template>
  925. <xsl:element name="a">
  926. <xsl:attribute name="href">/about/about.html</xsl:attribute>
  927. <xsl:attribute name="class">learn-more</xsl:attribute>
  928. <xsl:call-template name="fsfe-gettext">
  929. <xsl:with-param name="id" select="'learn-more'" />
  930. </xsl:call-template>
  931. </xsl:element>
  932. </xsl:when>
  933. <xsl:when test = "/buildinfo/document/sidebar/@promo = 'about-fsfe'">
  934. <xsl:element name="h3">
  935. <xsl:attribute name="class">promo</xsl:attribute>
  936. <xsl:call-template name="fsfe-gettext">
  937. <xsl:with-param name="id" select="'about-fsfe'" />
  938. </xsl:call-template>
  939. </xsl:element>
  940. <xsl:call-template name="fsfe-gettext">
  941. <xsl:with-param name="id" select="'about-fsfe-intro'" />
  942. </xsl:call-template>
  943. <xsl:element name="a">
  944. <xsl:attribute name="href">/about/about.html</xsl:attribute>
  945. <xsl:attribute name="class">learn-more</xsl:attribute>
  946. <xsl:call-template name="fsfe-gettext">
  947. <xsl:with-param name="id" select="'learn-more'" />
  948. </xsl:call-template>
  949. </xsl:element>
  950. </xsl:when>
  951. <xsl:when test = "/buildinfo/document/sidebar/@promo = 'donate'">
  952. <xsl:element name="h3">
  953. <xsl:attribute name="class">promo</xsl:attribute>
  954. <xsl:call-template name="fsfe-gettext">
  955. <xsl:with-param name="id" select="'donate'" />
  956. </xsl:call-template>
  957. </xsl:element>
  958. <xsl:call-template name="fsfe-gettext">
  959. <xsl:with-param name="id" select="'donate-paragraph'" />
  960. </xsl:call-template>
  961. <xsl:element name="a">
  962. <xsl:attribute name="href">/donate/donate.html?sidebar</xsl:attribute>
  963. <xsl:attribute name="class">learn-more</xsl:attribute>
  964. <xsl:call-template name="fsfe-gettext">
  965. <xsl:with-param name="id" select="'donate'" />
  966. </xsl:call-template>
  967. </xsl:element>
  968. </xsl:when>
  969. <xsl:when test = "/buildinfo/document/sidebar/@promo = 'no'">
  970. </xsl:when>
  971. <xsl:otherwise test = "/buildinfo/document/sidebar/@promo = 'about-fsfe'">
  972. <xsl:element name="h3">
  973. <xsl:attribute name="class">promo</xsl:attribute>
  974. <xsl:call-template name="fsfe-gettext">
  975. <xsl:with-param name="id" select="'about-fsfe'" />
  976. </xsl:call-template>
  977. </xsl:element>
  978. <xsl:call-template name="fsfe-gettext">
  979. <xsl:with-param name="id" select="'about-fsfe-intro'" />
  980. </xsl:call-template>
  981. <xsl:element name="a">
  982. <xsl:attribute name="href">/about/about.html</xsl:attribute>
  983. <xsl:attribute name="class">learn-more</xsl:attribute>
  984. <xsl:call-template name="fsfe-gettext">
  985. <xsl:with-param name="id" select="'learn-more'" />
  986. </xsl:call-template>
  987. </xsl:element>
  988. </xsl:otherwise>
  989. </xsl:choose>
  990. </xsl:element>
  991. <!--/aside#sidebar-->
  992. </xsl:if>
  993. <xsl:if test = "/buildinfo/document/legal">
  994. <xsl:element name="footer">
  995. <xsl:attribute name="class">copyright notice creativecommons</xsl:attribute>
  996. <xsl:choose>
  997. <xsl:when test = "/buildinfo/document/legal/license">
  998. <xsl:element name="a">
  999. <xsl:attribute name="href">
  1000. <xsl:value-of select="/buildinfo/document/legal/license"/>
  1001. </xsl:attribute>
  1002. <xsl:attribute name="rel">license</xsl:attribute>
  1003. <xsl:if test ="/buildinfo/document/legal/@type='cc-license'">
  1004. </xsl:if>
  1005. <xsl:value-of select="/buildinfo/document/legal/notice"/>
  1006. </xsl:element>
  1007. </xsl:when>
  1008. <xsl:otherwise>
  1009. <xsl:element name="span">
  1010. <xsl:value-of select="/buildinfo/document/legal/notice"/>
  1011. </xsl:element>
  1012. </xsl:otherwise>
  1013. </xsl:choose>
  1014. </xsl:element>
  1015. <!--/footer-->
  1016. </xsl:if>
  1017. <!--Depreciated: it's here only for "backward compatibility" cc license way-->
  1018. <xsl:if test = "string(/buildinfo/document/head/meta[@name='cc-license']/@content)">
  1019. <xsl:element name="footer">
  1020. <xsl:element name="div">
  1021. <xsl:attribute name="id">cc-licenses</xsl:attribute>
  1022. <xsl:element name="p">
  1023. <xsl:element name="img">
  1024. <xsl:attribute name="src">/graphics/cc-logo.png</xsl:attribute>
  1025. <xsl:attribute name="alt">Creative Commons logo</xsl:attribute>
  1026. </xsl:element> <!-- </img> -->
  1027. <xsl:for-each select="/buildinfo/document/head/meta[@name='cc-license']">
  1028. <xsl:value-of select="@content"/> •
  1029. </xsl:for-each>
  1030. <!--<xsl:value-of select="/buildinfo/document/head/meta[@name='cc-license-1']/@content" /> • -->
  1031. </xsl:element> <!-- </p> -->
  1032. </xsl:element> <!-- </div> -->
  1033. <!-- End cc licenses -->
  1034. </xsl:element>
  1035. <!--/footer-->
  1036. </xsl:if>
  1037. </xsl:element>
  1038. <!--/section#main-->
  1039. <!--TODO nice to have a breadcrumb navigation: xsl:element name="nav">
  1040. <xsl:attribute name="id">breadcrumbs</xsl:attribute>
  1041. <a href="#"><i class="fa fa-home"></i> FSFE</a>
  1042. <a href="#">Work</a>
  1043. <a href="#">Open Standards</a>
  1044. <a href="#">Minimalgebot für…i <i class="fa fa-anchor"></i></a>
  1045. </xsl:element-->
  1046. <!--/nav#breadcrumbs-->
  1047. <xsl:element name="section">
  1048. <xsl:attribute name="id">followup</xsl:attribute>
  1049. <!--
  1050. TODO Okay, so the idea here is to be able to display different "followup" boxes. I would suggest doing it like this:
  1051. - the xml page shold be able to say that it wants to show a
  1052. specific boxe and would contain e.g.
  1053. <followup>subscribe-newsletter</followup> so the page would show
  1054. the following box.
  1055. - if the xml page does not contain any <followup> variable, then we should be able to set a default followup box on our own.
  1056. This has the advantage that depending on priorities, we can show
  1057. a box in all our pages at the bottom. For instance, when we are
  1058. in the middle of our yearly fundraising, we could set the default
  1059. to a "fundraising" box.
  1060. For now, this is just a placeholder, so all pages show the
  1061. "Subscribe to newsletter" box. Below that, some examples of boxes we
  1062. should make.
  1063. -->
  1064. <xsl:choose>
  1065. <xsl:when test="/buildinfo/document/followup = 'subscribe-nl'">
  1066. <xsl:attribute name="class">subscribe-nl</xsl:attribute>
  1067. <xsl:element name="h2"><xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'subscribe-newsletter'" /></xsl:call-template></xsl:element>
  1068. <xsl:call-template name="subscribe-nl" />
  1069. </xsl:when>
  1070. <xsl:when test="/buildinfo/document/followup = 'support'">
  1071. <xsl:attribute name="class">support</xsl:attribute>
  1072. <xsl:element name="h2"><xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'show-support'" /></xsl:call-template></xsl:element>
  1073. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'show-support-paragraph'" /></xsl:call-template>
  1074. <xsl:element name="a">
  1075. <xsl:attribute name="href">/support/?followupbox</xsl:attribute>
  1076. <xsl:attribute name="class">btn</xsl:attribute>
  1077. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'support-fsfe'" /></xsl:call-template>
  1078. </xsl:element>
  1079. </xsl:when>
  1080. <xsl:when test="/buildinfo/document/followup = 'donate'">
  1081. <xsl:attribute name="class">donate</xsl:attribute>
  1082. <xsl:element name="h2">
  1083. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'donate'" /></xsl:call-template>
  1084. </xsl:element>
  1085. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'donate-paragraph'" /></xsl:call-template>
  1086. <xsl:element name="a">
  1087. <xsl:attribute name="href">/donate/donate.html?followupbox</xsl:attribute>
  1088. <xsl:attribute name="class">btn</xsl:attribute>
  1089. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'donate'" /></xsl:call-template>
  1090. </xsl:element>
  1091. </xsl:when>
  1092. <xsl:when test="/buildinfo/document/followup = 'join'">
  1093. <xsl:attribute name="class">join</xsl:attribute>
  1094. <xsl:element name="h2">
  1095. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'join-fellowship'" /></xsl:call-template>
  1096. </xsl:element>
  1097. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'join-paragraph'" /></xsl:call-template>
  1098. <xsl:element name="a">
  1099. <xsl:attribute name="href">/fellowship/ams/join.php?ref=followupbox</xsl:attribute>
  1100. <xsl:attribute name="class">btn</xsl:attribute>
  1101. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'join'" /></xsl:call-template>
  1102. </xsl:element>
  1103. </xsl:when>
  1104. <xsl:when test="/buildinfo/document/followup = 'no'">
  1105. <xsl:attribute name="class">hide</xsl:attribute>
  1106. </xsl:when>
  1107. <xsl:otherwise>
  1108. <xsl:attribute name="class">subscribe-nl</xsl:attribute>
  1109. <xsl:element name="h2"><xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'subscribe-newsletter'" /></xsl:call-template></xsl:element>
  1110. <xsl:call-template name="subscribe-nl" />
  1111. </xsl:otherwise>
  1112. </xsl:choose>
  1113. </xsl:element>
  1114. <!--/section#followup-->
  1115. <xsl:element name="footer">
  1116. <xsl:attribute name="id">bottom</xsl:attribute>
  1117. <xsl:element name="nav">
  1118. <xsl:attribute name="id">full-menu</xsl:attribute>
  1119. <xsl:element name="a">
  1120. <xsl:attribute name="href">#top</xsl:attribute>
  1121. <xsl:attribute name="id">direct-to-top</xsl:attribute>
  1122. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'go-top'" /></xsl:call-template>
  1123. <!--FIXME translate that-->
  1124. </xsl:element>
  1125. <xsl:element name="ul">
  1126. <xsl:attribute name="id">full-menu-list</xsl:attribute>
  1127. <!-- FSFE portal menu -->
  1128. <xsl:element name="li">
  1129. <xsl:attribute name="class">fsfe</xsl:attribute>
  1130. <xsl:element name="a">
  1131. <xsl:attribute name="href">/</xsl:attribute>
  1132. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'fsfeurope'" /></xsl:call-template>
  1133. </xsl:element>
  1134. <xsl:element name="ul">
  1135. <xsl:variable name="menu"><xsl:value-of select="@id" /></xsl:variable>
  1136. <xsl:for-each select="/buildinfo/menuset/menu[@parent='fsfe']">
  1137. <!--<xsl:sort select="@id"/>-->
  1138. <xsl:sort select="@priority" />
  1139. <xsl:variable name="id"><xsl:value-of select="@id" /></xsl:variable>
  1140. <xsl:element name="li">
  1141. <xsl:choose>
  1142. <xsl:when test="not(string(.))">
  1143. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  1144. </xsl:when>
  1145. <xsl:when test=". = concat(/buildinfo/@filename ,'.html')">
  1146. <xsl:element name="span">
  1147. <xsl:attribute name="id">selected</xsl:attribute>
  1148. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  1149. </xsl:element>
  1150. </xsl:when>
  1151. <xsl:otherwise>
  1152. <xsl:element name="a">
  1153. <xsl:attribute name="href"><xsl:value-of select="." /></xsl:attribute>
  1154. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  1155. </xsl:element>
  1156. </xsl:otherwise>
  1157. </xsl:choose>
  1158. </xsl:element> <!-- /li -->
  1159. </xsl:for-each>
  1160. </xsl:element>
  1161. <!--/ul-->
  1162. </xsl:element>
  1163. <!--/li-->
  1164. <!-- Support portal menu item -->
  1165. <xsl:element name="li">
  1166. <xsl:attribute name="class">support</xsl:attribute>
  1167. <xsl:element name="a">
  1168. <xsl:attribute name="href">/donate/donate.html?fullmenu</xsl:attribute>
  1169. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'support/donate'" /></xsl:call-template>
  1170. </xsl:element>
  1171. <xsl:element name="ul">
  1172. <xsl:variable name="menu"><xsl:value-of select="@id" /></xsl:variable>
  1173. <xsl:for-each select="/buildinfo/menuset/menu[@parent='support']">
  1174. <!--<xsl:sort select="@id"/>-->
  1175. <xsl:sort select="@priority" />
  1176. <xsl:variable name="id"><xsl:value-of select="@id" /></xsl:variable>
  1177. <xsl:element name="li">
  1178. <xsl:choose>
  1179. <xsl:when test="not(string(.))">
  1180. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  1181. </xsl:when>
  1182. <xsl:when test=". = concat(/buildinfo/@filename ,'.html')">
  1183. <xsl:element name="span">
  1184. <xsl:attribute name="id">selected</xsl:attribute>
  1185. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  1186. </xsl:element>
  1187. </xsl:when>
  1188. <xsl:otherwise>
  1189. <xsl:element name="a">
  1190. <xsl:attribute name="href"><xsl:value-of select="." /></xsl:attribute>
  1191. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  1192. </xsl:element>
  1193. </xsl:otherwise>
  1194. </xsl:choose>
  1195. </xsl:element> <!-- /li -->
  1196. </xsl:for-each>
  1197. </xsl:element>
  1198. <!--/ul-->
  1199. <!-- Fellowship portal menu -->
  1200. <xsl:element name="ul">
  1201. <xsl:attribute name="class">fellowship</xsl:attribute>
  1202. <xsl:element name="li">
  1203. <xsl:attribute name="class">fellowship</xsl:attribute>
  1204. <xsl:element name="a">
  1205. <xsl:attribute name="href">/fellowship/</xsl:attribute>
  1206. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'fellowship/fellowship'" /></xsl:call-template>
  1207. </xsl:element>
  1208. <xsl:element name="ul">
  1209. <xsl:variable name="menu"><xsl:value-of select="@id" /></xsl:variable>
  1210. <xsl:for-each select="/buildinfo/menuset/menu[@parent='fellowship']">
  1211. <!--<xsl:sort select="@id"/>-->
  1212. <xsl:sort select="@priority" />
  1213. <xsl:variable name="id"><xsl:value-of select="@id" /></xsl:variable>
  1214. <xsl:element name="li">
  1215. <xsl:choose>
  1216. <xsl:when test="not(string(.))">
  1217. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  1218. </xsl:when>
  1219. <xsl:when test=". = concat(/buildinfo/@filename ,'.html')">
  1220. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  1221. </xsl:when>
  1222. <xsl:otherwise>
  1223. <xsl:element name="a">
  1224. <xsl:attribute name="href"><xsl:value-of select="." /></xsl:attribute>
  1225. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  1226. </xsl:element>
  1227. </xsl:otherwise>
  1228. </xsl:choose>
  1229. </xsl:element> <!-- /li -->
  1230. </xsl:for-each>
  1231. </xsl:element><!-- end ul -->
  1232. </xsl:element>
  1233. </xsl:element>
  1234. </xsl:element> <!-- /li -->
  1235. <!-- campaigns -->
  1236. <xsl:element name="li">
  1237. <xsl:attribute name="class">campaigns</xsl:attribute>
  1238. <xsl:element name="a">
  1239. <xsl:attribute name="href">/campaigns/campaigns.html</xsl:attribute>
  1240. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'fsfe/campaigns'" /></xsl:call-template>
  1241. </xsl:element>
  1242. <xsl:element name="ul">
  1243. <xsl:variable name="menu"><xsl:value-of select="@id" /></xsl:variable>
  1244. <xsl:for-each select="/buildinfo/menuset/menu[@parent='campaigns']">
  1245. <!--<xsl:sort select="@id"/>-->
  1246. <xsl:sort select="@priority" />
  1247. <xsl:variable name="id"><xsl:value-of select="@id" /></xsl:variable>
  1248. <xsl:element name="li">
  1249. <xsl:choose>
  1250. <xsl:when test="not(string(.))">
  1251. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  1252. </xsl:when>
  1253. <xsl:when test=". = concat(/buildinfo/@filename ,'.html')">
  1254. <xsl:element name="span">
  1255. <xsl:attribute name="id">selected</xsl:attribute>
  1256. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  1257. </xsl:element>
  1258. </xsl:when>
  1259. <xsl:otherwise>
  1260. <xsl:element name="a">
  1261. <xsl:attribute name="href"><xsl:value-of select="." /></xsl:attribute>
  1262. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  1263. </xsl:element>
  1264. </xsl:otherwise>
  1265. </xsl:choose>
  1266. </xsl:element> <!-- /li -->
  1267. </xsl:for-each>
  1268. </xsl:element>
  1269. <!--/ul-->
  1270. </xsl:element> <!-- /li -->
  1271. <!-- Planet portal menu -->
  1272. <xsl:element name="li">
  1273. <xsl:attribute name="class">planet</xsl:attribute>
  1274. <xsl:element name="a">
  1275. <xsl:attribute name="href">/news/</xsl:attribute>
  1276. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'news/news'" /></xsl:call-template>
  1277. </xsl:element>
  1278. <!-- causes validation errors, needs li to pass validator?
  1279. <xsl:element name="ul">
  1280. </xsl:element>-->
  1281. <xsl:element name="ul">
  1282. <xsl:variable name="menu"><xsl:value-of select="@id" /></xsl:variable>
  1283. <xsl:for-each select="/buildinfo/menuset/menu[@parent='news']">
  1284. <!--<xsl:sort select="@id"/>-->
  1285. <xsl:sort select="@priority" />
  1286. <xsl:variable name="id"><xsl:value-of select="@id" /></xsl:variable>
  1287. <xsl:element name="li">
  1288. <xsl:choose>
  1289. <xsl:when test="not(string(.))">
  1290. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  1291. </xsl:when>
  1292. <xsl:when test=". = concat(/buildinfo/@filename ,'.html')">
  1293. <xsl:element name="span">
  1294. <xsl:attribute name="id">selected</xsl:attribute>
  1295. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  1296. </xsl:element>
  1297. </xsl:when>
  1298. <xsl:otherwise>
  1299. <xsl:element name="a">
  1300. <xsl:attribute name="href"><xsl:value-of select="." /></xsl:attribute>
  1301. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  1302. </xsl:element>
  1303. </xsl:otherwise>
  1304. </xsl:choose>
  1305. </xsl:element> <!-- /li -->
  1306. </xsl:for-each>
  1307. </xsl:element>
  1308. <!--/ul-->
  1309. </xsl:element>
  1310. <!-- Legal team portal menu -->
  1311. <xsl:element name="li">
  1312. <xsl:attribute name="class">ftf</xsl:attribute>
  1313. <xsl:element name="a">
  1314. <xsl:attribute name="href">/legal/</xsl:attribute>
  1315. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'ftf/legal'" /></xsl:call-template>
  1316. </xsl:element>
  1317. <!-- causes validation errors, needs li to pass validator?
  1318. <xsl:element name="ul">
  1319. </xsl:element>-->
  1320. <xsl:element name="ul">
  1321. <xsl:variable name="menu"><xsl:value-of select="@id" /></xsl:variable>
  1322. <xsl:for-each select="/buildinfo/menuset/menu[@parent='ftf']">
  1323. <!--<xsl:sort select="@id"/>-->
  1324. <xsl:sort select="@priority" />
  1325. <xsl:variable name="id"><xsl:value-of select="@id" /></xsl:variable>
  1326. <xsl:element name="li">
  1327. <xsl:choose>
  1328. <xsl:when test="not(string(.))">
  1329. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  1330. </xsl:when>
  1331. <xsl:when test=". = concat(/buildinfo/@filename ,'.html')">
  1332. <xsl:element name="span">
  1333. <xsl:attribute name="id">selected</xsl:attribute>
  1334. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  1335. </xsl:element>
  1336. </xsl:when>
  1337. <xsl:otherwise>
  1338. <xsl:element name="a">
  1339. <xsl:attribute name="href"><xsl:value-of select="." /></xsl:attribute>
  1340. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  1341. </xsl:element>
  1342. </xsl:otherwise>
  1343. </xsl:choose>
  1344. </xsl:element> <!-- /li -->
  1345. </xsl:for-each>
  1346. </xsl:element>
  1347. <!--/ul-->
  1348. </xsl:element>
  1349. <!-- free software section portal menu -->
  1350. <xsl:element name="li">
  1351. <xsl:attribute name="class">fs</xsl:attribute>
  1352. <xsl:element name="a">
  1353. <xsl:attribute name="href">/freesoftware/</xsl:attribute>
  1354. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'fs/fs'" /></xsl:call-template>
  1355. </xsl:element>
  1356. <!-- causes validation errors, needs li to pass validator?
  1357. <xsl:element name="ul">
  1358. </xsl:element>-->
  1359. <xsl:element name="ul">
  1360. <xsl:variable name="menu"><xsl:value-of select="@id" /></xsl:variable>
  1361. <xsl:for-each select="/buildinfo/menuset/menu[@parent='fs']">
  1362. <!--<xsl:sort select="@id"/>-->
  1363. <xsl:sort select="@priority" />
  1364. <xsl:variable name="id"><xsl:value-of select="@id" /></xsl:variable>
  1365. <xsl:element name="li">
  1366. <xsl:choose>
  1367. <xsl:when test="not(string(.))">
  1368. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  1369. </xsl:when>
  1370. <xsl:when test=". = concat(/buildinfo/@filename ,'.html')">
  1371. <xsl:element name="span">
  1372. <xsl:attribute name="id">selected</xsl:attribute>
  1373. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  1374. </xsl:element>
  1375. </xsl:when>
  1376. <xsl:otherwise>
  1377. <xsl:element name="a">
  1378. <xsl:attribute name="href"><xsl:value-of select="." /></xsl:attribute>
  1379. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="$id" /></xsl:call-template>
  1380. </xsl:element>
  1381. </xsl:otherwise>
  1382. </xsl:choose>
  1383. </xsl:element> <!-- /li -->
  1384. </xsl:for-each>
  1385. </xsl:element>
  1386. <!--/ul-->
  1387. </xsl:element>
  1388. </xsl:element>
  1389. <!--/ul#menu-list-->
  1390. </xsl:element>
  1391. <!--/nav#full-menu-->
  1392. <xsl:element name="hr" />
  1393. <xsl:element name="section">
  1394. <xsl:attribute name="id">source</xsl:attribute>
  1395. <!-- "Last changed" magic -->
  1396. <p>
  1397. <xsl:variable name="timestamp">
  1398. <xsl:value-of select="/buildinfo/document/timestamp"/>
  1399. </xsl:variable>
  1400. <!-- FIXME: over time, all pages should have the timestamp -->
  1401. <!-- tags, so this conditional could be removed -->
  1402. <xsl:if test="string-length($timestamp) &gt; 0">
  1403. <xsl:variable name="Date">
  1404. <xsl:value-of select="substring-before(substring-after($timestamp, 'Date: '), ' $')"/>
  1405. </xsl:variable>
  1406. <xsl:variable name="Author">
  1407. <xsl:value-of select="substring-before(substring-after($timestamp, 'Author: '), ' $')"/>
  1408. </xsl:variable>
  1409. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'lastchanged'" /></xsl:call-template>
  1410. <xsl:value-of select="translate ($Date, '/', '-')"/>
  1411. (<xsl:value-of select="$Author"/>)
  1412. </xsl:if>
  1413. </p>
  1414. <ul>
  1415. <li>
  1416. <!-- Link to the XHTML source -->
  1417. <xsl:element name="a">
  1418. <xsl:attribute name="href">
  1419. <xsl:text>/source</xsl:text>
  1420. <xsl:value-of select="/buildinfo/@filename"/>
  1421. <xsl:text>.</xsl:text>
  1422. <xsl:value-of select="/buildinfo/document/@language"/>
  1423. <xsl:text>.xhtml</xsl:text>
  1424. </xsl:attribute>
  1425. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'source'" /></xsl:call-template>
  1426. </xsl:element>
  1427. </li>
  1428. <li>
  1429. <a href="/contribute/web/"><xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'contribute-web'" /></xsl:call-template></a>
  1430. </li>
  1431. </ul>
  1432. <p>
  1433. <a href="/contribute/translators/">
  1434. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'translate'" /></xsl:call-template>
  1435. </a>
  1436. <!-- Insert the appropriate translation notice -->
  1437. <xsl:if test="/buildinfo/document/@language!=/buildinfo/@original">
  1438. <xsl:element name="br"></xsl:element>
  1439. <xsl:choose>
  1440. <xsl:when test="/buildinfo/document/translator">
  1441. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'translator1a'" /></xsl:call-template>
  1442. <xsl:value-of select="/buildinfo/document/translator"/>
  1443. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'translator1b'" /></xsl:call-template>
  1444. </xsl:when>
  1445. <xsl:otherwise>
  1446. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'translator2'" /></xsl:call-template>
  1447. </xsl:otherwise>
  1448. </xsl:choose>
  1449. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'translator3a'" /></xsl:call-template>
  1450. <xsl:element name="a">
  1451. <xsl:attribute name="href">
  1452. <xsl:value-of select="/buildinfo/@filename"/>
  1453. <xsl:text>.en.html</xsl:text>
  1454. </xsl:attribute>
  1455. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'translator3b'" /></xsl:call-template>
  1456. </xsl:element>
  1457. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'translator3c'" /></xsl:call-template>
  1458. </xsl:if>
  1459. </p>
  1460. </xsl:element>
  1461. <!--/section#source-->
  1462. <xsl:element name="section">
  1463. <xsl:attribute name="id">legal-info</xsl:attribute>
  1464. <p>Copyright © 2001-2014 <a href="/"><xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'fsfeurope'" /></xsl:call-template></a>.</p>
  1465. <ul>
  1466. <li><a href="/contact/contact.html"> <xsl:call-template
  1467. name="fsfe-gettext"><xsl:with-param name="id"
  1468. select="'contact-us'" /></xsl:call-template></a></li>
  1469. <li><a href="/about/legal/imprint.html"> <xsl:call-template
  1470. name="fsfe-gettext"><xsl:with-param name="id"
  1471. select="'imprint'" /></xsl:call-template> </a> /
  1472. <a href="/about/legal/imprint.html#id-privacy-policy" class="privacy-policy"> <xsl:call-template
  1473. name="fsfe-gettext"><xsl:with-param name="id"
  1474. select="'privacy-policy'" /></xsl:call-template> </a> </li>
  1475. </ul>
  1476. <p><xsl:call-template name="fsfe-gettext"><xsl:with-param name="id"
  1477. select="'permission'" /></xsl:call-template></p>
  1478. </xsl:element>
  1479. <!--/section#legal-info-->
  1480. <xsl:element name="section">
  1481. <xsl:attribute name="id">sister-organisations</xsl:attribute>
  1482. <xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'fsfnetwork'" /></xsl:call-template>
  1483. </xsl:element>
  1484. <!--/section#sister-organisations-->
  1485. </xsl:element>
  1486. <!--/footer#bottom-->
  1487. <!-- Piwik -->
  1488. <script type="text/javascript">
  1489. //enable piwik on plain text page only
  1490. pkBaseURL = "http://piwik.fsfe.org/";
  1491. if ("http:" == document.location.protocol) {
  1492. document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
  1493. }
  1494. </script>
  1495. <script type="text/javascript">
  1496. try {
  1497. var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 4);
  1498. piwikTracker.trackPageView();
  1499. piwikTracker.enableLinkTracking();
  1500. } catch( err ) {}
  1501. </script>
  1502. <!-- End Piwik Tracking Code -->
  1503. </body>
  1504. </xsl:template>
  1505. <!-- Insert local menu -->
  1506. <xsl:template match="localmenu">
  1507. <xsl:variable name="set">
  1508. <xsl:choose>
  1509. <xsl:when test="@set">
  1510. <xsl:value-of select="@set"/>
  1511. </xsl:when>
  1512. <xsl:otherwise>
  1513. <xsl:text>0</xsl:text>
  1514. </xsl:otherwise>
  1515. </xsl:choose>
  1516. </xsl:variable>
  1517. <xsl:variable name="dir">
  1518. <xsl:value-of select="/buildinfo/@dirname"/>
  1519. </xsl:variable>
  1520. <xsl:variable name="language">
  1521. <xsl:value-of select="/buildinfo/@language"/>
  1522. </xsl:variable>
  1523. <xsl:element name="div">
  1524. <xsl:attribute name="class">localmenu</xsl:attribute>
  1525. <xsl:element name="p">
  1526. <xsl:text>[ </xsl:text>
  1527. <xsl:for-each select="/buildinfo/localmenuset/localmenuitems/menu[@dir=$dir and @set=$set]">
  1528. <xsl:sort select="@id"/>
  1529. <xsl:variable name="style"><xsl:value-of select="@style"/></xsl:variable>
  1530. <xsl:variable name="id"><xsl:value-of select="@id"/></xsl:variable>
  1531. <xsl:variable name="localmenutext">
  1532. <xsl:choose>
  1533. <xsl:when
  1534. test="/buildinfo/localmenuset/translate/lang_part[@dir=$dir and @id=$id and @language=$language]">
  1535. <xsl:value-of
  1536. select="/buildinfo/localmenuset/translate/lang_part[@dir=$dir and @id=$id and @language=$language]"/>
  1537. </xsl:when>
  1538. <xsl:otherwise>
  1539. <xsl:value-of
  1540. select="/buildinfo/localmenuset/translate/lang_part[@dir=$dir and @id=$id and @language='en']"/>
  1541. </xsl:otherwise>
  1542. </xsl:choose>
  1543. </xsl:variable>
  1544. <xsl:element name="span">
  1545. <xsl:attribute name="class">local_menu_item</xsl:attribute>
  1546. <xsl:choose>
  1547. <xsl:when test="not(substring-before(concat(/buildinfo/@filename ,'.html'), string(.)))">
  1548. <xsl:element name="a">
  1549. <xsl:attribute name="href"><xsl:value-of select="."/></xsl:attribute>
  1550. <xsl:value-of select="$localmenutext"/>
  1551. </xsl:element>
  1552. </xsl:when>
  1553. <xsl:otherwise>
  1554. <xsl:attribute name="href">bamboo</xsl:attribute>
  1555. <xsl:value-of select="$localmenutext"/>
  1556. </xsl:otherwise>
  1557. </xsl:choose>
  1558. </xsl:element>
  1559. <xsl:if test="position()!=last()">
  1560. <xsl:choose>
  1561. <xsl:when test="$style='number'">
  1562. <xsl:text> | </xsl:text>
  1563. </xsl:when>
  1564. <xsl:otherwise>
  1565. <xsl:text> ] [ </xsl:text>
  1566. </xsl:otherwise>
  1567. </xsl:choose>
  1568. </xsl:if>
  1569. </xsl:for-each>
  1570. <xsl:text> ]</xsl:text>
  1571. </xsl:element><!--end wrapper-->
  1572. </xsl:element>
  1573. </xsl:template>
  1574. <!-- Ignore "latin" tags, used only for pritable material -->
  1575. <xsl:template match="latin">
  1576. <xsl:apply-templates select="@*|node()"/>
  1577. </xsl:template>
  1578. <!-- If no template matching <body> is found in the current page's XSL file, this one will be used -->
  1579. <xsl:template match="body" priority="-1">
  1580. <xsl:apply-templates />
  1581. </xsl:template>
  1582. <!-- Do not copy non-HTML elements to output -->
  1583. <xsl:template match="timestamp|
  1584. buildinfo/document/translator|
  1585. buildinfo/set|
  1586. buildinfo/textset|
  1587. buildinfo/textsetbackup|
  1588. buildinfo/menuset|
  1589. buildinfo/trlist|
  1590. buildinfo/fundraising|
  1591. buildinfo/localmenuset|
  1592. buildinfo/document/tags|
  1593. buildinfo/document/legal|
  1594. buildinfo/document/author|
  1595. buildinfo/document/date|
  1596. buildinfo/document/download|
  1597. buildinfo/document/followup"/>
  1598. <xsl:template match="set | tags | text"/>
  1599. <!-- For all other nodes, copy verbatim -->
  1600. <xsl:template match="@*|node()" priority="-1">
  1601. <xsl:copy>
  1602. <xsl:apply-templates select="@* | node()"/>
  1603. </xsl:copy>
  1604. </xsl:template>
  1605. </xsl:stylesheet>