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.

292 lines
14 KiB

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