Skip to content

Commit 030c0d6

Browse files
committed
Add vertical line left of package children in sidebar
1 parent 1fbf68d commit 030c0d6

File tree

6 files changed

+243
-213
lines changed

6 files changed

+243
-213
lines changed

doc-tool/resources/_includes/sidebar.html

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,25 @@
88
{% endif %}
99
{% for pkg in docs %}
1010
<li class="index-entity entity-package">
11-
<a class="entity-name" href="{{ site.baseurl }}/api/{{ pkg.path | join: "/" }}/index.html">{{ pkg.name }}</a>
11+
<h1><a class="entity-name" href="{{ site.baseurl }}/api/{{ pkg.path | join: "/" }}/index.html">{{ pkg.name }}</a></h1>
12+
<ul class="package-entities">
13+
<div id="cover-block"></div>
14+
{% for member in pkg.children %}
15+
{% if member.kind == "object" and member.hasCompanion %}
16+
{% elsif member.kind != "package" %}
17+
<li class="{% if member.hasCompanion %} with-companion {% endif %}">
18+
<div class="entity-kinds">
19+
{% if member.hasCompanion %}
20+
<a class="letter-anchor object" href="{{ site.baseurl }}/api/{{ member.companionPath | join: "/" }}.html">O</a>
21+
{% endif %}
22+
<a class="letter-anchor {{ member.kind }}" href="{{ site.baseurl }}/api/{{ member.path | join: "/" }}.html">{{ member.kind | first | capitalize }}</a>
23+
</div>
24+
<a class="entity-name" href="{{ site.baseurl }}/api/{{ member.path | join: "/" }}.html">{{ member.name }}</a>
25+
</li>
26+
{% endif %}
27+
{% endfor %}
28+
</ul>
1229
</li>
13-
{% for member in pkg.children %}
14-
{% if member.kind == "object" and member.hasCompanion %}
15-
{% elsif member.kind != "package" %}
16-
<li class="index-entity {% if member.hasCompanion %} with-companion {% endif %}">
17-
<div class="entity-kinds">
18-
{% if member.hasCompanion %}
19-
<a class="letter-anchor object" href="{{ site.baseurl }}/api/{{ member.companionPath | join: "/" }}.html">O</a>
20-
{% endif %}
21-
<a class="letter-anchor {{ member.kind }}" href="{{ site.baseurl }}/api/{{ member.path | join: "/" }}.html">{{ member.kind | first | capitalize }}</a>
22-
</div>
23-
<a class="entity-name" href="{{ site.baseurl }}/api/{{ member.path | join: "/" }}.html">{{ member.name }}</a>
24-
</li>
25-
{% endif %}
26-
{% endfor %}
2730
{% endfor %}
2831
</ul>
2932
</div>

doc-tool/resources/_layouts/api-page.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
layout: main
33
extraCSS:
4+
- css/sidebar.css
45
- css/api-page.css
56
---
67

doc-tool/resources/css/dottydoc.css

Lines changed: 0 additions & 198 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,6 @@ div#content-wrapper div#content-body {
2424
min-height: 100vh;
2525
}
2626

27-
div#content-wrapper div.index-wrapper {
28-
background-color: #fafafa;
29-
position: fixed;
30-
top: 0;
31-
left: 0;
32-
height: 100%;
33-
overflow-y: auto;
34-
overflow-x: hidden;
35-
}
36-
3727
/** Animations: Easing for content body slide on toggle */
3828
div#content-wrapper,
3929
div#content-wrapper div#content-body {
@@ -42,41 +32,6 @@ div#content-wrapper div#content-body {
4232
transition: all .25s ease-out;
4333
}
4434

45-
/** Mobile (x < 576px) sidebar: Defaults closed with 60% wide sidebar */
46-
div#content-wrapper {}
47-
div#content-wrapper div#content-body { left: 0; }
48-
div#content-wrapper div.index-wrapper { width: 60%; }
49-
50-
div#content-wrapper.toggled {}
51-
div#content-wrapper.toggled div#content-body { left: 60%; }
52-
div#content-wrapper.toggled div.index-wrapper {}
53-
54-
/** Tablet (576px <= x < 768px) sidebar: Defaults closed with 250px wide sidebar */
55-
@media screen and (min-width: 576px) {
56-
57-
div#content-wrapper {}
58-
div#content-wrapper div#content-body {}
59-
div#content-wrapper div.index-wrapper { width: 250px; }
60-
61-
div#content-wrapper.toggled {}
62-
div#content-wrapper.toggled div#content-body { left: 250px; }
63-
div#content-wrapper.toggled div.index-wrapper {}
64-
65-
}
66-
67-
/** Desktop (x >= 768px) sidebar: Defaults open with 250px wide sidebar */
68-
@media screen and (min-width: 768px) {
69-
70-
div#content-wrapper { padding-left: 250px; }
71-
div#content-wrapper div#content-body {}
72-
div#content-wrapper div.index-wrapper { width: 250px; }
73-
74-
div#content-wrapper.toggled { padding-left: 0; }
75-
div#content-wrapper.toggled div#content-body { left: 0; }
76-
div#content-wrapper.toggled div.index-wrapper {}
77-
78-
}
79-
8035
div#content-wrapper button#menu-toggle {
8136
background: rgba(244, 243, 244, 0.4) none;
8237
border: 1px solid transparent;
@@ -172,159 +127,6 @@ div#doc-page-container > h6 > a:focus {
172127
outline: none;
173128
}
174129

175-
ul.index-entities {
176-
list-style-type: none;
177-
padding-left: 0;
178-
}
179-
180-
ul.toc {
181-
list-style-type: none;
182-
padding-top: 18px;
183-
padding-left: 0;
184-
}
185-
186-
ul.toc > li:hover {
187-
background-color: transparent;
188-
}
189-
190-
ul.toc > li.toc-title {
191-
margin-top: 1rem;
192-
}
193-
194-
ul.toc > li.toc-title > a {
195-
font-size: 16px;
196-
font-weight: bold;
197-
}
198-
199-
ul.toc > li > a#home-button,
200-
ul.toc > li > a#home-button:hover {
201-
text-align: center;
202-
background: transparent;
203-
}
204-
205-
ul.toc > li > a#home-button svg g#logo-foreground {
206-
fill: rgba(202, 68, 94, 1);
207-
}
208-
209-
ul.toc > li > a#home-button svg g#logo-background {
210-
fill: rgba(202, 68, 94, 0.45);
211-
}
212-
213-
ul.toc > li > a {
214-
width: 100%;
215-
user-select: none;
216-
}
217-
218-
ul.toc > li,
219-
ul.index-entities > li {
220-
line-height: 40px;
221-
display: inline-block;
222-
width: 100%;
223-
}
224-
225-
ul.index-entities > li.index-entity:not(.entity-package) {
226-
width: calc(100% + 40px);
227-
transition: all 0.2s ease;
228-
margin-left: -40px;
229-
}
230-
231-
ul.index-entities > li.index-entity.with-companion {
232-
width: calc(100% + 80px);
233-
margin-left: -80px;
234-
}
235-
236-
ul.index-entities > li.index-entity:hover {
237-
margin-left: 0;
238-
}
239-
240-
ul.toc > li.logo-li > a {
241-
margin: 0;
242-
padding: 0;
243-
float: none;
244-
}
245-
246-
li.index-entity.entity-package > a.entity-name {
247-
color: #ff4081;
248-
text-decoration: none;
249-
}
250-
251-
ul.toc > li > a,
252-
ul.index-entities > li > a.entity-name {
253-
font-size: 13px;
254-
display: block;
255-
padding: 0 0 0 24px;
256-
color: rgba(0, 0, 0, 0.87);
257-
background: transparent;
258-
cursor: pointer;
259-
float: left;
260-
}
261-
262-
ul.index-entities > li > div.entity-kinds {
263-
float: left;
264-
}
265-
266-
ul.index-entities > li > div.entity-kinds > a.letter-anchor {
267-
float: left;
268-
width: 40px;
269-
height: 40px;
270-
color: white;
271-
display: block;
272-
text-align: center;
273-
text-decoration: none;
274-
}
275-
276-
ul.index-entities > li > div.entity-kinds > a.letter-anchor:focus,
277-
ul.index-entities > li > div.entity-kinds > a.letter-anchor:hover {
278-
text-decoration: none;
279-
}
280-
281-
ul.index-entities > li > div.entity-kinds > a.letter-anchor.object {
282-
background-color: rgb(44, 108, 141);
283-
}
284-
285-
ul.index-entities > li > div.entity-kinds > a.letter-anchor.class {
286-
background-color: rgb(68, 173, 125);
287-
}
288-
289-
ul.index-entities > li > div.entity-kinds > a.letter-anchor.trait {
290-
background-color: rgb(25, 170, 207);
291-
}
292-
293-
ul.toc > li > ul.show {
294-
display: block;
295-
list-style-type: none;
296-
font-size: 13px;
297-
}
298-
299-
ul.toc > li > ul.hide {
300-
display: none;
301-
}
302-
303-
ul.index-entities > li.index-title > span {
304-
font-size: 16px;
305-
font-weight: bold;
306-
color: rgba(0, 0, 0, 0.87);
307-
padding: 0 24px;
308-
}
309-
310-
ul.index-entities > li.index-title:hover {
311-
background-color: transparent;
312-
}
313-
314-
li.index-entity > a:focus {
315-
text-decoration: none;
316-
}
317-
318-
ul.index-entities > li:hover,
319-
ul.toc > li > a:hover {
320-
background-color: rgba(0, 0, 0, 0.2);
321-
}
322-
323-
ul.index-entities > li > a:hover,
324-
ul.toc > li > a:hover {
325-
text-decoration: none;
326-
}
327-
328130
.darken {
329131
background-color: rgba(0, 0, 0, 0.2);
330132
}

0 commit comments

Comments
 (0)