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:
authorAchilleas Pipinellis <axil@gitlab.com>2018-05-15 10:03:40 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2018-05-15 10:03:40 +0300
commited4bf7ff28f9042fa24f075e135f29a782f11e1b (patch)
tree6deed5111e29877393330763514be6956e3d78f7
parent839d59e5a87508b992f5495eb3ae0d238b06f3c9 (diff)
Do not hardcode paths in landing header
-rw-r--r--layouts/landing-header.html26
1 files changed, 17 insertions, 9 deletions
diff --git a/layouts/landing-header.html b/layouts/landing-header.html
index e21bc915..54a9fba0 100644
--- a/layouts/landing-header.html
+++ b/layouts/landing-header.html
@@ -4,14 +4,22 @@
<p>GitLab <strong>Docs</strong></p>
</a>
<nav class="nav-container">
- <a class="header-link nav-item flex-container justify-center align-center" href="/ee/README.html">
- <p>GitLab</p>
- </a>
- <a class="header-link nav-item flex-container justify-center align-center" href="/omnibus/README.html">
- <p>Omnibus</p>
- </a>
- <a class="header-link nav-item flex-container justify-center align-center" href="/runner">
- <p>Runner</p>
- </a>
+ <% if ENV['NANOC_ENV'] == 'production' %>
+ <% @config[:products].each do |name, product| %>
+ <% if product[:expose] == true %>
+ <a class="header-link nav-item flex-container justify-center align-center" href="<%= @items["/#{product[:slug]}/#{product[:index_file]}"].path %>">
+ <p><%= product[:short_name] %></p>
+ </a>
+ <% end %>
+ <% end %>
+ <% else %>
+ <% @config[:products].each do |name, product| %>
+ <% if Dir.exist?("#{@config[:content_dir]}/#{product[:slug]}")%>
+ <a class="header-link nav-item flex-container justify-center align-center" href="<%= @items["/#{product[:slug]}/#{product[:index_file]}"].path %>">
+ <p><%= product[:short_name] %></p>
+ </a>
+ <% end %>
+ <% end %>
+ <% end %>
</nav>
</div>