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.

73 lines
3.0 KiB

  1. <% @tabs = { definition: 'Definition', examples: 'Examples', usage: 'Usage', settings: 'Settings' } if @tabs == 'module' %>
  2. <div class="<% if @tabs?: %>tab <% end %>segment">
  3. <div class="container">
  4. <div class="introduction">
  5. <h1 class="ui header">
  6. <%=@document.title %>
  7. <% if @document.status?: %><span class="ui label"><%= @document.status %></span><% end %>
  8. </h1>
  9. <p><%=@document.description %></p>
  10. <% if @document.type is 'UI Element' or @document.type is 'UI View' or @document.type is 'UI Collection': %>
  11. <div class="ui divider"></div>
  12. <div class="ui right floated basic labeled icon toggle overview button">
  13. Definition Mode
  14. <i class="book icon"></i>
  15. </div>
  16. <% end %>
  17. <% if @document.type is 'UI Module': %>
  18. <a href="/module.html" class="ui right floated basic labeled icon button">
  19. Learn about Modules
  20. <i class="help icon"></i>
  21. </a>
  22. <% end %>
  23. <% if @document.themes?: %>
  24. <div class="ui basic floating dropdown theme button" data-element="<%= @document.element %>" data-type="<%= @document.elementType %>">
  25. <span class="text">Theme</span>
  26. <i class="dropdown icon"></i>
  27. <div class="menu ui transition hidden">
  28. <% for id, name of @document.themes: %>
  29. <div class="item" data-value="<%= name %>"><%= (name.charAt(0).toUpperCase() + name.slice(1)) %></div>
  30. <% end %>
  31. </div>
  32. </div>
  33. <div class="ui button">
  34. <i class="settings icon"></i>
  35. Customize
  36. </div>
  37. <div class="ui primary button">
  38. Download
  39. <i class="download icon"></i>
  40. </div>
  41. <% end %>
  42. </div>
  43. <div class="advertisement">
  44. <% unless 'development' in @getEnvironments(): %>
  45. <div id="carbonads-container"><div class="carbonad"><div id="azcarbon"></div><script type="text/javascript">var z = document.createElement("script"); z.type = "text/javascript"; z.async = true; z.src = "http://engine.carbonads.com/z/51619/azcarbon_2_1_0_HORIZ"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(z, s);</script></div></div>
  46. <% end %>
  47. </div>
  48. <% if @tabs?: %>
  49. <% index = 0 %>
  50. <% tabCount = 0 %>
  51. <% numbers = ['zero', 'one', 'two', 'three', 'four', 'five', 'six'] %>
  52. <% colors = ['red', 'teal', 'blue', 'purple', 'black', 'orange'] %>
  53. <% for id, name of @tabs: %>
  54. <% tabCount++ %>
  55. <% end %>
  56. <div class="<%= numbers[tabCount] %> item tabular ui menu">
  57. <% for id, name of @tabs: %>
  58. <a class="<%= if index == 0 then 'active ' %>item" data-tab="<%= id %>"><%= name %></a>
  59. <% index++ %>
  60. <% end %>
  61. </div>
  62. <% index = 0 %>
  63. <div class="fluid vertical ui menu">
  64. <% for id, name of @tabs: %>
  65. <a class="<%= if index == 0 then 'active ' %>item" data-tab="<%= id %>"><%= name %></a>
  66. <% index++ %>
  67. <% end %>
  68. </div>
  69. <% end %>
  70. </div>
  71. </div>