Skip to content

Commit 69c885c

Browse files
Tiny tweak for responsiveness for smaller viewports
Fixes python#30.
1 parent b862f11 commit 69c885c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

python_docs_theme/layout.html

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737

3838
{% block extrahead %}
3939
<link rel="shortcut icon" type="image/png" href="{{ pathto('_static/' + theme_root_icon, 1) }}" />
40+
<meta name="viewport" content="width=device-width,initial-scale=0.8">
4041
{% if builder != "htmlhelp" %}
4142
{% if not embedded %}<script type="text/javascript" src="{{ pathto('_static/copybutton.js', 1) }}"></script>{% endif %}
4243
{% endif %}

python_docs_theme/static/sidebar.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ $(function() {
160160

161161
add_sidebar_button();
162162
var sidebarbutton = $('#sidebarbutton');
163-
set_position_from_cookie();
163+
if (jwindow.width > 768) {
164+
set_position_from_cookie();
165+
}
164166

165167

166168
/* intelligent scrolling */

0 commit comments

Comments
 (0)