Skip to content

Commit b7968a2

Browse files
authored
Merge pull request #27 from railsdoc/css/better-toc-ux
Better Sidebar UX
2 parents 5456750 + 53367e2 commit b7968a2

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
lines changed

src/_includes/navigation.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3635,6 +3635,14 @@
36353635

36363636
</li>
36373637

3638+
<li>
3639+
3640+
3641+
<a href="/files/activemodel/lib/active_model/type/helpers/timezone_rb.html">timezone.rb</a>
3642+
3643+
3644+
</li>
3645+
36383646
</ul>
36393647

36403648

@@ -7748,6 +7756,14 @@
77487756

77497757
<ul style="display:none;">
77507758

7759+
<li>
7760+
7761+
7762+
<a href="/files/activesupport/lib/active_support/core_ext/range/compare_range_rb.html">compare_range.rb</a>
7763+
7764+
7765+
</li>
7766+
77517767
<li>
77527768

77537769

@@ -15350,6 +15366,14 @@
1535015366

1535115367
</li>
1535215368

15369+
<li>
15370+
15371+
15372+
<a href="/classes/ActiveModel/Type/Helpers/Timezone.html">Timezone</a>
15373+
15374+
15375+
</li>
15376+
1535315377
</ul>
1535415378

1535515379

src/_sass/railsdoc.scss

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ code {
4848
position: sticky;
4949
order: 2;
5050
top: $navbar-height;
51-
height: calc(100vh - #{$navbar-height});
51+
max-height: calc(100vh - #{$navbar-height});
5252
z-index: 100; /* Behind the navbar */
5353
box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
54+
overflow-y: auto;
5455

5556
.toc-content {
5657
padding-top: 20px;
@@ -60,7 +61,7 @@ code {
6061
}
6162

6263
.section-nav {
63-
padding-left: 1rem;
64+
padding-left: .5rem;
6465
border-left: 1px solid #eee;
6566

6667
ul {
@@ -80,6 +81,9 @@ code {
8081

8182
.toc-entry {
8283
display: block;
84+
overflow: hidden;
85+
white-space: nowrap;
86+
text-overflow: ellipsis;
8387
}
8488

8589
.sidebar-content {
@@ -177,7 +181,7 @@ code {
177181
margin-top: 1rem;
178182
}
179183

180-
h2[id]::before, h3[id]::before, h4[id]::before, h5[id]::before {
184+
h2[id]::before, h3[id]::before, h4[id]::before, h5[id]::before, h6[id]::before {
181185
display: block;
182186
height: $hacky-div-height;
183187
margin-top: -$hacky-div-height;

src/created.rid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Fri, 17 May 2019 23:08:50 +0900
1+
Sun, 19 May 2019 01:05:25 +0900
22
railties/RDOC_MAIN.rdoc Wed, 13 Feb 2019 05:46:11 +0900
33
activesupport/README.rdoc Wed, 13 Feb 2019 05:46:11 +0900
44
activesupport/lib/active_support/all.rb Wed, 16 Jan 2019 00:38:48 +0900

0 commit comments

Comments
 (0)