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.

53 lines
2.2 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 dividing 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 basic labeled icon toggle overview button">
  12. Definition Mode
  13. <i class="book icon"></i>
  14. </div>
  15. <% end %>
  16. <% if @document.type is 'UI Module': %>
  17. <a href="/module.html" class="ui basic labeled icon button">
  18. Learn about Modules
  19. <i class="help icon"></i>
  20. </a>
  21. <% end %>
  22. </div>
  23. <div class="advertisement">
  24. <% unless 'development' in @getEnvironments(): %>
  25. <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>
  26. <% end %>
  27. </div>
  28. <% if @tabs?: %>
  29. <% index = 0 %>
  30. <% tabCount = 0 %>
  31. <% numbers = ['zero', 'one', 'two', 'three', 'four', 'five', 'six'] %>
  32. <% colors = ['red', 'teal', 'blue', 'purple', 'black', 'orange'] %>
  33. <% for id, name of @tabs: %>
  34. <% tabCount++ %>
  35. <% end %>
  36. <div class="<%= numbers[tabCount] %> item tabular ui menu">
  37. <% for id, name of @tabs: %>
  38. <a class="<%= if index == 0 then 'active ' %>item" data-tab="<%= id %>"><%= name %></a>
  39. <% index++ %>
  40. <% end %>
  41. </div>
  42. <% index = 0 %>
  43. <div class="fluid vertical ui menu">
  44. <% for id, name of @tabs: %>
  45. <a class="<%= if index == 0 then 'active ' %>item" data-tab="<%= id %>"><%= name %></a>
  46. <% index++ %>
  47. <% end %>
  48. </div>
  49. <% end %>
  50. </div>
  51. </div>