/demo/exe/templates/system/directory.tmpl

http://github.com/ThomasLocke/yolk · Go Template · 169 lines · 155 code · 14 blank · 0 comment · 0 complexity · ef6aed9bf5daaca42f8d99b39219cdfa MD5 · raw file

  1. @@-----------------------------------------------------------------------------
  2. @@-- --
  3. @@-- Yolk --
  4. @@-- --
  5. @@-- Copyright (C) 2000-2012, Thomas ¸cke --
  6. @@-- --
  7. @@-- This is free software; you can redistribute it and/or modify it --
  8. @@-- under terms of the GNU General Public License as published by the --
  9. @@-- Free Software Foundation; either version 3, or (at your option) any --
  10. @@-- later version. This library is distributed in the hope that it will be --
  11. @@-- useful, but WITHOUT ANY WARRANTY; without even the implied warranty of --
  12. @@-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --
  13. @@-- You should have received a copy of the GNU General Public License and --
  14. @@-- a copy of the GCC Runtime Library Exception along with this program; --
  15. @@-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
  16. @@-- <http://www.gnu.org/licenses/>. --
  17. @@-- --
  18. @@-----------------------------------------------------------------------------
  19. <!DOCTYPE html>
  20. <html>
  21. <head>
  22. <meta charset="utf-8"/>
  23. <link rel="icon" href="/images/favicon.ico" type="image/x-icon"/>
  24. <title>
  25. Index of @_URI_@
  26. </title>
  27. <style type="text/css">
  28. html, body, a, img, table, tr, th, td {
  29. margin: 0px;
  30. padding: 0px;
  31. }
  32. body {
  33. height: 100%;
  34. width: 100%;
  35. margin: 20px 0px;
  36. font-family: "DejaVu Sans", Arial, sans-serif;
  37. font-size: 14px;
  38. background-color: #fffffa;
  39. }
  40. a {
  41. color: #000080;
  42. background-color: inherit;
  43. }
  44. a:hover {
  45. color: #800000;
  46. background-color: inherit;
  47. }
  48. table {
  49. width: 90%;
  50. margin: 0px auto;
  51. border: solid 1px #ddd;
  52. border-collapse: collapse;
  53. }
  54. caption {
  55. padding: 10px;
  56. margin-bottom: 10px;
  57. }
  58. thead {
  59. border-bottom: solid 1px #ddd;
  60. }
  61. tfoot {
  62. border-top: solid 1px #ddd;
  63. }
  64. thead th,
  65. tfoot td {
  66. padding: 10px;
  67. }
  68. tbody tr:nth-child(even) {
  69. background-color: #f4f4f4;
  70. }
  71. tbody td {
  72. padding: 3px 10px;
  73. }
  74. caption {
  75. font-size: 18px;
  76. font-weight: bold;
  77. }
  78. .center {
  79. text-align: center;
  80. }
  81. .footer {
  82. color: #808080;
  83. }
  84. .right {
  85. text-align: right;
  86. }
  87. </style>
  88. </head>
  89. <body>
  90. <table>
  91. <caption>
  92. Index of @_URI_@
  93. </caption>
  94. <thead>
  95. <tr>
  96. <th>
  97. <a href="@_WEB_ESCAPE:EXT_ORDR_@">Type</a>
  98. </th>
  99. <th>
  100. <a href="@_WEB_ESCAPE:DIR_NAME_ORDR_@">Name</a>
  101. </th>
  102. <th>
  103. <a href="@_WEB_ESCAPE:DIR_TIME_ORDR_@">Modification time</a>
  104. </th>
  105. <th>
  106. <a href="@_WEB_ESCAPE:SIZE_ORDR_@">Size</a>
  107. </th>
  108. </tr>
  109. </thead>
  110. <tfoot>
  111. <tr>
  112. <td colspan="4" class="footer">
  113. Powered by <a href="http://12boo.net">Yolk</a>
  114. @@IF@@ @_EXIST:YOLK_VERSION_@
  115. version @_YOLK_VERSION_@
  116. @@END_IF@@
  117. - We stand on the shoulders of the mighty <a href="http://libre.adacore.com/libre/tools/aws">Ada Web Server (AWS)</a>.
  118. </td>
  119. </tr>
  120. </tfoot>
  121. <tbody>
  122. @@TABLE@@
  123. @@IF@@ not @_MATCH(^\./):NAME_V_@
  124. <tr>
  125. <td>
  126. @@IF@@ @_IS_DIR_V_@
  127. @@IF@@ @_MATCH(^\.\./):NAME_V_@
  128. <a href="@_NAME_V_@">Go up</a>
  129. @@ELSE@@
  130. <a href="@_NAME_V_@">Dir</a>
  131. @@END_IF@@
  132. @@ELSE@@
  133. <a href="@_NAME_V_@">File</a>
  134. @@END_IF@@
  135. </td>
  136. <td>
  137. @@IF@@ @_IS_DIR_V_@
  138. <a href="@_NAME_V_@">@_NAME_V_@</a>
  139. @@ELSE@@
  140. <a href="@_URI_@@_NAME_V_@">@_NAME_V_@</a>
  141. @@END_IF@@
  142. </td>
  143. <td class="center">
  144. @_TIME_V_@
  145. </td>
  146. <td class="right">
  147. @_FORMAT_NUMBER(_):SIZE_V_@
  148. </td>
  149. </tr>
  150. @@END_IF@@
  151. @@END_TABLE@@
  152. </tbody>
  153. </table>
  154. </body>
  155. </html>