diff options
author | Jarek Ostrowski <jarek.j.ostrowski@gmail.com> | 2018-05-11 21:43:45 +0300 |
---|---|---|
committer | Jarek Ostrowski <jarek.j.ostrowski@gmail.com> | 2018-05-11 21:43:45 +0300 |
commit | 096f37da98bd2717be05240b231dd1f5bc4c30d6 (patch) | |
tree | c9efdcf6d37b8cd33b6bc13c91751d9681985d99 /layouts | |
parent | b6b55176121927e9dd3d9da8021b511a967534a7 (diff) |
Add back original styles, create separate landing-header html
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/header.html | 53 | ||||
-rw-r--r-- | layouts/home.html | 2 | ||||
-rw-r--r-- | layouts/landing-header.html | 17 |
3 files changed, 57 insertions, 15 deletions
diff --git a/layouts/header.html b/layouts/header.html index 0cda89d4..00e27440 100644 --- a/layouts/header.html +++ b/layouts/header.html @@ -1,17 +1,42 @@ -<div class="landing-header-top" id="landing-header-bar"> - <a class="header-link logo-container flex-container justify-center align-center" href="/"> - <img src="<%= @items['/assets/images/gitlab-logo.svg'].path %>" class="logo" /> - <p>GitLab <strong>Docs</strong></p> +<div class="header"> + <a href="/"> + <img src="<%= @items['/assets/images/gitlab-logo.svg'].path %>" width="50" /> + <p>GitLab Documentation</p> </a> - <nav class="nav-container"> - <a class="header-link nav-item flex-container justify-center align-center" href=""> - <p>GitLab</p> + <div class="nav-container"> + <a class="nav-toggle" id="docs-nav-toggle"> + <i class="fa fa-bars" aria-hidden="true"></i> </a> - <a class="header-link nav-item flex-container justify-center align-center" href=""> - <p>Omnibus</p> - </a> - <a class="header-link nav-item flex-container justify-center align-center" href=""> - <p>Runner</p> - </a> - </nav> + <ul class="nav"> + <% unless @item.identifier.to_s.split('/')[1] == 'search' %> + <li class="search"> + <form id="search-form" action="/search/" method="get"> + <input type="text" name="q" class="docsearch" placeholder="Search" required/> + <input type="submit" style="visibility: hidden; position:absolute;" /> + </form> + </li> + <% end %> + <% if ENV['NANOC_ENV'] == 'production' %> + <% @config[:products].each do |name, product| %> + <% if product[:expose] == true %> + <li class="nav-item"> + <a href="<%= @items["/#{product[:slug]}/#{product[:index_file]}"].path %>"> + <%= product[:short_name] %> + </a> + </li> + <% end %> + <% end %> + <% else %> + <% @config[:products].each do |name, product| %> + <% if Dir.exist?("#{@config[:content_dir]}/#{product[:slug]}")%> + <li class="nav-item"> + <a href="<%= @items["/#{product[:slug]}/#{product[:index_file]}"].path %>"> + <%= product[:short_name] %> + </a> + </li> + <% end %> + <% end %> + <% end %> + </ul> + </div> </div> diff --git a/layouts/home.html b/layouts/home.html index 33284da3..e5d5f16f 100644 --- a/layouts/home.html +++ b/layouts/home.html @@ -5,7 +5,7 @@ <link rel="canonical" href="<%= @config[:base_url] %>/"> </head> <body class="landing"> - <%= render '/header.*' %> + <%= render '/landing-header.*' %> <div class="landing-header flex-container flex-column justify-center align-center"> <h1 class="flex-container">👋 Good<span class="timeofday" id="timeofday">afternoon</span>, how can we help?</h1> <div itemscope itemtype="http://schema.org/WebSite"> diff --git a/layouts/landing-header.html b/layouts/landing-header.html new file mode 100644 index 00000000..ae58144a --- /dev/null +++ b/layouts/landing-header.html @@ -0,0 +1,17 @@ +<div class="landing-header-top" id="landing-header-bar"> + <a class="header-link logo-container flex-container justify-center align-center" href="/"> + <img src="<%= @items['/assets/images/gitlab-logo.svg'].path %>" class="logo" /> + <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"> + <p>GitLab</p> + </a> + <a class="header-link nav-item flex-container justify-center align-center" href="/omnibus"> + <p>Omnibus</p> + </a> + <a class="header-link nav-item flex-container justify-center align-center" href="/runner"> + <p>Runner</p> + </a> + </nav> +</div> |