loginform.xsl 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. -->
  4. <xsl:stylesheet
  5. xmlns="http://www.w3.org/1999/xhtml"
  6. xmlns:h="http://www.w3.org/1999/xhtml"
  7. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  8. version="1.0">
  9. <xsl:output
  10. method="html"
  11. doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
  12. doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"/>
  13. <xsl:variable name="xml_base" select="/*/@xml:base"/>
  14. <xsl:variable name="xml_base_pub" select="concat($xml_base,'o')"/>
  15. <xsl:variable name="skin_base" select="concat($xml_base,'themes/current')"/>
  16. <xsl:variable name="cgi_base" select="concat($xml_base,'seppo.cgi')"/>
  17. <xsl:template match="/">
  18. <xsl:apply-templates select="h:html"/>
  19. </xsl:template>
  20. <xsl:template match="h:html">
  21. <html xmlns="http://www.w3.org/1999/xhtml" class="logged-out">
  22. <xsl:apply-templates select="h:head"/>
  23. <xsl:apply-templates select="h:body"/>
  24. </html>
  25. </xsl:template>
  26. <xsl:template match="h:head">
  27. <head>
  28. <meta content="text/html; charset=utf-8" http-equiv="content-type"/>
  29. <!-- https://developer.apple.com/library/IOS/documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html#//apple_ref/doc/uid/TP40006509-SW26 -->
  30. <!-- http://maddesigns.de/meta-viewport-1817.html -->
  31. <!-- meta name="viewport" content="width=device-width"/ -->
  32. <!-- http://www.quirksmode.org/blog/archives/2013/10/initialscale1_m.html -->
  33. <meta name="viewport" content="width=device-width,initial-scale=1.0"/>
  34. <!-- meta name="viewport" content="width=400"/ -->
  35. <link href="{$skin_base}/style.css" rel="stylesheet" type="text/css"/>
  36. <title><xsl:value-of select="h:title"/></title>
  37. </head>
  38. </xsl:template>
  39. <xsl:template match="h:body">
  40. <body>
  41. <div class="container">
  42. <noscript><p>JavaScript deactivated, almost fully functional, but <em>nicer</em> if on.</p></noscript>
  43. <xsl:apply-templates select="h:form"/>
  44. </div>
  45. </body>
  46. </xsl:template>
  47. <xsl:template match="h:form[@name='loginform']">
  48. <label form="{@name}" class="h1"><xsl:value-of select="../../h:head/h:title"/></label>
  49. <form method="{@method}" name="{@name}">
  50. <input name="token" type="hidden" value="{h:input[@name='token']/@value}"/>
  51. <input name="returnurl" type="hidden" value="{h:input[@name='returnurl']/@value}"/>
  52. <input tabindex="100" name="login" type="text" autofocus="autofocus" placeholder="Who's there?" value="{h:input[@name='login']/@value}"/>
  53. <input tabindex="200" name="password" type="password" placeholder="Do you know the password?"/>
  54. <button tabindex="300" type="submit">Login</button>
  55. </form>
  56. </xsl:template>
  57. </xsl:stylesheet>