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.5 KiB

10 years ago
10 years ago
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 %> header segment">
  4. <div class="container">
  5. <div class="introduction">
  6. <h1 class="ui 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. <% end %>
  14. <% if @document.type is 'UI Module': %>
  15. <a href="/module.html" class="ui right floated basic labeled icon button">
  16. Learn about Modules
  17. <i class="help icon" data-title="What are Modules?" data-content="Modules are UI elements that include behaviors as part of their definition. Modules require some knowledge of Javascript to trigger."></i>
  18. </a>
  19. <% end %>
  20. <% if @document.type is 'UI Element' or @document.type is 'UI View' or @document.type is 'UI Collection' or @document.type is 'UI Module': %>
  21. <div class="ui right floated basic overview button">
  22. Definition
  23. </div>
  24. <% end %>
  25. <% if @document.themes?: %>
  26. <div class="ui floating dropdown theme basic button" data-element="<%= @document.element %>" data-type="<%= @document.elementType %>">
  27. <span class="text">Theme</span>
  28. <div class="menu ui transition hidden">
  29. <% for id, name of @document.themes: %>
  30. <div class="item" data-value="<%= name %>"><%= (name.charAt(0).toUpperCase() + name.slice(1)) %></div>
  31. <% end %><!--
  32. <div class='divider'></div>
  33. <div class="header">Create Your Own</div>
  34. <a class="item" href="#">Submit Theme</a> -->
  35. </div>
  36. </div>
  37. <% end %>
  38. <% if @document.type is 'UI Element' or @document.type is 'UI View' or @document.type is 'UI Collection' or @document.type is 'UI Module': %>
  39. <div class="ui disabled secondary button">
  40. Download
  41. </div>
  42. <% end %>
  43. </div>
  44. <div class="advertisement">
  45. <% unless 'development' in @getEnvironments(): %>
  46. <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>
  47. <% end %>
  48. </div>
  49. <% if @tabs?: %>
  50. <% index = 0 %>
  51. <% tabCount = 0 %>
  52. <% numbers = ['zero', 'one', 'two', 'three', 'four', 'five', 'six'] %>
  53. <% colors = ['red', 'teal', 'blue', 'purple', 'black', 'orange'] %>
  54. <% for id, name of @tabs: %>
  55. <% tabCount++ %>
  56. <% end %>
  57. <div class="<%= numbers[tabCount] %> item tabular ui menu">
  58. <% for id, name of @tabs: %>
  59. <a class="<%= if index == 0 then 'active ' %>item" data-tab="<%= id %>"><%= name %></a>
  60. <% index++ %>
  61. <% end %>
  62. </div>
  63. <% index = 0 %>
  64. <div class="fluid vertical ui menu">
  65. <% for id, name of @tabs: %>
  66. <a class="<%= if index == 0 then 'active ' %>item" data-tab="<%= id %>"><%= name %></a>
  67. <% index++ %>
  68. <% end %>
  69. </div>
  70. <% end %>
  71. </div>
  72. </div>