1 | {# |
---|
2 | sphinxdoc/layout.html |
---|
3 | ~~~~~~~~~~~~~~~~~~~~~ |
---|
4 | |
---|
5 | Sphinx layout template for the sphinxdoc theme. |
---|
6 | |
---|
7 | :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. |
---|
8 | :license: BSD, see LICENSE for details. |
---|
9 | #} |
---|
10 | {%- extends "basic/layout.html" %} |
---|
11 | |
---|
12 | {# put the sidebar before the body #} |
---|
13 | {% block sidebar1 %}{{ sidebar() }}{% endblock %} |
---|
14 | {% block sidebar2 %}{% endblock %} |
---|
15 | |
---|
16 | {% block extrahead %} |
---|
17 | <link href='http://fonts.googleapis.com/css?family=Open+Sans:300,400,700' |
---|
18 | rel='stylesheet' type='text/css' /> |
---|
19 | {{ super() }} |
---|
20 | {%- if not embedded %} |
---|
21 | <style type="text/css"> |
---|
22 | table.right { float: right; margin-left: 20px; } |
---|
23 | table.right td { border: 1px solid #ccc; } |
---|
24 | {% if pagename == 'index' %} |
---|
25 | .related { display: none; } |
---|
26 | {% endif %} |
---|
27 | </style> |
---|
28 | <script type="text/javascript"> |
---|
29 | // intelligent scrolling of the sidebar content |
---|
30 | $(window).scroll(function() { |
---|
31 | var sb = $('.sphinxsidebarwrapper'); |
---|
32 | var win = $(window); |
---|
33 | var sbh = sb.height(); |
---|
34 | var offset = $('.sphinxsidebar').position()['top']; |
---|
35 | var wintop = win.scrollTop(); |
---|
36 | var winbot = wintop + win.innerHeight(); |
---|
37 | var curtop = sb.position()['top']; |
---|
38 | var curbot = curtop + sbh; |
---|
39 | // does sidebar fit in window? |
---|
40 | if (sbh < win.innerHeight()) { |
---|
41 | // yes: easy case -- always keep at the top |
---|
42 | sb.css('top', $u.min([$u.max([0, wintop - offset - 10]), |
---|
43 | $(document).height() - sbh - 200])); |
---|
44 | } else { |
---|
45 | // no: only scroll if top/bottom edge of sidebar is at |
---|
46 | // top/bottom edge of window |
---|
47 | if (curtop > wintop && curbot > winbot) { |
---|
48 | sb.css('top', $u.max([wintop - offset - 10, 0])); |
---|
49 | } else if (curtop < wintop && curbot < winbot) { |
---|
50 | sb.css('top', $u.min([winbot - sbh - offset - 20, |
---|
51 | $(document).height() - sbh - 200])); |
---|
52 | } |
---|
53 | } |
---|
54 | }); |
---|
55 | </script> |
---|
56 | {%- endif %} |
---|
57 | {% endblock %} |
---|
58 | |
---|
59 | {% block rootrellink %} |
---|
60 | <li><a href="{{ pathto('index') }}">Sphinx home</a> |</li> |
---|
61 | <li><a href="{{ pathto('contents') }}">Documentation</a> »</li> |
---|
62 | {% endblock %} |
---|
63 | |
---|
64 | {% block header %} |
---|
65 | <div class="pageheader"> |
---|
66 | <ul> |
---|
67 | <li><a href="{{ pathto('index') }}">Home</a></li> |
---|
68 | <li><a href="{{ pathto('install') }}">Get it</a></li> |
---|
69 | <li><a href="{{ pathto('contents') }}">Docs</a></li> |
---|
70 | <li><a href="{{ pathto('develop') }}">Extend/Develop</a></li> |
---|
71 | </ul> |
---|
72 | <div> |
---|
73 | <a href="{{ pathto('index') }}"> |
---|
74 | <img src="{{ pathto('_static/sphinxheader.png', 1) }}" alt="SPHINX" /> |
---|
75 | </a> |
---|
76 | </div> |
---|
77 | </div> |
---|
78 | {% endblock %} |
---|