linkform.xsl 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. https://www.w3.org/TR/xslt-10/
  4. -->
  5. <xsl:stylesheet
  6. xmlns="http://www.w3.org/1999/xhtml"
  7. xmlns:h="http://www.w3.org/1999/xhtml"
  8. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  9. version="1.0">
  10. <xsl:output
  11. method="html"
  12. doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
  13. doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"/>
  14. <xsl:variable name="xml_base" select="/*/@xml:base"/>
  15. <xsl:variable name="xml_base_pub" select="concat($xml_base,'o')"/>
  16. <xsl:variable name="skin_base" select="concat($xml_base,'themes/current')"/>
  17. <xsl:variable name="cgi_base" select="concat($xml_base,'seppo.cgi')"/>
  18. <xsl:template match="/">
  19. <xsl:apply-templates select="h:html"/>
  20. </xsl:template>
  21. <xsl:template match="h:html">
  22. <html id="do-post" xmlns="http://www.w3.org/1999/xhtml" class="logged-in" data-xml-base-pub="{$xml_base_pub}">
  23. <xsl:apply-templates select="h:head"/>
  24. <xsl:apply-templates select="h:body"/>
  25. </html>
  26. </xsl:template>
  27. <xsl:template match="h:head">
  28. <head>
  29. <meta content="text/html; charset=utf-8" http-equiv="content-type"/>
  30. <!-- https://developer.apple.com/library/IOS/documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html#//apple_ref/doc/uid/TP40006509-SW26 -->
  31. <!-- http://maddesigns.de/meta-viewport-1817.html -->
  32. <!-- meta name="viewport" content="width=device-width"/ -->
  33. <!-- http://www.quirksmode.org/blog/archives/2013/10/initialscale1_m.html -->
  34. <meta name="viewport" content="width=device-width,initial-scale=1.0"/>
  35. <!-- meta name="viewport" content="width=400"/ -->
  36. <link href="{$skin_base}/awesomplete.css" rel="stylesheet" type="text/css"/>
  37. <script src="{$skin_base}/awesomplete.js"><!-- async="true" fails --></script>
  38. <link href="{$skin_base}/style.css" rel="stylesheet" type="text/css"/>
  39. <title>#Seppo!</title>
  40. </head>
  41. </xsl:template>
  42. <xsl:template name="links_commands">
  43. </xsl:template>
  44. <xsl:template match="h:body">
  45. <body>
  46. <noscript><p>JavaScript deactivated, almost fully functional, but <em>nicer</em> if on.</p></noscript>
  47. <xsl:apply-templates select="h:form"/>
  48. <script src="{$skin_base}/linkform.js"></script>
  49. </body>
  50. </xsl:template>
  51. <xsl:template name="snippets_a_la_carte">
  52. <p id="snippets">
  53. <button>📄</button>
  54. <button>📖</button>
  55. <button>🐫</button>
  56. <button>📺</button>
  57. <button>📻</button>
  58. <button>🛠</button>
  59. <button>⌨️</button>
  60. <button>🚴</button>
  61. <button>🐛</button>
  62. <button>🐞</button>
  63. <button>📱</button>
  64. <button>🔐</button>
  65. <button>🌀</button>
  66. <button>🌐</button>
  67. <button>🌧</button>
  68. <button>⭐</button>
  69. <button title="zero-width space" class="border">&#x200B;</button>
  70. <button>#λ</button>
  71. </p>
  72. </xsl:template>
  73. <xsl:template match="h:form[@name='linkform']">
  74. <form method="{@method}" name="{@name}">
  75. <xsl:copy-of select="h:ul"/>
  76. <xsl:copy-of select=".//h:input[@type='hidden']"/>
  77. <input name="lf_url" type="text" placeholder="https://..." value="{h:input[@name='lf_url']/@value}"/>
  78. <xsl:call-template name="snippets_a_la_carte"/>
  79. <input autofocus="autofocus" name="lf_title" type="text" placeholder="A Title, feel free to add #tags" value="{h:input[@name='lf_title']/@value}" class="awesomplete" data-multiple="true" required="required" minlength="1"/>
  80. <textarea name="lf_description" placeholder="Lorem #ipsum…" rows="8" cols="25" data-multiple="true">
  81. <xsl:value-of select="h:textarea[@name='lf_description']"/>
  82. </textarea>
  83. <!-- div class="input-group">
  84. <div class="col-sm-12">
  85. <input name="lf_tags" type="text" placeholder="Schlagwort NochEinSchlagwort" data-multiple="data-multiple" value="{h:input[@name='lf_tags']/@value}" class="form-control"/>
  86. </div>
  87. </div -->
  88. <!-- div class="input-group">
  89. <div class="col-sm-12">
  90. <input name="lf_private" type="checkbox" value="{h:input[@name='lf_private']/@value}" class="form-control"/>
  91. </div>
  92. </div -->
  93. <div style="display:flex; justify-content:space-between;">
  94. <button name="save_edit" type="submit" value="Save">Send</button>
  95. <button name="cancel_edit" type="submit" value="Cancel">Cancel</button>
  96. <button name="delete_edit" type="submit" value="Delete">Delete</button>
  97. </div>
  98. </form>
  99. </xsl:template>
  100. </xsl:stylesheet>