1
1
{% macro render_sidebar_item(item) %}
2
- < li
3
- class ="sidebar-item sidebar-group-item {% if item.route == current_route %}sidebar-item-active{% endif %} "
4
- data-type ="{{item.type}} "
5
- data-name ="{{item.name}} "
6
- data-title ="{{item.title or item.name}} "
7
- data-group-name ="{{item.group_name or 'sidebar-item'}} "
8
- data-route ="{{ item.route }} "
9
- >
2
+ < li class ="sidebar-item sidebar-group-item {% if item.route == current_route %}sidebar-item-active{% endif %} "
3
+ data-type ="{{item.type}} " data-name ="{{item.name}} " data-title ="{{item.title or item.name}} "
4
+ data-group-name ="{{item.group_name or 'sidebar-item'}} " data-route ="{{ item.route }} ">
10
5
< div >
11
6
< a class ="text-sm sidebar-group-item-title " href ="/{{ item.route }} ">
12
7
{{ item.title or item.name }}
17
12
sidebar_items | len > 0 -%}
18
13
< ul class ="list-unstyled sidebar-group-list " style ="min-height: 20px ">
19
14
{% for sidebar_group in sidebar_items -%}
20
- < li
21
- class ="sidebar-group "
22
- data-type ="Wiki Sidebar "
23
- data-title ="{{sidebar_group}} "
24
- >
15
+ < li class ="sidebar-group " data-type ="Wiki Sidebar " data-title ="{{sidebar_group}} ">
25
16
< div class ="sidebar-group-container collapsible ">
26
17
< span class ="sidebar-group-title "> {{ sidebar_group }}</ span >
27
- < span
28
- class ="add-sidebar-page hide "
29
- data-group-name ="{{ sidebar_group }} "
30
- data-toggle ="tooltip "
31
- data-placement ="top "
32
- title ="New Wiki Page in the group {{ sidebar_group }} "
33
- >
34
- < svg
35
- xmlns ="http://www.w3.org/2000/svg "
36
- width ="16 "
37
- height ="20 "
38
- viewBox ="0 0 24 24 "
39
- fill ="none "
40
- stroke ="currentColor "
41
- stroke-width ="2 "
42
- stroke-linecap ="round "
43
- stroke-linejoin ="round "
44
- class ="feather feather-plus "
45
- >
18
+ < span class ="add-sidebar-page hide " data-group-name ="{{ sidebar_group }} " data-toggle ="tooltip "
19
+ data-placement ="top " title ="New Wiki Page in the group {{ sidebar_group }} ">
20
+ < svg xmlns ="http://www.w3.org/2000/svg " width ="16 " height ="20 " viewBox ="0 0 24 24 " fill ="none "
21
+ stroke ="currentColor " stroke-width ="2 " stroke-linecap ="round " stroke-linejoin ="round "
22
+ class ="feather feather-plus ">
46
23
< line x1 ="12 " y1 ="5 " x2 ="12 " y2 ="19 "> </ line >
47
24
< line x1 ="5 " y1 ="12 " x2 ="19 " y2 ="12 "> </ line >
48
25
</ svg >
49
26
</ span >
50
27
< span
51
- class ="drop-icon {% if collapse_sidebar_groups and sidebar_group != active_sidebar_group %}rotate{% endif %} "
52
- >
53
- < svg
54
- viewBox ="0 0 24 24 "
55
- width ="16 "
56
- height ="16 "
57
- stroke ="currentColor "
58
- stroke-width ="2 "
59
- fill ="none "
60
- stroke-linecap ="round "
61
- stroke-linejoin ="round "
62
- class ="css-i6dzq1 "
63
- >
28
+ class ="drop-icon {% if collapse_sidebar_groups and sidebar_group != active_sidebar_group %}rotate{% endif %} ">
29
+ < svg viewBox ="0 0 24 24 " width ="16 " height ="16 " stroke ="currentColor " stroke-width ="2 " fill ="none "
30
+ stroke-linecap ="round " stroke-linejoin ="round " class ="css-i6dzq1 ">
64
31
< polyline points ="6 9 12 15 18 9 "> </ polyline >
65
32
</ svg >
66
33
</ span >
67
34
</ div >
68
- < ul
69
- class ="list-unstyled sidebar-group-item-list {% if collapse_sidebar_groups and sidebar_group != active_sidebar_group %}hidden{% endif %} "
70
- style ="min-height: 20px "
71
- >
35
+ < ul class ="list-unstyled sidebar-group-item-list hidden " style ="min-height: 20px ">
72
36
{% for item in sidebar_items[sidebar_group] -%} {{
73
37
render_sidebar_item(item) }} {%- endfor %}
74
38
</ ul >
75
39
</ li >
76
40
{%- endfor %}
77
41
</ ul >
78
42
< div class ="d-none d-lg-block sidebar-options ">
79
- < div
80
- class ="sidebar-edit-mode-btn text-muted "
81
- data-toggle ="tooltip "
82
- data-placement ="top "
83
- title ="Changes to sidebar will be automatically saved "
84
- >
85
- < svg
86
- xmlns ="http://www.w3.org/2000/svg "
87
- width ="16 "
88
- height ="16 "
89
- viewBox ="0 0 24 24 "
90
- fill ="none "
91
- stroke ="currentColor "
92
- stroke-width ="2 "
93
- stroke-linecap ="round "
94
- stroke-linejoin ="round "
95
- class ="feather feather-edit-3 "
96
- >
43
+ < div class ="sidebar-edit-mode-btn text-muted " data-toggle ="tooltip " data-placement ="top "
44
+ title ="Changes to sidebar will be automatically saved ">
45
+ < svg xmlns ="http://www.w3.org/2000/svg " width ="16 " height ="16 " viewBox ="0 0 24 24 " fill ="none " stroke ="currentColor "
46
+ stroke-width ="2 " stroke-linecap ="round " stroke-linejoin ="round " class ="feather feather-edit-3 ">
97
47
< path d ="M12 20h9 "> </ path >
98
48
< path d ="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z "> </ path >
99
49
</ svg >
100
50
< span class ="small "> Edit Sidebar</ span >
101
51
</ div >
102
52
< div class ="add-sidebar-group text-muted hide ">
103
- < svg
104
- xmlns ="http://www.w3.org/2000/svg "
105
- width ="16 "
106
- height ="16 "
107
- viewBox ="0 0 24 24 "
108
- fill ="none "
109
- stroke ="currentColor "
110
- stroke-width ="2 "
111
- stroke-linecap ="round "
112
- stroke-linejoin ="round "
113
- class ="feather feather-plus "
114
- >
53
+ < svg xmlns ="http://www.w3.org/2000/svg " width ="16 " height ="16 " viewBox ="0 0 24 24 " fill ="none " stroke ="currentColor "
54
+ stroke-width ="2 " stroke-linecap ="round " stroke-linejoin ="round " class ="feather feather-plus ">
115
55
< line x1 ="12 " y1 ="5 " x2 ="12 " y2 ="19 "> </ line >
116
56
< line x1 ="5 " y1 ="12 " x2 ="19 " y2 ="12 "> </ line >
117
57
</ svg >
118
58
< span class ="small "> Add Group</ span >
119
59
</ div >
120
60
< div class ="sidebar-view-mode-btn text-muted hide ">
121
- < svg
122
- xmlns ="http://www.w3.org/2000/svg "
123
- width ="16 "
124
- height ="16 "
125
- viewBox ="0 0 24 24 "
126
- fill ="none "
127
- stroke ="currentColor "
128
- stroke-width ="2 "
129
- stroke-linecap ="round "
130
- stroke-linejoin ="round "
131
- class ="feather feather-sidebar "
132
- >
61
+ < svg xmlns ="http://www.w3.org/2000/svg " width ="16 " height ="16 " viewBox ="0 0 24 24 " fill ="none " stroke ="currentColor "
62
+ stroke-width ="2 " stroke-linecap ="round " stroke-linejoin ="round " class ="feather feather-sidebar ">
133
63
< rect x ="3 " y ="3 " width ="18 " height ="18 " rx ="2 " ry ="2 "> </ rect >
134
64
< line x1 ="9 " y1 ="3 " x2 ="9 " y2 ="21 "> </ line >
135
65
</ svg >
139
69
{%- endif -%} {% endmacro %} {% macro my_account() %}
140
70
< ul class ="list-unstyled management ">
141
71
< li class ="sidebar-item ">
142
- < a class ="new-wiki-page text-muted " href ="placeholder_link "
143
- > {{ _("Add a new page") }}</ a
144
- >
72
+ < a class ="new-wiki-page text-muted " href ="placeholder_link "> {{ _("Add a new page") }}</ a >
145
73
</ li >
146
74
</ ul >
147
75
{% endmacro %}
148
76
149
77
< div class ="web-sidebar " data-name ="{{wiki_search_scope}} ">
150
78
< div class ="sidebar-items "> {{ render_sidebar_items(sidebar_items) }}</ div >
151
- </ div >
79
+ </ div >
0 commit comments