forked from creativecommons/ccos-website-source
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-with-toc.html
143 lines (141 loc) · 6.77 KB
/
page-with-toc.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
{% extends "layout.html" %}
{% block title %}{{ this.title }}{% endblock %}
{% block body %}
<div class="code-guidelines">
<header class="header">
<div class="container is-paddingless">
<h1>{{ this.title }}</h1>
<div class="description column is-9 is-paddingless">
{{ this.description }}
</div>
</div>
</header>
<div class="container code-guidelines-body">
<div class="columns">
<div class="column is-one-quarter">
<div class="row">
{% if this.is_child_of('/contributing-code') %}
<aside class="menu sidebar-menu">
<ul class="menu-list">
{% for href, title in [
['/contributing-code/projects', 'Project List'],
['/contributing-code/issue-finder', 'Issue Finder'],
['/contributing-code', 'Contribution Guidelines'],
['/contributing-code/usability', 'Usability'],
] %}
<li>
<a class="{% if this.path == href %} is-active {% endif%} link" href="{{ href|url }}">{{ title }}</a>
{% if (href == '/contributing-code') %}
<ul>
{% for href, title in [
['/contributing-code/pr-guidelines', 'Pull Request Guidelines'],
['/contributing-code/github-repo-guidelines', 'GitHub Repo Guidelines'],
['/contributing-code/repo-labels', 'Repository Labels'],
['/contributing-code/javascript-guidelines', 'JavaScript Guidelines'],
['/contributing-code/python-guidelines', 'Python Guidelines'],
['/contributing-code/translation-guide', 'Translation Guide'],
] %}
<li><a class="{% if this.path == href %} is-active {% endif%} link" href="{{ href|url }}"><i class="icon circle-filled"></i>{{ title }}</a></li>
{% endfor %}
</ul>
{% endif %}
</li>
{% if (href != '/contributing-code/usability') %}
<hr class="divider">
{% endif %}
{% endfor %}
</ul>
</aside>
{% elif this.is_child_of('/community') %}
<aside class="menu sidebar-menu">
<ul class="menu-list">
{% for href, title in [
['/community', 'Join the Community'],
['/community/community-team', 'Community Team'],
['/community/write-a-blog-post', 'Write a Blog Post'],
['/community/code-of-conduct', 'Code of Conduct'],
] %}
<li>
<a class="{% if this.path == href %} is-active {% endif%} link" href="{{ href|url }}">{{ title }}</a>
{% if (href == '/community/community-team') %}
<ul>
{% for href, title in [
['/community/community-team/members', 'Community Team Members'],
['/community/community-team/project-roles', 'Project Roles'],
['/community/community-team/community-building-roles', 'Community Building Roles'],
['/community/community-team/engagement-channels', 'Engagement Channels'],
] %}
<li><a class="{% if this.path == href %} is-active {% endif%} link" href="{{ href|url }}"><i class="icon circle-filled"></i>{{ title }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% if (href == '/community/code-of-conduct') %}
<ul>
<li><a class="{% if this._path == '/community/code-of-conduct/enforcement' %} is-active {% endif%} link" href="{{ '/community/code-of-conduct/enforcement'|url }}"><i class="icon circle-filled"></i>Code of Conduct Enforcement</a></li>
</ul>
{% endif %}
</li>
{% if (href != '/community/code-of-conduct') %}
<hr class="divider">
{% endif %}
{% endfor %}
</li>
</ul>
</aside>
{% elif this.is_child_of('/programs') %}
<aside class="menu sidebar-menu">
<ul class="menu-list">
{% for href, title in [
['/programs', 'Overview'],
['/programs/project-ideas', 'Project Ideas'],
['/programs/history', 'History'],
] %}
<li>
<a class="{% if this.path == href %} is-active {% endif%} link" href="{{ href|url }}">{{ title }}</a>
{% if (href == '/programs') %}
<ul>
{% for href, title in [
['/programs/applicant-guide', 'Applicant Guide'],
['/programs/contrib-guide', 'Contributor Guide'],
['/programs/lead-guide', 'Project Lead Guide'],
] %}
<li><a class="{% if this.path == href %} is-active {% endif%} link" href="{{ href|url }}"><i class="icon circle-filled"></i>{{ title }}</a></li>
{% endfor %}
</ul>
{% endif %}
</li>
{% if (href != '/programs/history') %}
<hr class="divider">
{% endif %}
{% endfor %}
</ul>
</aside>
{% endif %}
</div>
<div class="row padding-bottom-normal sticky-top">
<h4 class="b-header">On this page</h4>
<aside class="menu table-of-contents">
<ul class="menu-list">
{% for item in this.body.toc %}
<li>
<a class="link" href="#{{ item.anchor }}">{{ item.title }}</a>
{% if item.children and not this.is_long_page %}
<ul>
{% for subitem in item.children %}
<li><a class="link" href="#{{ subitem.anchor }}"><i class="icon circle-filled"></i>{{ subitem.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</aside>
</div>
</div>
<div class="column content is-three-quarters">
{{ this.body }}
</div>
</div>
</div>
</div>
{% endblock %}