aboutsummaryrefslogtreecommitdiffstats
path: root/doc/toc.html
blob: 597a2c2c51fc992f7106c7a47fb9a7b169d0aef9 (plain) (blame)
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<style>
    .doco-list-group-item > a {
        font-weight: bold;
    } 

    .sub-menu {
        margin: 3px 0px 10px 10px;
    }
    
    #doco-content h1 {
        border-bottom: #cccccc thin solid;
        padding-bottom: 0.3em;
    }
    
    #region_1 .widget ul ul {
        list-style-type: none;
    }

    .toc-content li,
    #doco-top-toc li {
	padding: 3px 0px;
    }
</style>

<div class="" id="accordion">
    <div class="panel">
        <div class="">
            <h3 class="panel-title">
                <a data-toggle="collapse" data-parent="#accordion" href="#about">
                    About</a>
            </h3>
        </div>
        <div id="about" class="panel-collapse collapse in">
            <ul class="list-group">
                <li class="doco-list-group-item"><a href="/help/about/about_hubzilla">Hubzilla project</a></li>
                <li class="doco-list-group-item"><a href="/help/about/about_hub">About this hub</a></li>
            </ul>
        </div>
    </div>
    <div class="panel">
        <div class="">
            <h3 class="panel-title">
                <a data-toggle="collapse" data-parent="#accordion" href="#members">
                    Members</a>
            </h3>
        </div>
        <div id="members" class="panel-collapse collapse in">
            <ul class="list-group">
                <li class="doco-list-group-item"><a href="/help/member/member_guide">Guide</a></li>
                <li class="doco-list-group-item"><a href="/help/member/member_faq">FAQ</a></li>
            </ul>
        </div>
    </div>
    <div class="panel">
        <div class="">
            <h3 class="panel-title">
                <a data-toggle="collapse" data-parent="#accordion" href="#administrators">
                    Administrators</a>
            </h3>
        </div>
        <div id="administrators" class="panel-collapse collapse in">
            <ul class="list-group">
                <li class="doco-list-group-item"><a href="/help/admin/administrator_guide">Guide</a></li>
                <li class="doco-list-group-item"><a href="/help/admin/hub_snapshots">Hub Snapshots</a></li>
            </ul>
        </div>
    </div>
    <div class="panel">
        <div class="">
            <h3 class="panel-title">
                <a data-toggle="collapse" data-parent="#accordion" href="#developers">
                    Developers</a>
            </h3>
        </div>
        <div id="developers" class="panel-collapse collapse in">
            <ul class="list-group">
                <li class="doco-list-group-item"><a href="/help/developer/developer_guide">Guide</a></li>
                <li class="doco-list-group-item"><a href="/help/developer/api_zot">Zot API</a></li>
            </ul>
        </div>
    </div>
    <div class="panel">
        <div class="">
            <h3 class="panel-title">
                <a data-toggle="collapse" data-parent="#accordion" href="#tutorials">
                    Tutorials</a>
            </h3>
        </div>
        <div id="tutorials" class="panel-collapse collapse in">
            <ul class="list-group">
                <li class="doco-list-group-item"><a href="/help/tutorials/personal_channel">Personal Channel</a></li>
            </ul>
        </div>
    </div>
</div>
<script>

    // Generate the table of contents in the side nav menu (see view/tpl/help.tpl)
    $(document).ready(function () {
        $(".panel-collapse.in").find('a').each(function(){
            window.console.log($(this).attr('href'));
            var url = document.createElement('a');
            url.href = window.location;
            var pageName = url.href.split('/').pop().split('#').shift();
            window.console.log('pageName: ' + pageName);
            var linkName = $(this).attr('href').split('/').pop();
            window.console.log('linkName: ' + linkName);
            if(pageName === linkName) {
                var tocUl = $(this).closest('li').append('<ul>').find('ul');
                tocUl.removeClass();  // Classes are automatically added to <ul> elements by something else
                tocUl.toc({content: "#doco-content", headings: "h3"});
                tocUl.addClass('toc-content sub-menu');
		tocUl.attr('id', 'doco-side-toc');

            }
        });
		
	$(document.body).trigger("sticky_kit:recalc");

    });

</script>