|
2 | 2 |
|
3 | 3 | {%- block extrahead %}
|
4 | 4 | {{ super() }}
|
5 |
| - <link rel="stylesheet" href="{{ pathto('_static/custom.css', 1) }}" type="text/css" /> |
| 5 | + <link rel="stylesheet" href="{{ pathto('_static/custom.css', resource=True) }}" type="text/css" /> |
6 | 6 | {% if theme_touch_icon %}
|
7 |
| - <link rel="apple-touch-icon" href="{{ pathto('_static/' ~ theme_touch_icon, 1) }}" /> |
| 7 | + <link rel="apple-touch-icon" href="{{ pathto('_static/' ~ theme_touch_icon, resource=True) }}" /> |
| 8 | + {% endif %} |
| 9 | + |
| 10 | + {# Deprecated in favor of html_baseurl (pageurl). This is already set in the basic theme #} |
| 11 | + {% if theme_canonical_url and not pageurl %} |
| 12 | + <link rel="canonical" href="{{ theme_canonical_url }}{{ pagename }}.html" /> |
8 | 13 | {% endif %}
|
9 |
| - <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" /> |
10 | 14 | {% endblock %}
|
11 | 15 |
|
12 |
| -{# Disable base theme's top+bottom related navs; we have our own in sidebar #} |
| 16 | +{# top+bottom related navs; we also have our own in sidebar #} |
| 17 | +{%- macro rellink_markup() %} |
| 18 | + <nav id="rellinks"> |
| 19 | + <ul> |
| 20 | + {%- if prev %} |
| 21 | + <li> |
| 22 | + ← |
| 23 | + <a href="{{ prev.link|e }}" title="Previous document">{{ prev.title }}</a> |
| 24 | + </li> |
| 25 | + {%- endif %} |
| 26 | + {%- if next %} |
| 27 | + <li> |
| 28 | + <a href="{{ next.link|e }}" title="Next document">{{ next.title }}</a> |
| 29 | + → |
| 30 | + </li> |
| 31 | + {%- endif %} |
| 32 | + </ul> |
| 33 | + </nav> |
| 34 | +{%- endmacro %} |
| 35 | + |
| 36 | +{%- set theme_show_relbar_top = theme_show_relbar_top or theme_show_relbars %} |
| 37 | +{%- set theme_show_relbar_bottom = theme_show_relbar_bottom or theme_show_relbars %} |
| 38 | + |
| 39 | +{# removed existing top+bottom related nav, and embed in main content #} |
13 | 40 | {%- block relbar1 %}{% endblock %}
|
14 | 41 | {%- block relbar2 %}{% endblock %}
|
15 | 42 |
|
|
23 | 50 | {%- if render_sidebar %}
|
24 | 51 | <div class="bodywrapper">
|
25 | 52 | {%- endif %}
|
| 53 | + |
| 54 | + {%- block relbar_top %} |
| 55 | + {%- if theme_show_relbar_top|tobool %} |
| 56 | + <div class="related top"> |
| 57 | + |
| 58 | + {{- rellink_markup () }} |
| 59 | + </div> |
| 60 | + {%- endif %} |
| 61 | + {% endblock %} |
| 62 | + |
26 | 63 | <div class="body" role="main">
|
27 | 64 | {% block body %} {% endblock %}
|
28 | 65 | </div>
|
| 66 | + |
| 67 | + {%- block relbar_bottom %} |
| 68 | + {%- if theme_show_relbar_bottom|tobool %} |
| 69 | + <div class="related bottom"> |
| 70 | + |
| 71 | + {{- rellink_markup () }} |
| 72 | + </div> |
| 73 | + {%- endif %} |
| 74 | + {% endblock %} |
| 75 | + |
29 | 76 | {%- if render_sidebar %}
|
30 | 77 | </div>
|
31 | 78 | {%- endif %}
|
|
40 | 87 |
|
41 | 88 | {%- block footer %}
|
42 | 89 | <div class="footer">
|
43 |
| - {% if show_copyright %}©{{ copyright }}.{% endif %} |
44 |
| - {% if theme_show_powered_by|lower == 'true' %} |
| 90 | + {% if show_copyright %}©{{ copyright }}.{% endif %} |
| 91 | + {% if show_sphinx %} |
45 | 92 | {% if show_copyright %}|{% endif %}
|
46 |
| - Powered by <a href="http://sphinx-doc.org/">Sphinx {{ sphinx_version }}</a> |
47 |
| - & <a href="https://github.com/bitprophet/alabaster">Alabaster {{ alabaster_version }}</a> |
| 93 | + Powered by <a href="https://www.sphinx-doc.org/">Sphinx {{ sphinx_version }}</a> |
| 94 | + & <a href="https://alabaster.readthedocs.io">Alabaster {{ alabaster_version }}</a> |
48 | 95 | {% endif %}
|
49 | 96 | {%- if show_source and has_source and sourcename %}
|
50 |
| - {% if show_copyright or theme_show_powered_by %}|{% endif %} |
51 |
| - <a href="{{ pathto('_sources/' + sourcename, true)|e }}" |
| 97 | + {% if show_copyright or show_sphinx %}|{% endif %} |
| 98 | + <a href="{{ pathto('_sources/' + sourcename, resource=True)|e }}" |
52 | 99 | rel="nofollow">{{ _('Page source') }}</a>
|
53 | 100 | {%- endif %}
|
54 | 101 | </div>
|
55 | 102 |
|
56 | 103 | {% if theme_github_banner|lower != 'false' %}
|
57 | 104 | <a href="https://github.com/{{ theme_github_user }}/{{ theme_github_repo }}" class="github">
|
58 |
| - <img style="position: absolute; top: 0; right: 0; border: 0;" src="{{ pathto('_static/' ~ theme_github_banner, 1) if theme_github_banner|lower != 'true' else 'https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png' }}" alt="Fork me on GitHub" class="github"/> |
| 105 | + {%- if theme_github_banner|lower == 'true' %} |
| 106 | + <img src="{{ pathto('_static/github-banner.svg', resource=True) }}" alt="Fork me on GitHub" class="github"/> |
| 107 | + {%- else %} |
| 108 | + <img src="{{ pathto('_static/' ~ theme_github_banner, resource=True) }}" alt="Fork me on GitHub" class="github"/> |
| 109 | + {%- endif %} |
59 | 110 | </a>
|
60 | 111 | {% endif %}
|
61 | 112 |
|
62 | 113 | {% if theme_analytics_id %}
|
63 |
| - <script type="text/javascript"> |
| 114 | + <script> |
64 | 115 |
|
65 | 116 | var _gaq = _gaq || [];
|
66 | 117 | _gaq.push(['_setAccount', '{{ theme_analytics_id }}']);
|
|
69 | 120 | _gaq.push(['_trackPageview']);
|
70 | 121 |
|
71 | 122 | (function() {
|
72 |
| - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
73 |
| - ga.src = ('https:' == document.location.protocol ? 'https://ssl/' : 'http://www') + '.google-analytics.com/ga.js'; |
| 123 | + var ga = document.createElement('script'); ga.async = true; |
| 124 | + ga.src = ('https:' == document.location.protocol ? 'https://ssl/' : 'https://www') + '.google-analytics.com/ga.js'; |
74 | 125 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
75 | 126 | })();
|
76 | 127 |
|
|
0 commit comments