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.

67 lines
2.9 KiB

10 years ago
  1. <% @tabs = { definition: 'Definition', examples: 'Examples', usage: 'Usage', settings: 'Settings' } if @tabs == 'module' %>
  2. <% @tabs = { overview: 'Overview', usage: 'Usage', examples: 'Examples', settings: 'Settings' } if @tabs == 'behavior' %>
  3. <div class="<% if @tabs?: %>tab <% end %>segment">
  4. <div class="container">
  5. <div class="introduction">
  6. <h1 class="ui dividing header">
  7. <%=@document.title %>
  8. <% if @document.status?: %><span class="ui label"><%= @document.status %></span><% end %>
  9. </h1>
  10. <p><%=@document.description %></p>
  11. <% if @document.type is 'UI Element' or @document.type is 'UI View' or @document.type is 'UI Collection': %>
  12. <div class="ui divider"></div>
  13. <div class="ui right floated basic labeled icon toggle overview button">
  14. Definition Mode
  15. <i class="book icon"></i>
  16. </div>
  17. <% end %>
  18. <% if @document.type is 'UI Module': %>
  19. <a href="/module.html" class="ui right floated basic labeled icon button">
  20. Learn about Modules
  21. <i class="help icon"></i>
  22. </a>
  23. <% end %>
  24. <% if @document.themes?: %>
  25. <div class="ui floating dropdown theme basic button" data-element="<%= @document.element %>" data-type="<%= @document.elementType %>">
  26. <span class="text">Choose Theme</span>
  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. <% end %>
  34. <div class="ui secondary button">
  35. Download
  36. </div>
  37. </div>
  38. <div class="advertisement">
  39. <% unless 'development' in @getEnvironments(): %>
  40. <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>
  41. <% end %>
  42. </div>
  43. <% if @tabs?: %>
  44. <% index = 0 %>
  45. <% tabCount = 0 %>
  46. <% numbers = ['zero', 'one', 'two', 'three', 'four', 'five', 'six'] %>
  47. <% colors = ['red', 'teal', 'blue', 'purple', 'black', 'orange'] %>
  48. <% for id, name of @tabs: %>
  49. <% tabCount++ %>
  50. <% end %>
  51. <div class="<%= numbers[tabCount] %> item tabular ui menu">
  52. <% for id, name of @tabs: %>
  53. <a class="<%= if index == 0 then 'active ' %>item" data-tab="<%= id %>"><%= name %></a>
  54. <% index++ %>
  55. <% end %>
  56. </div>
  57. <% index = 0 %>
  58. <div class="fluid vertical ui menu">
  59. <% for id, name of @tabs: %>
  60. <a class="<%= if index == 0 then 'active ' %>item" data-tab="<%= id %>"><%= name %></a>
  61. <% index++ %>
  62. <% end %>
  63. </div>
  64. <% end %>
  65. </div>
  66. </div>