Skip to content

Commit 0485357

Browse files
committed
Fix core docs template
Individual docs pages haven't been updated and the "kernel version" info looks out-of-place
1 parent c61c0ff commit 0485357

4 files changed

Lines changed: 37 additions & 26 deletions

File tree

_includes/breadcrumbs.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{% assign parent_dirs=page.url | replace_first: '/', '' | split: '/' %}
22
{% assign link='/' %}
3-
{% for dir in parent_dirs %}
4-
{% if forloop.last %}
5-
{{ dir }}
6-
{% else %}
7-
{% assign link=link | append: dir | append: '/' %}
8-
<a href="{{ link }}">{{ dir }}</a> &gt;
9-
{% endif %}
10-
{% endfor %}
3+
<ol class="breadcrumb">
4+
{% for dir in parent_dirs %}
5+
{% if forloop.last %}
6+
<li class="active">{{ dir }}</li>
7+
{% else %}
8+
{% assign link=link | append: dir | append: '/' %}
9+
<li><a href="{{ link }}">{{ dir }}</a></li>
10+
{% endif %}
11+
{% endfor %}
12+
</ol>

_includes/title.html

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
{% if page.source_file %}
2+
{% assign edit_path = page.source_file | replace: 'drivers/lego', 'https://github.com/ev3dev/lego-linux-drivers/edit/master' %}
3+
{% if page.source_line > 0 %}
4+
{% assign source_line = page.source_line | plus: 0 %}
5+
{% assign edit_path = edit_path | append: '#L' | append: source_line %}
6+
{% endif %}
7+
{% else %}
8+
{% assign edit_path = site.github.repository_url | append: '/edit/master/' | append: page.path %}
9+
{% endif %}
10+
111
<div class="page-header">
2-
<h1>{{ page.title }} <small>{{ page.subtitle }}</small></h1>
12+
<h1>
13+
{{ page.title }}
14+
<small>{{ page.subtitle }}</small>
15+
{% if edit_path %}
16+
<a class="btn btn-warning pull-right" href="{{ edit_path }}">Edit on Github</a>
17+
{% endif %}
18+
</h1>
319
</div>

_layouts/docs.html

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,16 @@
22
layout: page
33
---
44

5-
{% if page.source_file %}
6-
{% assign edit_path = page.source_file | replace: 'drivers/lego', 'https://github.com/ev3dev/lego-linux-drivers/edit/master' %}
7-
{% if page.source_line > 0 %}
8-
{% assign source_line = page.source_line | plus: 0 %}
9-
{% assign edit_path = edit_path | append: '#L' | append: source_line %}
5+
<div class="nav-dropdown-arrow">
6+
<div>
7+
{% include breadcrumbs.html %}
8+
</div>
9+
{% if page.kernel_version %}
10+
<div class="alert alert-info">
11+
<span class="glyphicon glyphicon-info-sign"></span>
12+
This docs page is for kernel version <code>{{ page.kernel_version }}</code>
13+
</div>
1014
{% endif %}
11-
{% else %}
12-
{% assign edit_path = site.github.repository_url | append: '/edit/master/' | append: page.path %}
13-
{% endif %}
14-
<div class="edit-on-github">
15-
<a href="{{ edit_path }}">Edit on Github</a>
16-
</div>
17-
<div class="breadcrumbs">
18-
{% include breadcrumbs.html %}
19-
{% if page.kernel_version %}
20-
(kernel: {{ page.kernel_version }})
21-
{% endif %}
2215
</div>
2316
<hr />
2417

stylesheets/bootswatch-extensions.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
padding-top: 18px;
5555
padding-bottom: 18px;
5656

57-
background-color: rgba(0, 0, 0, 0.12);
57+
background-color: rgba(0, 0, 0, 0.12) !important;
5858
}
5959

6060
@media all and (min-width:992px) {

0 commit comments

Comments
 (0)