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.

51 lines
2.1 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. <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>
  25. </div>
  26. <% if @tabs?: %>
  27. <% index = 0 %>
  28. <% tabCount = 0 %>
  29. <% numbers = ['zero', 'one', 'two', 'three', 'four', 'five', 'six'] %>
  30. <% colors = ['red', 'teal', 'blue', 'purple', 'black', 'orange'] %>
  31. <% for id, name of @tabs: %>
  32. <% tabCount++ %>
  33. <% end %>
  34. <div class="<%= numbers[tabCount] %> item tabular ui menu">
  35. <% for id, name of @tabs: %>
  36. <a class="<%= if index == 0 then 'active ' %>item" data-tab="<%= id %>"><%= name %></a>
  37. <% index++ %>
  38. <% end %>
  39. </div>
  40. <% index = 0 %>
  41. <div class="fluid vertical ui menu">
  42. <% for id, name of @tabs: %>
  43. <a class="<%= if index == 0 then 'active ' %>item" data-tab="<%= id %>"><%= name %></a>
  44. <% index++ %>
  45. <% end %>
  46. </div>
  47. <% end %>
  48. </div>
  49. </div>