-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.nunjucks
72 lines (62 loc) · 2.52 KB
/
index.nunjucks
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
<div>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600" rel="stylesheet">
<style>
{% include "./assets/styles.css" %}
</style>
<div>
<div class="rest">
<div class="rest__header">
{% if title %}
<h1 class="rest__title">{{ title }} API documentation{% if version %} <small>version {{ version }}</small>{% endif %}</h1>
{% endif %}
<p class="rest__base-uri">{{ baseUri }}</p>
{% if baseUriParameters %}
<ul class="rest__uri-parameters">
{% for item in baseUriParameters %}
{% include "./item.nunjucks" %}
{% endfor %}
</ul>
{% endif %}
{% if description %}
<p>{{ description }}</p>
{% endif %}
{% for chapter in documentation %}
<h3 id="{{ chapter.uniqueId }}"><a href="#{{ chapter.uniqueId }}">{{ chapter.title }}</a></h3>
{% markdown %}
{{ chapter.content }}
{% endmarkdown %}
{% endfor %}
</div>
<ul class="rest-nav">
{% for resource in resources %}
<li class="rest-nav__item {% if loop.first %}active{% endif %}"><a class="rest-nav__link" href="#{{ resource.uniqueId}}">{% if resource.displayName %}{{ resource.displayName }}{% else %}{{ resource.relativeUri }}{% endif %}</a></li>
{% endfor %}
</ul>
<div class="clear"></div>
<div class="objects">
{% for resource in resources %}
<div class="object__body {% if loop.first %}active{% endif %}" id="{{ resource.uniqueId }}">
<h3 class="object__title">
{% if resource.displayName %}{{ resource.displayName }}{% else %}{{ resource.relativeUri }}{% endif %}
</h3>
{% if resource.description %}<p class="object__description">{{ resource.description }}</p>{% endif %}
{% include "./resource.nunjucks" %}
</div>
{% endfor %}
</div>
</div>
</div>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.3.0/styles/default.min.css">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.3.0/highlight.min.js"></script>
<script>
if(!window.$) {
document.write('<script\
src="https://code.jquery.com/jquery-3.2.1.slim.min.js"\
integrity="sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g="\
crossorigin="anonymous"></scr' + 'ipt>');
}
</script>
<script>
{% include "./assets/scripts.js" %}
</script>
</div>