|
| 1 | +{# |
| 2 | + basic/layout.html |
| 3 | + ~~~~~~~~~~~~~~~~~ |
| 4 | + |
| 5 | + Master layout template for Sphinx themes. |
| 6 | + |
| 7 | + :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. |
| 8 | + :license: BSD, see LICENSE for details. |
| 9 | +#} |
| 10 | +{%- block doctype -%} |
| 11 | +<!DOCTYPE html> |
| 12 | +{%- endblock %} |
| 13 | +{%- set reldelim1 = reldelim1 is not defined and ' »' or reldelim1 %} |
| 14 | +{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %} |
| 15 | +{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and |
| 16 | + (sidebars != []) %} |
| 17 | +{%- set url_root = pathto('', 1) %} |
| 18 | +{# XXX necessary? #} |
| 19 | +{%- if url_root == '#' %}{% set url_root = '' %}{% endif %} |
| 20 | +{%- if not embedded and docstitle %} |
| 21 | + {%- set titlesuffix = " — "|safe + docstitle|e %} |
| 22 | +{%- else %} |
| 23 | + {%- set titlesuffix = "" %} |
| 24 | +{%- endif %} |
| 25 | + |
| 26 | +{%- macro relbar() %} |
| 27 | +{%- endmacro %} |
| 28 | + |
| 29 | +{%- macro sidebar() %} |
| 30 | +{%- endmacro %} |
| 31 | + |
| 32 | +{%- macro script() %} |
| 33 | + <script type="text/javascript"> |
| 34 | + var DOCUMENTATION_OPTIONS = { |
| 35 | + URL_ROOT: '{{ url_root }}', |
| 36 | + VERSION: '{{ release|e }}', |
| 37 | + COLLAPSE_INDEX: false, |
| 38 | + FILE_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}', |
| 39 | + HAS_SOURCE: {{ has_source|lower }} |
| 40 | + }; |
| 41 | + </script> |
| 42 | + {%- for scriptfile in script_files %} |
| 43 | + <script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script> |
| 44 | + {%- endfor %} |
| 45 | + {% if theme_custom_js %} |
| 46 | + <script type="text/javascript" src="{{ pathto('_static/' + theme_custom_js, 1) }}"></script> |
| 47 | + {% endif %} |
| 48 | + |
| 49 | +{%- endmacro %} |
| 50 | + |
| 51 | +{%- macro css() %} |
| 52 | + <link rel="stylesheet" href="{{ pathto('_static/basic.css', 1) }}" type="text/css" /> |
| 53 | + <link rel="stylesheet" href="{{ pathto('_static/styles.css', 1) }}" type="text/css" /> |
| 54 | + <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" /> |
| 55 | + {% if theme_custom_css %} |
| 56 | + <link rel="stylesheet" href="{{ pathto('_static/' + theme_custom_css, 1) }}" type="text/css" /> |
| 57 | + {% endif %} |
| 58 | + |
| 59 | + <link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" /> |
| 60 | + {%- for cssfile in css_files %} |
| 61 | + <link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" /> |
| 62 | + {%- endfor %} |
| 63 | +{%- endmacro %} |
| 64 | + |
| 65 | +<html> |
| 66 | + <head> |
| 67 | + <meta http-equiv="Content-Type" content="text/html; charset={{ encoding }}" /> |
| 68 | + {{ metatags }} |
| 69 | + {%- block htmltitle %} |
| 70 | + <title>{{ title|striptags|e }}{{ titlesuffix }}</title> |
| 71 | + {%- endblock %} |
| 72 | + {{ css() }} |
| 73 | + <script type="text/javascript" src="_static/jquery.js" /> |
| 74 | + <script type="text/javascript" src="_static/parsons.js" /> |
| 75 | + <script type="text/javascript" src="_static/parsons-noconflict.js" /> |
| 76 | + {%- if not embedded %} |
| 77 | + {%- if use_opensearch %} |
| 78 | + <link rel="search" type="application/opensearchdescription+xml" |
| 79 | + title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}" |
| 80 | + href="{{ pathto('_static/opensearch.xml', 1) }}"/> |
| 81 | + {%- endif %} |
| 82 | + {%- if favicon %} |
| 83 | + <link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/> |
| 84 | + {%- endif %} |
| 85 | + {%- endif %} |
| 86 | +{%- block linktags %} |
| 87 | + {%- if hasdoc('about') %} |
| 88 | + <link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" /> |
| 89 | + {%- endif %} |
| 90 | + {%- if hasdoc('genindex') %} |
| 91 | + <link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" /> |
| 92 | + {%- endif %} |
| 93 | + {%- if hasdoc('search') %} |
| 94 | + <link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" /> |
| 95 | + {%- endif %} |
| 96 | + {%- if hasdoc('copyright') %} |
| 97 | + <link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" /> |
| 98 | + {%- endif %} |
| 99 | + <link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}" /> |
| 100 | + {%- if parents %} |
| 101 | + <link rel="up" title="{{ parents[-1].title|striptags|e }}" href="{{ parents[-1].link|e }}" /> |
| 102 | + {%- endif %} |
| 103 | + {%- if next %} |
| 104 | + <link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" /> |
| 105 | + {%- endif %} |
| 106 | + {%- if prev %} |
| 107 | + <link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" /> |
| 108 | + {%- endif %} |
| 109 | +{%- endblock %} |
| 110 | +{%- block extrahead %} {% endblock %} |
| 111 | + </head> |
| 112 | + <body> |
| 113 | +{%- block header %}{% endblock %} |
| 114 | + |
| 115 | +<script type="text/javascript"> |
| 116 | + eBookConfig = {}; |
| 117 | + eBookConfig.host = '{{course_url}}' ? '{{course_url}}' : 'http://interactivepython.org'; |
| 118 | + eBookConfig.app = eBookConfig.host+'/{{appname}}'; |
| 119 | + eBookConfig.ajaxURL = eBookConfig.app+'/ajax/'; |
| 120 | + eBookConfig.course = '{{course_id}}'; |
| 121 | + eBookConfig.logLevel = {{loglevel}}; |
| 122 | + eBookConfig.loginRequired = {{login_required}} |
| 123 | + eBookConfig.build_info = "{{build_info}}"; |
| 124 | + eBookConfig.isLoggedIn = false; |
| 125 | +</script> |
| 126 | + |
| 127 | +<section |
| 128 | + id="slide_container" |
| 129 | + class='slides {% block slide_container_class %}layout-regular{% endblock %}'> |
| 130 | + |
| 131 | +{% block body %} {% endblock %} |
| 132 | +</section> |
| 133 | +{% block presenter_notes %}{% endblock %} |
| 134 | + {%- if not embedded %} |
| 135 | + {{ script() }} |
| 136 | + {%- endif %} |
| 137 | + |
| 138 | + <script type="text/javascript" charset="utf-8"> |
| 139 | + $(document).ready(createEditors); |
| 140 | + $(document).ready(styleUnittestResults()); |
| 141 | + </script> |
| 142 | + |
| 143 | + <script type="text/javascript"> |
| 144 | + // add the video play button overlay image |
| 145 | + $(".video-play-overlay").each(function() { |
| 146 | + $(this).css('background-image', "url(\'_static/play_overlay_icon.png\')") |
| 147 | + }); |
| 148 | + |
| 149 | + // This function is needed to allow the dropdown search bar to work; |
| 150 | + // The default behaviour is that the dropdown menu closes when something in |
| 151 | + // it (like the search bar) is clicked |
| 152 | + $(function() { |
| 153 | + // Fix input element click problem |
| 154 | + $('.dropdown input, .dropdown label').click(function(e) { |
| 155 | + e.stopPropagation(); |
| 156 | + }); |
| 157 | + }); |
| 158 | + |
| 159 | + // style codelens buttons (doing it here because PyTutor is a submodule owned by someone else |
| 160 | + $(function() { |
| 161 | + $(".ExecutionVisualizer").each(function() { |
| 162 | + $(this).find("#jmpFirstInstr").addClass('btn btn-default'); |
| 163 | + $(this).find("#jmpStepBack").addClass('btn btn-danger'); |
| 164 | + $(this).find("#jmpStepFwd").addClass('btn btn-success'); |
| 165 | + $(this).find("#jmpLastInstr").addClass('btn btn-default'); |
| 166 | + }); |
| 167 | + }); |
| 168 | + |
| 169 | + </script> |
| 170 | + </body> |
| 171 | +</html> |
0 commit comments