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.

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