Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid O'Regan <doregan@gitlab.com>2021-03-26 19:08:24 +0300
committerSuzanne Selhorn <sselhorn@gitlab.com>2021-03-26 19:08:24 +0300
commita83edb653babcbbc33b064a23af183a25e25e9b7 (patch)
treefcf495767647d9962d279798c116625dc62ac30c /layouts/global_nav.html
parent4db1e983e502d984402b2f36c2ad0e462bd0b656 (diff)
Update global nav HTML
Diffstat (limited to 'layouts/global_nav.html')
-rw-r--r--layouts/global_nav.html153
1 files changed, 77 insertions, 76 deletions
diff --git a/layouts/global_nav.html b/layouts/global_nav.html
index d98fbb96..49ebe7e5 100644
--- a/layouts/global_nav.html
+++ b/layouts/global_nav.html
@@ -1,6 +1,6 @@
<% navigation = Gitlab::Navigation.new(@items, @item) %>
<nav class="global-nav-content">
- <!-- nav sections -->
+ <!-- nav sections -->
<% navigation.children.each do |sec| %>
<% sec_uuid = SecureRandom.uuid %>
<div class="global-nav-section">
@@ -14,88 +14,89 @@
<!-- nav categories -->
<% if sec.has_children? && sec.enabled %>
- <div class="collapse <%= navigation.show_element?(sec) ? 'show' : '' %>" id="sec_<%= sec_uuid %>">
- <% sec.children.each do |cat| %>
- <% cat_uuid = SecureRandom.uuid %>
- <span class="global-nav-cat nav-link">
- <% if cat.external_url %>
- <a class="global-nav-link level-1 <%= cat.has_children? ? 'has-collapse' : '' %>" href="<%= cat.url %>" target="_blank">
- <%= cat.title %>
- </a>
- <% else %>
- <a class="global-nav-link level-1 <%= cat.has_children? ? 'has-collapse' : '' %> <%= navigation.show_element?(cat) ? 'active' : '' %>" href="<%= navigation.element_href(cat) %>">
- <%= cat.title %>
- <%= navigation.optional_ee_badge(cat) %>
- </a>
- <% end %><!-- end of if cat[:external_url] -->
- <div class="<%= cat.has_children? ? 'collapse-toggle' : '' %> <%= navigation.show_element?(cat) ? 'active' : 'collapsed' %>" data-toggle="collapse" aria-expanded="false" data-target="#cat_<%= cat_uuid %>"></div>
- </span>
-
- <!-- nav docs -->
- <% if cat.has_children? %>
- <div class="collapse <%= navigation.show_element?(cat) ? 'show' : '' %>" id="cat_<%= cat_uuid %>">
- <% cat.children.each do |doc| %>
- <% doc_uuid = SecureRandom.uuid %>
- <span class="nav-link">
- <% if doc.external_url %>
- <a class="global-nav-link level-2 <%= doc.has_children? ? 'has-collapse' : '' %>" href="<%= doc.url %>" target="_blank">
- <%= doc.title %>
+ <div class="collapse <%= navigation.show_element?(sec) ? 'show' : '' %>" id="sec_<%= sec_uuid %>">
+ <% sec.children.each do |cat| %>
+ <% cat_uuid = SecureRandom.uuid %>
+ <span class="global-nav-cat nav-link">
+ <% if cat.external_url %>
+ <a class="global-nav-link level-1 <%= cat.has_children? ? 'has-collapse' : '' %>" href="<%= cat.url %>" target="_blank">
+ <%= cat.title %>
</a>
- <% else%>
- <a class="global-nav-link level-2 <%= doc.has_children? ? 'has-collapse' : '' %> <%= navigation.show_element?(doc) ? 'active' : '' %>" href="<%= navigation.element_href(doc) %>">
- <%= doc.title %>
- <%= navigation.optional_ee_badge(doc) %>
+ <% else %>
+ <a class="global-nav-link level-1 <%= cat.has_children? ? 'has-collapse' : '' %> <%= navigation.show_element?(cat) ? 'active' : '' %>" href="<%= navigation.element_href(cat) %>">
+ <%= cat.title %>
+ <%= navigation.optional_ee_badge(cat) %>
</a>
- <% end %><!-- end of if doc[:external_url] -->
- <div class="<%= doc.has_children? ? 'collapse-toggle' : '' %> <%= navigation.show_element?(doc) ? 'active' : 'collapsed' %>" data-toggle="collapse" aria-expanded="false" data-target="#doc_<%= doc_uuid %>"></div>
+ <% end %><!-- end of if cat[:external_url] -->
+ <div class="<%= cat.has_children? ? 'collapse-toggle' : '' %> <%= navigation.show_element?(cat) ? 'active' : 'collapsed' %>" data-toggle="collapse" aria-expanded="false" data-target="#cat_<%= cat_uuid %>"></div>
</span>
<!-- nav docs -->
- <% if doc.has_children? %>
- <div class="collapse <%= navigation.show_element?(doc) ? 'show' : '' %>" id="doc_<%= doc_uuid %>">
- <% doc.children.each do |doc| %>
- <% doc_uuid = SecureRandom.uuid %>
- <span class="nav-link">
- <% if doc.external_url %>
- <a class="global-nav-link level-3 <%= doc.has_children? ? 'has-collapse' : '' %>" href="<%= doc.url %>" target="_blank">
- <%= doc.title %>
- </a>
- <% else%>
- <a class="global-nav-link level-3 <%= doc.has_children? ? 'has-collapse' : '' %> <%= navigation.show_element?(doc) ? 'active' : '' %>" href="<%= navigation.element_href(doc) %>">
- <%= doc.title %>
- <%= navigation.optional_ee_badge(doc) %>
- </a>
- <% end %><!-- end of if doc[:external_url] -->
- <div class="<%= doc.has_children? ? 'collapse-toggle' : '' %> <%= navigation.show_element?(doc) ? 'active' : 'collapsed' %>" data-toggle="collapse" aria-expanded="false" data-target="#doc_<%= doc_uuid %>"></div>
- </span>
+ <% if cat.has_children? %>
+ <div class="collapse <%= navigation.show_element?(cat) ? 'show' : '' %>" id="cat_<%= cat_uuid %>">
+ <% cat.children.each do |doc| %>
+ <% doc_uuid = SecureRandom.uuid %>
+ <span class="nav-link">
+ <% if doc.external_url %>
+ <a class="global-nav-link level-2 <%= doc.has_children? ? 'has-collapse' : '' %>" href="<%= doc.url %>" target="_blank">
+ <%= doc.title %>
+ </a>
+ <% else%>
+ <a class="global-nav-link level-2 <%= doc.has_children? ? 'has-collapse' : '' %> <%= navigation.show_element?(doc) ? 'active' : '' %>" href="<%= navigation.element_href(doc) %>">
+ <%= doc.title %>
+ <%= navigation.optional_ee_badge(doc) %>
+ </a>
+ <% end %><!-- end of if doc[:external_url] -->
+ <div class="<%= doc.has_children? ? 'collapse-toggle' : '' %> <%= navigation.show_element?(doc) ? 'active' : 'collapsed' %>" data-toggle="collapse" aria-expanded="false" data-target="#doc_<%= doc_uuid %>"></div>
+ </span>
+
+ <!-- nav sub docs -->
+ <% if doc.has_children? %>
+ <div class="collapse <%= navigation.show_element?(doc) ? 'show' : '' %>" id="doc_<%= doc_uuid %>">
+ <% doc.children.each do |doc| %>
+ <% doc_uuid = SecureRandom.uuid %>
+ <span class="nav-link">
+ <% if doc.external_url %>
+ <a class="global-nav-link level-3 <%= doc.has_children? ? 'has-collapse' : '' %>" href="<%= doc.url %>" target="_blank">
+ <%= doc.title %>
+ </a>
+ <% else%>
+ <a class="global-nav-link level-3 <%= doc.has_children? ? 'has-collapse' : '' %> <%= navigation.show_element?(doc) ? 'active' : '' %>" href="<%= navigation.element_href(doc) %>">
+ <%= doc.title %>
+ <%= navigation.optional_ee_badge(doc) %>
+ </a>
+ <% end %><!-- end of if doc[:external_url] -->
+ <div class="<%= doc.has_children? ? 'collapse-toggle' : '' %> <%= navigation.show_element?(doc) ? 'active' : 'collapsed' %>" data-toggle="collapse" aria-expanded="false" data-target="#doc_<%= doc_uuid %>"></div>
+ </span>
- <!-- nav docs -->
- <% if doc.has_children? %>
- <div class="collapse <%= navigation.show_element?(doc) ? 'show' : '' %>" id="doc_<%= doc_uuid %>">
- <% doc.children.each do |doc| %>
- <span class="nav-link">
- <% if doc.external_url %>
- <a class="global-nav-link level-4" href="<%= doc.url %>" target="_blank">
- <%= doc.title %>
- </a>
- <% else%>
- <a class="global-nav-link level-4 <%= navigation.show_element?(doc) ? 'active' : '' %>" href="<%= navigation.element_href(doc) %>">
- <%= doc.title %>
- <%= navigation.optional_ee_badge(doc) %>
- </a>
- <% end %><!-- end of if doc[:external_url] -->
- </span>
+ <!-- nav sub sub docs -->
+ <% if doc.has_children? %>
+ <div class="collapse <%= navigation.show_element?(doc) ? 'show' : '' %>" id="doc_<%= doc_uuid %>">
+ <% doc.children.each do |doc| %>
+ <span class="nav-link">
+ <% if doc.external_url %>
+ <a class="global-nav-link level-4" href="<%= doc.url %>" target="_blank">
+ <%= doc.title %>
+ </a>
+ <% else%>
+ <a class="global-nav-link level-4 <%= navigation.show_element?(doc) ? 'active' : '' %>" href="<%= navigation.element_href(doc) %>">
+ <%= doc.title %>
+ <%= navigation.optional_ee_badge(doc) %>
+ </a>
+ <% end %><!-- end of if doc[:external_url] -->
+ </span>
+ <% end %><!-- end of docs[:doc] -->
+ </div>
+ <% end %><!-- end of if doc[:docs] -->
+ <% end %><!-- end of docs[:doc] -->
+ </div>
+ <% end %><!-- end of if doc[:docs] -->
<% end %><!-- end of cat[:docs] -->
- </div>
- <% end %><!-- end of if cat[:docs].nil? -->
- <% end %><!-- end of doc[:docs] -->
- <% end %><!-- end of doc[:docs] -->
- <% end %><!-- end of cat[:docs] -->
- </div>
- <% end %><!-- end of if cat[:docs].nil? -->
- <% end %><!-- end of sec[:section_categories] -->
- </div><!-- end of div class="collapse" -->
+ </div>
+ <% end %><!-- end of if cat[:docs].nil? -->
+ <% end %><!-- end of sec[:section_categories] -->
+ </div>
<% end %><!-- end of if sec[:section_categories].nil? -->
- </div><!-- end of div class="global-nav-section" -->
+ </div>
<% end %><!-- end of nav_items[:sections] -->
</nav>