forked from TheThingsNetwork/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathguide.html
98 lines (79 loc) · 3.87 KB
/
guide.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
---
layout: default
---
{% if page.collection == 'versions' %}
{% capture version %}{{ page.url | split: '/' | slice: 1 }}{% endcapture %}
{% capture current %}{{ page.url | split: '/' | slice: 2,10 | join: '/' | prepend: '/' | append: '/' }}{% endcapture %}
{% else %}
{% assign current = page.url %}
{% endif %}
{% for version in site.versions %}
{% capture version_of %}{{ version.url | split: '/' | slice: 2,10 | join: '/' | prepend: '/' | append: '/' }}{% endcapture %}
{% if version_of == current %}
{% unless achives %}{% assign versions = '' | split: '|' %}{% endunless %}
{% assign versions = versions | push: version %}
{% endif %}
{% endfor %}
<div class="layout-guide container">
<div class="row">
<div class="col-sm-9">
<ol class="breadcrumb">
<li><a href="{{ site.baseurl }}/">Docs</a></li>
<li class="active">{{page.title}}</li>
</ol>
</div>
{% unless version %}
<div class="col-sm-3 text-right">
<a class="btn btn-default hidden-xs" href="{{ site.github.repository_url }}/edit/master/{{ page.path | downcase }}" target="_blank"><i class="fa fa-pencil"></i> Improve this guide</a>
</div>
{% endunless %}
</div>
<div class="row">
<div class="col-md-3" role="complementary">
<div class="guide-sidebar">
<div class="dropdown">
<button class="btn btn-primary btn-block" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Guides <span class="caret"></span></button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
{% assign sorted = site.guides | sort:"zindex" | reverse %}
{% for guide in sorted %}
{% unless guide.hidden %}
<li{% if guide.path == page.path %} class="active"{% endif %}><a href="{{ site.baseurl }}{{ guide.url}}">{{ guide.title }}</a></li>
{% endunless %}
{% endfor %}
</ul>
</div>
<hr />
<div class="js-toc hidden-xs hidden-sm"></div>
</div>
</div>
<div class="col-md-9 js-toc-content content-body" role="main">
{% if version %}
<div class="alert alert-warning"><strong>Attention:</strong> You are reading the <em>{{ version }}</em> version of this guide.</div>
{% endif %}
{% assign replace_a_with = '<a href="' | append: site.baseurl | append: '/' %}
{% assign replace_img_with = '<img src="' | append: site.baseurl | append: '/' %}
<section class="panel">
<div class="panel-body">
{% if version %} <span class="label label-success pull-right">{{ version | upcase }}</span>{% endif %}
<h1 id="top">{{page.title}}</h1>
{{ content | replace: '<a href="/', replace_a_with | replace: '<img src="/', replace_img_with | replace: '<table>', '<table class="table">' }}
</div>
{% if versions %}
<div class="panel-footer">
Versions: <a href="{{ site.baseurl | append: current }}" class="label label-{% if page.url == current %}success{% else %}default{% endif %}">CURRENT</a> {% for version in versions %}
<a href="{{ site.baseurl | append: version.url }}" class="label label-{% if page.url == version.url %}success{% else %}default{% endif %}">{{ version.url | split: '/' | slice: 1 | first | upcase }}</a>
{% endfor %}
</div>
{% endif %}
</section>
{% for section in page.sections %}
{% capture section_include %}{% include_relative {{section}} %}{% endcapture %}
<section class="panel">
<div class="panel-body">
{{ section_include | markdownify | replace: '<a href="/', replace_a_with | replace: '<img src="/', replace_img_with | replace: '<table>', '<table class="table">'}}
</div>
</section>
{% endfor %}
</div>
</div>
</div>