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-02-07 15:30:26 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2018-02-07 15:30:26 +0300
commit29a8cf3c2a6355955fbc17be8c2c84d9fd17dc25 (patch)
tree29a14f0af67f8f0c414fb4800b675c63b0baaeff /layouts
parent1c38d9811df4ba39ffb572a45ed7c3fa87e1b395 (diff)
parent89883d5e65e0f17c27f8dae41c32848324d7b419 (diff)
Merge branch 'article-layout-1' into 'master'
Article layout Closes #157 See merge request gitlab-com/gitlab-docs!182
Diffstat (limited to 'layouts')
-rw-r--r--layouts/default.html32
-rw-r--r--layouts/head.html1
-rw-r--r--layouts/header.html2
3 files changed, 28 insertions, 7 deletions
diff --git a/layouts/default.html b/layouts/default.html
index b0c9b7c5..f68f815b 100644
--- a/layouts/default.html
+++ b/layouts/default.html
@@ -3,10 +3,8 @@
<%= render '/head.*' %>
<body>
<%= render '/header.*' %>
- <div class=wrapper>
- <div id="doc-nav" class="doc-nav">
- </div>
- <div class="main class">
+ <div class="wrapper">
+ <div class="main class js-main-wrapper">
<% if @config[:breadcrumbs] %>
<% ancestor_array = ancestor_path_array(@item) unless ancestor_path_array(@item).empty? %>
<% if ancestor_array %>
@@ -18,8 +16,30 @@
</ul>
<% end %>
<% end %>
- <%= yield %>
- <hr>
+ <div id="doc-nav" class="doc-nav">
+ </div>
+ <% if @item[:title] %>
+ <h1 class="article-title">
+ <%= @item[:title] %>
+ </h1>
+ <% end %>
+ <% if @item[:author] %>
+ <div class="article-metadata">
+ Article written by <a href="https://gitlab.com/<%= @item[:author_gitlab] %>" target="_blank"><%= @item[:author] %></a>
+ on <%= @item[:date] %>
+ &#8226;
+ <% if @item[:last_updated] %>
+ Last updated: <%= @item[:last_updated] %>
+ &#8226;
+ <% end %>
+ Type: <%= @item[:article_type] %>
+ &#8226;
+ Level: <%= @item[:level] %>
+ </div>
+ <% end %>
+ <div class="article-content js-article-content">
+ <%= yield %>
+ </div>
<div class="edit-on">
<%= edit_on_gitlab(@item) %>
</div>
diff --git a/layouts/head.html b/layouts/head.html
index 9c2e4d10..5e02b14d 100644
--- a/layouts/head.html
+++ b/layouts/head.html
@@ -15,6 +15,7 @@
<link rel="stylesheet" href="<%= @items['/assets/stylesheets/docsearch.min.*'].path %>">
<link rel="stylesheet" href="<%= @items['/assets/stylesheets/toc.*'].path %>">
<link rel="stylesheet" href="<%= @items['/assets/stylesheets/comments.*'].path %>">
+ <script async src="<%= @items['/assets/javascripts/classlist-polyfill.*'].path %>"></script>
<script async src="<%= @items['/assets/javascripts/docs.*'].path %>"></script>
<link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,400italic' rel='stylesheet' type='text/css'>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
diff --git a/layouts/header.html b/layouts/header.html
index 8ef46795..a69af72e 100644
--- a/layouts/header.html
+++ b/layouts/header.html
@@ -8,7 +8,7 @@
<ul class="nav">
<li class="search"><input type="text" class="docsearch" placeholder="Search"></li>
<% @config[:products].each do |name, product| %>
- <% if product[:expose] == true %>
+ <% if product[:expose] == true && @items["/#{product[:slug]}/#{product[:index_file]}"] %>
<li class="nav-item">
<a href="<%= @items["/#{product[:slug]}/#{product[:index_file]}"].path %>">
<%= product[:short_name] %>