Skip to content

Commit 15413f6

Browse files
committed
Revert "Fancy TOK"
This reverts commit 2ebb450.
1 parent 2ebb450 commit 15413f6

File tree

5 files changed

+28
-90
lines changed

5 files changed

+28
-90
lines changed

sphinx/_static/headers.js

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -212,47 +212,7 @@ $(document).ready(function () {
212212
$(".toggle-navigation").removeClass('active');
213213
});
214214

215-
var b_scroll_view = $('.b-scrollview');
216-
var b_cols_content = $('.b-cols_content');
217-
var b_footer = $('.b-footer');
218-
var b_cols_content_left = $('.b-cols_content_left');
219-
220-
/* disable page scrolling while mouse is in TOC */
221-
b_cols_content_left.mouseenter(function() {
222-
b_scroll_view.css('overflow', 'hidden');
223-
}).mouseleave(function() {
224-
b_scroll_view.css('overflow', '');
225-
});
226-
227-
function layout_tok() {
228-
var scroll_top = b_scroll_view.scrollTop();
229-
var window_h = $(window).height();
230-
var y1 = b_cols_content.offset().top;
231-
var y2 = b_footer.offset().top;
232-
var target = b_cols_content_left;
233-
if ($(window).width() < 992) {
234-
target.removeClass('b-cols_content_left_stuck');
235-
target.css('max-height', '');
236-
return;
237-
}
238-
/* adjust max-height s.t. it matches the portion of TOC clipped
239-
* by viewport*/
240-
var max_height = Math.min(window_h, y2);
241-
if (y1 >= 0) {
242-
max_height = Math.min(max_height, window_h - y1, y2 - y1);
243-
target.removeClass('b-cols_content_left_stuck');
244-
} else {
245-
target.addClass('b-cols_content_left_stuck');
246-
}
247-
/* -15 to compensate for padding-top */
248-
target.css('max-height', Math.floor(max_height - 15) + 'px');
249-
}
250-
251-
b_scroll_view.scroll(layout_tok);
252-
$(window).resize(layout_tok);
253-
layout_tok();
254-
255-
}).click(function(event) {
215+
}).click(function() {
256216
if (is_mobile) {
257217
event.stopPropagation();
258218
}

sphinx/_static/sphinx_design.css

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -281,19 +281,12 @@ tr.field td p {
281281
width:960px;
282282
margin:0 auto;
283283
padding:0 0 30px 0;
284-
position:relative;
285284
}
286285
.b-cols_content_left {
287-
position: absolute;
288-
top: 0;
289-
bottom: 0;
290-
width: 295px;
291-
padding: 15px 15px 0 700px;
292-
margin-left: -700px;
293-
overflow: auto;
294-
}
295-
.b-cols_content_left_stuck {
296-
position: fixed !important;
286+
position:relative;
287+
float:left;
288+
width:295px;
289+
padding:15px 0 0 0;
297290
}
298291
.b-cols_content_right {
299292
float:right;

sphinx/_templates/base

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,20 @@
6262
{% else %}
6363
<body class="b-main b-doc-{{ pagename }}">
6464
{% endif%}
65-
<div class="b-scrollview">
66-
<div class="b-wrapper">
67-
<!-- HEADER > -->
68-
{{ menu.i_header() }}
69-
<!-- < HEADER -->
65+
<div class="b-wrapper">
66+
<!-- HEADER > -->
67+
{{ menu.i_header() }}
68+
<!-- < HEADER -->
7069

71-
<div class="b-content b-clearbox">
72-
{% block content %} {% endblock content %}
73-
</div>
74-
</div>
70+
<div class="b-content b-clearbox">
71+
{% block content %} {% endblock content %}
72+
</div>
73+
</div>
7574

76-
<!-- FOOTER > -->
77-
{{ menu.i_footer() }}
78-
<!-- < FOOTER -->
79-
<div id="mobile-checker"></div>
80-
</div>
75+
<!-- FOOTER > -->
76+
{{ menu.i_footer() }}
77+
<!-- < FOOTER -->
78+
<div id="mobile-checker"></div>
8179
</body>
8280
</html>
8381

www/theme/static/design.css

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ body {
1616
height:100%;
1717
background:#FFF;
1818
margin:0;
19-
overflow: hidden;
20-
}
21-
.b-scrollview {
22-
height: 100%;
23-
overflow: auto;
2419
}
2520
a, img, input, textarea, select {
2621
outline:none;
@@ -2489,11 +2484,5 @@ ul.b-social_block a:hover {
24892484
.b-menu_mobile__wrapper .b-header_menu li.p-active {
24902485
border-top: 0px solid black;
24912486
}
2492-
.b-cols_content .b-cols_content_left {
2493-
position: relative;
2494-
padding: 15px 0 0 0;
2495-
margin: 0;
2496-
overflow: initial;
2497-
}
24982487
}
24992488

www/theme/templates/base

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,20 @@
2626
{% include "script" ignore missing %}
2727
</head>
2828
<body class="p-main">
29-
<div class="b-scrollview">
30-
<div class="b-wrapper">
31-
<!-- HEADER > -->
32-
{{ menu.i_header() }}
33-
<!-- < HEADER -->
29+
<div class="b-wrapper">
30+
<!-- HEADER > -->
31+
{{ menu.i_header() }}
32+
<!-- < HEADER -->
3433

35-
<div class="b-content b-clearbox">
36-
{% block content %}
37-
{% endblock content %}
38-
</div>
34+
<div class="b-content b-clearbox">
35+
{% block content %}
36+
{% endblock content %}
3937
</div>
40-
41-
<!-- FOOTER > -->
42-
{{ menu.i_footer() }}
43-
<!-- < FOOTER -->
4438
</div>
39+
40+
<!-- FOOTER > -->
41+
{{ menu.i_footer() }}
42+
<!-- < FOOTER -->
4543
</body>
4644
</html>
4745

0 commit comments

Comments
 (0)