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.

281 lines
14 KiB

11 years ago
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <% uiIntroduction = @getCollection("documents").findAll({type: $in: ['UI Introduction']},[{title: 1}]).toJSON() %>
  5. <% uiProject = @getCollection("documents").findAll({type: $in: ['Semantic Project']},[{title: 1}]).toJSON() %>
  6. <% uiGuide = @getCollection("documents").findAll({type: $in: ['UI Guide']},[{title: 1}]).toJSON() %>
  7. <% uiElements = @getCollection("documents").findAll({type: $in: ['UI Element']},[{title: 1}]).toJSON() %>
  8. <% uiCollections = @getCollection("documents").findAll({type: $in: ['UI Collection']},[{title: 1}]).toJSON() %>
  9. <% uiViews = @getCollection("documents").findAll({type: $in: ['UI View']},[{title: 1}]).toJSON() %>
  10. <% uiModules = @getCollection("documents").findAll({type: $in: ['UI Module']},[{title: 1}]).toJSON() %>
  11. <% uiBehavior = @getCollection("documents").findAll({type: $in: ['UI Behavior']},[{title: 1}]).toJSON() %>
  12. <% uiSpecification = @getCollection("documents").findAll({type: $in: ['UI Specification']},[{title: 1}]).toJSON() %>
  13. <% currentCollection = @getCollection("documents").findAll({type: $in: [@document.type]},[{title: 1}]).toJSON() %>
  14. <% pageCount = @pageCount(currentCollection) %>
  15. <% pageNumber = @getPage(currentCollection, @document.id) %>
  16. <% pageCollection = @getPageCollection(currentCollection, @document.id) %>
  17. <!-- Standard Meta -->
  18. <meta charset="utf-8" />
  19. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  20. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  21. <link rel="image_src" type="image/jpeg" href="images/share.png" />
  22. <!-- Site Properities -->
  23. <%- @getBlock('meta').toHTML() %>
  24. <title><%= @getPreparedTitle() %></title>
  25. <meta name="description" content="<%= @getPreparedDescription() %>" />
  26. <meta name="keywords" content="<%= @getPreparedKeywords() %>" />
  27. <link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Open+Sans:300italic,400,300,700' rel='stylesheet' type='text/css'>
  28. <link rel="stylesheet" type="text/css" href="/stylesheets/reset.css">
  29. <link rel="stylesheet" type="text/css" href="/stylesheets/library/basic.icon.css">
  30. <link rel="stylesheet/less" type="text/css" href="/build/less/site.less" />
  31. <% if 'development' in @getEnvironments(): %>
  32. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/elements/icon.css">
  33. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/elements/button.css">
  34. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/elements/divider.css">
  35. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/elements/header.css">
  36. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/elements/image.css">
  37. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/elements/input.css">
  38. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/elements/label.css">
  39. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/elements/loader.css">
  40. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/elements/reveal.css">
  41. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/elements/progress.css">
  42. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/elements/segment.css">
  43. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/elements/step.css">
  44. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/collections/breadcrumb.css">
  45. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/collections/form.css">
  46. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/collections/grid.css">
  47. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/collections/menu.css">
  48. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/collections/message.css">
  49. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/collections/table.css">
  50. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/views/comment.css">
  51. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/views/list.css">
  52. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/views/feed.css">
  53. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/views/item.css">
  54. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/views/statistic.css">
  55. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/modules/modal.css">
  56. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/modules/accordion.css">
  57. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/modules/dropdown.css">
  58. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/modules/popup.css">
  59. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/modules/rating.css">
  60. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/modules/sidebar.css">
  61. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/modules/shape.css">
  62. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/modules/tab.css">
  63. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/modules/checkbox.css">
  64. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/modules/dimmer.css">
  65. <link rel="stylesheet" type="text/css" class="ui" href="/build/uncompressed/modules/transition.css">
  66. <% else: %>
  67. <link rel="stylesheet" type="text/css" class="ui" href="/build/packaged/css/semantic.min.css">
  68. <% end %>
  69. <link rel="stylesheet" type="text/css" href="/stylesheets/semantic.css">
  70. <% if 'development' in @getEnvironments(): %>
  71. <script>
  72. (function () {
  73. var
  74. eventSupport = ('querySelector' in document && 'addEventListener' in window)
  75. jsonSupport = (typeof JSON !== 'undefined'),
  76. jQuery = (eventSupport && jsonSupport)
  77. ? '/javascript/library/jquery.js'
  78. : '/javascript/library/jquery.legacy.js'
  79. ;
  80. document.write('<script src="' + jQuery + '"><\/script>');
  81. }());
  82. </script>
  83. <% else: %>
  84. <script>
  85. (function () {
  86. var
  87. eventSupport = ('querySelector' in document && 'addEventListener' in window)
  88. jsonSupport = (typeof JSON !== 'undefined'),
  89. jQuery = (eventSupport && jsonSupport)
  90. ? '/javascript/library/jquery.min.js'
  91. : '/javascript/library/jquery.legacy.min.js'
  92. ;
  93. document.write('<script src="' + jQuery + '"><\/script>');
  94. }());
  95. </script>
  96. <% end %>
  97. <script src="/javascript/library/history.js"></script>
  98. <script src="/javascript/library/easing.js"></script>
  99. <script src="/javascript/library/ace/ace.js"></script>
  100. <script src="/javascript/library/tablesort.js"></script>
  101. <script src="/javascript/library/waypoints.js"></script>
  102. <% if 'development' in @getEnvironments(): %>
  103. <script src="/build/uncompressed/modules/behavior/api.js"></script>
  104. <script src="/build/uncompressed/modules/behavior/state.js"></script>
  105. <script src="/build/uncompressed/modules/accordion.js"></script>
  106. <script src="/build/uncompressed/modules/checkbox.js"></script>
  107. <script src="/build/uncompressed/modules/dimmer.js"></script>
  108. <script src="/build/uncompressed/modules/dropdown.js"></script>
  109. <script src="/build/uncompressed/modules/modal.js"></script>
  110. <script src="/build/uncompressed/modules/popup.js"></script>
  111. <script src="/build/uncompressed/modules/rating.js"></script>
  112. <script src="/build/uncompressed/modules/shape.js"></script>
  113. <script src="/build/uncompressed/modules/sidebar.js"></script>
  114. <script src="/build/uncompressed/modules/tab.js"></script>
  115. <script src="/build/uncompressed/modules/transition.js"></script>
  116. <% else: %>
  117. <script src="/build/packaged/javascript/semantic.min.js"></script>
  118. <% end %>
  119. <script src="/javascript/semantic.js"></script>
  120. <script>
  121. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  122. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  123. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  124. })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  125. ga('create', 'UA-44039803-1', 'semantic-ui.com');
  126. ga('send', 'pageview');
  127. </script>
  128. </head>
  129. <body id="example" class="<%= @document.css %>">
  130. <div class="ui large vertical inverted labeled icon sidebar menu" id="menu">
  131. <a class="hide item">
  132. <i class="close icon"></i> Close Menu
  133. </a>
  134. <a class="item" href="/build/semantic.zip">
  135. <i class="inverted circular red awesome download cloud icon"></i> <b>Download</b>
  136. </a>
  137. <div class="item">
  138. <a href="/">
  139. <b>Introduction</b>
  140. </a>
  141. <div class="menu">
  142. <% for element in uiIntroduction: %>
  143. <a class="<%= if element.id is @document.id then 'active ' %>item" href="<%= element.url %>"><%= element.title %></a>
  144. <% end %>
  145. </div>
  146. </div>
  147. <div class="item">
  148. <b>Project</b>
  149. <div class="menu">
  150. <% for element in uiProject: %>
  151. <a class="<%= if element.id is @document.id then 'active ' %>item" href="<%= element.url %>"><%= element.title %></a>
  152. <% end %>
  153. </div>
  154. </div>
  155. <div class="item">
  156. <a href="/element.html"><b>Elements</b></a>
  157. <div class="menu">
  158. <% for element in uiElements: %>
  159. <a class="<%= if element.id is @document.id then 'active ' %>item" href="<%= element.url %>"><%= element.title %></a>
  160. <% end %>
  161. </div>
  162. </div>
  163. <div class="item">
  164. <a href="/collection.html"><b>Collections</b></a>
  165. <div class="menu">
  166. <% for element in uiCollections: %>
  167. <a class="<%= if element.id is @document.id then 'active ' %>item" href="<%= element.url %>"><%= element.title %></a>
  168. <% end %>
  169. </div>
  170. </div>
  171. <div class="item">
  172. <b>Views</b>
  173. <div class="menu">
  174. <% for element in uiViews: %>
  175. <a class="<%= if element.id is @document.id then 'active ' %>item" href="<%= element.url %>"><%= element.title %></a>
  176. <% end %>
  177. </div>
  178. </div>
  179. <div class="item">
  180. <a href="/module.html"><b>Modules</b></a>
  181. <div class="menu">
  182. <% for element in uiModules: %>
  183. <a class="<%= if element.id is @document.id then 'active ' %>item" href="<%= element.url %>"><%= element.title %></a>
  184. <% end %>
  185. </div>
  186. </div>
  187. <div class="item">
  188. <b>Behavior</b>
  189. <div class="menu">
  190. <% for element in uiBehavior: %>
  191. <a class="<%= if element.id is @document.id then 'active ' %>item" href="<%= element.url %>"><%= element.title %></a>
  192. <% end %>
  193. </div>
  194. </div>
  195. <div class="item">
  196. <b>Style Guide</b>
  197. <div class="menu">
  198. <% for element in uiGuide: %>
  199. <a class="<%= if element.id is @document.id then 'active ' %>item" href="<%= element.url %>"><%= element.title %></a>
  200. <% end %>
  201. </div>
  202. </div>
  203. <!-- <div class="item">
  204. <b>Specification</b>
  205. <div class="menu">
  206. <% for element in uiSpecification: %>
  207. <a class="<%= if element.id is @document.id then 'active ' %>item" href="<%= element.url %>"><%= element.title %></a>
  208. <% end %>
  209. </div>
  210. </div> -->
  211. </div>
  212. <div class="ui fixed transparent inverted main menu">
  213. <div class="container">
  214. <a class="launch item"><i class="icon list layout"></i> Content</a>
  215. <div class="title item">
  216. <b><%= @document.type %>:</b> <%= @document.title %>
  217. </div>
  218. <% if pageNumber > 1 and currentCollection[pageNumber - 2]?: %>
  219. <a class="icon item" href="<%= currentCollection[pageNumber - 2].url %>"><i class="left arrow icon"></i></a>
  220. <% else: %>
  221. <div class="disabled icon item"><i class="left arrow icon"></i></div>
  222. <% end %>
  223. <div class="section ui dropdown link item">
  224. <span class="count"><%= "#{pageNumber} of #{pageCount}" %></span>
  225. <div class="menu">
  226. <% for element, index in currentCollection: %>
  227. <div class="<%= if element.id is @document.id then 'active ' %>item">
  228. <a href="<%= element.url %>"><%= (index+1) %>. <%= element.title %></a>
  229. </div>
  230. <% end %>
  231. </div>
  232. </div>
  233. <% if pageNumber isnt pageCount and currentCollection[pageNumber]?: %>
  234. <a class="icon item" href="<%= currentCollection[pageNumber].url %>"><i class="right arrow icon"></i></a>
  235. <% else: %>
  236. <div class="disabled icon item"><i class="right arrow icon"></i></div>
  237. <% end %>
  238. <div class="right menu">
  239. <div class="vertically fitted borderless item">
  240. <iframe src="http://ghbtns.com/github-btn.html?user=semantic-org&repo=semantic-ui&type=watch&count=true"
  241. allowtransparency="true" frameborder="0" scrolling="0" width="95" height="20"></iframe>
  242. </div>
  243. <% if @document.type is 'UI Element' or @document.type is 'UI View' or @document.type is 'UI Collection' or @document.type is 'UI Module': %>
  244. <a class="popup designer icon item" data-content="Designer Mode">
  245. <i class="basic paint icon"></i>
  246. </a>
  247. <a class="popup developer icon item" data-content="Developer Mode">
  248. <i class="terminal icon"></i>
  249. </a>
  250. <% end %>
  251. <a class="popup icon github item" data-content="View project on Github" href="https://github.com/quirkyinc/semantic">
  252. <i class="icon github"></i>
  253. </a>
  254. </div>
  255. </div>
  256. </div>
  257. <div class="ui black huge launch right attached button">
  258. <i class="icon list layout"></i>
  259. <span class="text">Menu</span>
  260. </div>
  261. <%- @content %>
  262. <script src="/javascript/library/less.js"></script>
  263. </body>
  264. </html>