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.

82 lines
3.6 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. <div class="ui right floated basic button floating mode dropdown">
  21. Change View
  22. <div class="menu">
  23. <a class="overview item">
  24. Definition
  25. </a>
  26. <a class="designer item">
  27. Designer
  28. </a>
  29. <a class="developer item">
  30. Developer
  31. </a>
  32. </div>
  33. </div>
  34. <% if @document.themes?: %>
  35. <div class="ui floating dropdown theme basic button" data-element="<%= @document.element %>" data-type="<%= @document.elementType %>">
  36. <span class="text">Theme</span>
  37. <div class="menu ui transition hidden">
  38. <% for id, name of @document.themes: %>
  39. <div class="item" data-value="<%= name %>"><%= (name.charAt(0).toUpperCase() + name.slice(1)) %></div>
  40. <% end %><!--
  41. <div class='divider'></div>
  42. <div class="header">Create Your Own</div>
  43. <a class="item" href="#">Submit Theme</a> -->
  44. </div>
  45. </div>
  46. <% end %>
  47. <% if @document.type is 'UI Element' or @document.type is 'UI View' or @document.type is 'UI Collection' or @document.type is 'UI Module': %>
  48. <div class="ui disabled secondary button">
  49. Download
  50. </div>
  51. <% end %>
  52. </div>
  53. <div class="advertisement">
  54. <% unless 'development' in @getEnvironments(): %>
  55. <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>
  56. <% end %>
  57. </div>
  58. <% if @tabs?: %>
  59. <% index = 0 %>
  60. <% tabCount = 0 %>
  61. <% numbers = ['zero', 'one', 'two', 'three', 'four', 'five', 'six'] %>
  62. <% colors = ['red', 'teal', 'blue', 'purple', 'black', 'orange'] %>
  63. <% for id, name of @tabs: %>
  64. <% tabCount++ %>
  65. <% end %>
  66. <div class="<%= numbers[tabCount] %> item tabular ui menu">
  67. <% for id, name of @tabs: %>
  68. <a class="<%= if index == 0 then 'active ' %>item" data-tab="<%= id %>"><%= name %></a>
  69. <% index++ %>
  70. <% end %>
  71. </div>
  72. <% index = 0 %>
  73. <div class="fluid vertical ui menu">
  74. <% for id, name of @tabs: %>
  75. <a class="<%= if index == 0 then 'active ' %>item" data-tab="<%= id %>"><%= name %></a>
  76. <% index++ %>
  77. <% end %>
  78. </div>
  79. <% end %>
  80. </div>
  81. </div>