summaryrefslogtreecommitdiffstats
path: root/theme/templates/includes/book/summary.html
blob: b4859fce022b475f753a378161046ab0f055860b (plain)
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
<div class="book-summary">
    <div class="book-search">
        <input type="text" placeholder="Search" class="form-control" />
    </div>
    <ul class="summary">
        {% set _divider = false %}
        {% if options.links.about !== false && (options.links.about || githubId) %}
        {% set _divider = true %}
        <li>
            <a href="{{ options.links.about|default(githubHost+githubAuthor) }}" target="blank" class="author-link">About the author</a>
        </li>
        {% endif %}

        {% if options.links.issues !== false && (options.links.issues || githubId) %}
        {% set _divider = true %}
        <li>
            <a href="{{ options.links.issues|default(githubHost+githubId+"/issues") }}" target="blank"class="issues-link">Questions and Issues</a>
        </li>
        {% endif %}

        {% if options.links.contribute !== false && (options.links.contribute || githubId) %}
        {% set _divider = true %}
        <li>
            <a href="{{ options.links.contribute|default(githubHost+githubId+"/edit/master/"+_input) }}" target="blank" class="contribute-link">Edit and Contribute</a>
        </li>
        {% endif %}

        {% if _divider %}
        <li class="divider"></li>
        {% endif %}

        <li data-level="0" data-path="index.html">
            <a href="{{ basePath }}/"><i class="fa fa-check"></i> Introduction</a>
        </li>
        {% for item in summary.chapters %}
            <li class="chapter {% if item._path == _input %}active{% endif %}" data-level="{{ item.level }}" {% if item.path %}data-path="{{ item.path|mdLink }}"{% endif %}>
                {% if item.path %}
                <a href="{{ basePath }}/{{ item.path|mdLink }}">
                    <i class="fa fa-check"></i> <b>{{ item.level }}.</b> {{ item.title }}
                </a>
                {% else %}
                <span><b>{{ item.level }}.</b> {{ item.title }}</span>
                {% endif %}
                {% if item.articles.length > 0 %}
                <ul class="articles">
                    {% for article in item.articles %}
                        <li {% if article._path == _input %}class="active"{% endif %} data-level="{{ article.level }}" {% if article.path %}data-path="{{ article.path|mdLink }}"{% endif %}>
                            {% if article.path %}
                            <a href="{{ basePath }}/{{ article.path|mdLink }}">
                                <i class="fa fa-check"></i> <b>{{ article.level }}.</b> {{ article.title }}
                            </a>
                            {% else %}
                            <span><b>{{ article.level }}.</b> {{ article.title }}</span>
                            {% endif %}
                        </li>
                    {% endfor %}
                </ul>
                {% endif %}
            </li>
        {% endfor %}

        {% if options.links.gitbook !== false %}
        <li class="divider"></li>
        <li>
            <a href="http://www.gitbook.io/" target="blank" class="gitbook-link">Generated using GitBook</a>
        </li>
        {% endif %}
    </ul>
</div>