|
| 1 | +{% extends "basic/layout.html" %} |
| 2 | + |
| 3 | +{% set script_files = script_files + [ |
| 4 | + '_static/jquery-ui-1.10.3.custom.min.js', |
| 5 | + '_static/jquery-fix.js', |
| 6 | + '_static/bootstrap-3.0.0/js/bootstrap.min.js', |
| 7 | + '_static/bootstrap-sphinx.js', |
| 8 | + '_static/waypoints.min.js', |
| 9 | + '_static/rangy-core.js', |
| 10 | + '_static/rangy-textrange.js', |
| 11 | + '_static/rangy-cssclassapplier.js', |
| 12 | + '_static/user-highlights.js', |
| 13 | + '_static/jquery.idle-timer.js', |
| 14 | + '_static/processing-1.4.1.min.js', |
| 15 | + '_static/jquery.hotkey.js' |
| 16 | + ] |
| 17 | +%} |
| 18 | + |
| 19 | +{% set css_files = ['_static/bootstrap-3.0.0/css/bootstrap.min.css'] + css_files %} |
| 20 | +{% if theme_bootswatch_theme %} |
| 21 | + {% set css_files = css_files + |
| 22 | + ['http://netdna.bootstrapcdn.com/bootswatch/2.3.1/' + theme_bootswatch_theme + '/bootstrap.min.css'] |
| 23 | + %} |
| 24 | +{% endif %} |
| 25 | + |
| 26 | +{% set css_files = css_files + [ |
| 27 | + '_static/jquery-ui-1.10.3.custom.min.css', |
| 28 | + '_static/bootstrap-sphinx.css', |
| 29 | + '_static/user-highlights.css', |
| 30 | + '_static/runestone-custom-sphinx-bootstrap.css', |
| 31 | + ] |
| 32 | +%} |
| 33 | + |
| 34 | +{%- block doctype -%} |
| 35 | +<!DOCTYPE html> |
| 36 | +{%- endblock %} |
| 37 | + |
| 38 | +{# Sidebar: Rework into our Boostrap nav section. #} |
| 39 | +{% macro navBar() %} |
| 40 | + |
| 41 | +<!-- Begin navbar --> |
| 42 | +<div id="navbar" class="navbar navbar-default navbar-fixed-top" role="navigation"> |
| 43 | + |
| 44 | + <div class="container"> |
| 45 | + |
| 46 | + <div class="navbar-header"> |
| 47 | + <!-- .btn-navbar is used as the toggle for collapsed navbar content --> |
| 48 | + <button type='button' class='navbar-toggle' data-toggle="collapse" data-target=".navbar-ex1-collapse"> |
| 49 | + <span class="icon-bar"></span> |
| 50 | + <span class="icon-bar"></span> |
| 51 | + <span class="icon-bar"></span> |
| 52 | + </button> |
| 53 | + |
| 54 | + <div> |
| 55 | + <a class="brand-logo" style='background: transparent url("{{pathto('_static/img/logo_small.png', 1)}}") no-repeat 0px 0px;' href="/{{appname}}/default/user/login"> </a> |
| 56 | + <a class="navbar-brand" href="{{ pathto(master_doc) }}">{% if theme_navbar_title -%}{{ theme_navbar_title|e }}{%- else -%}{{ project|e }}{%- endif -%}</a> |
| 57 | + </div> |
| 58 | + </div> |
| 59 | + |
| 60 | + <div class="navbar-collapse collapse navbar-ex1-collapse"> |
| 61 | + |
| 62 | + <ul class="nav navbar-nav navbar-right"> |
| 63 | + |
| 64 | + <li class="divider-vertical"></li> |
| 65 | + |
| 66 | + <!-- social media dropdown --> |
| 67 | + <li class="dropdown"> |
| 68 | + <a class="dropdown-toggle" href="#" data-toggle="dropdown"> |
| 69 | + <i class="glyphicon glyphicon-share-alt" style="opacity: 0.9"></i> |
| 70 | + </a> |
| 71 | + <ul class="dropdown-menu social-menu"> |
| 72 | + <li> |
| 73 | + <div> |
| 74 | + <b>Runestone in social media:</b> |
| 75 | + </div> |
| 76 | + <a href="https://twitter.com/iRunestone" class="twitter-follow-button" data-show-count="true">Follow @iRunestone</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script> |
| 77 | + <div class="fb-like" data-href="https://www.facebook.com/RunestoneInteractive" data-send="false" data-layout="button_count" data-width="300" data-show-faces="false" data-font="arial"></div> |
| 78 | + </li> |
| 79 | + |
| 80 | + <li class="divider"></li> |
| 81 | + <li> |
| 82 | + <div> |
| 83 | + <b>Help support us:</b> |
| 84 | + </div> |
| 85 | + <div class="gittip"> |
| 86 | + <iframe style="border:0;" |
| 87 | + src="https://www.gittip.com/bnmnetp/widget.html" |
| 88 | + width="48pt" height="22pt" class="gittip-button"> |
| 89 | + </iframe> |
| 90 | + </div> |
| 91 | + </li> |
| 92 | + </ul> |
| 93 | + </li> |
| 94 | + <!-- end social media dropdown --> |
| 95 | + |
| 96 | + <li class="divider-vertical"></li> |
| 97 | + |
| 98 | + <!-- search dropdown --> |
| 99 | + <li class="dropdown"> |
| 100 | + <a class="dropdown-toggle" href="#" data-toggle="dropdown"> |
| 101 | + <i class="glyphicon glyphicon-search" style='opacity:0.9;'></i> |
| 102 | + </a> |
| 103 | + <ul class='dropdown-menu'> |
| 104 | + {% if 'overview' in course_id: %} |
| 105 | + <li><a href='/{{appname}}/static/{{course_id}}/overview.html'>Table of Contents</a></li> |
| 106 | + {% else: %} |
| 107 | + <li><a href='{{ pathto(master_doc) }}'>Table of Contents</a></li> |
| 108 | + {% endif %} |
| 109 | + <li><a href='/{{appname}}/static/{{course_id}}/genindex.html'>Book Index</a></li> |
| 110 | + <li class="divider"></li> |
| 111 | + <li id="scratch_ac_link"><a href="javascript:toggleScratchActivecode()">Scratch ActiveCode</a></li> |
| 112 | + <li class="divider"></li> |
| 113 | + <li style="width: 240px;"> |
| 114 | + <form class="navbar-search" style="margin:10px;" action="{{ pathto('search') }}" method="get"> |
| 115 | + <div class="input-group"> |
| 116 | + <input type="text" class="form-control" name="q" placeholder="Search this book" /> |
| 117 | + <span class="input-group-btn"> |
| 118 | + <button class="btn btn-primary" style="margin:0;" type="submit"> |
| 119 | + <i class="glyphicon glyphicon-search"></i> |
| 120 | + </button> |
| 121 | + </span> |
| 122 | + </div><!-- /input-group --> |
| 123 | + <input type="hidden" name="check_keywords" value="yes" /> |
| 124 | + <input type="hidden" name="area" value="default" /> |
| 125 | + </form> |
| 126 | + </li> |
| 127 | + </ul> |
| 128 | + </li> |
| 129 | + <!-- end search dropdown --> |
| 130 | + |
| 131 | + <li class="divider-vertical"></li> |
| 132 | + |
| 133 | + <!-- user account dropdown --> |
| 134 | + <li class="dropdown"> |
| 135 | + <a class="dropdown-toggle" href="#" data-toggle="dropdown"> |
| 136 | + <i class="glyphicon glyphicon-user" style="opacity:0.9;"></i> |
| 137 | + </a> |
| 138 | + <ul class="dropdown-menu user-menu"> |
| 139 | + <li><span class='loggedinuser'></span></li> |
| 140 | + <li class="divider"></li> |
| 141 | + <li><a href='{{course_url}}/{{appname}}/admin/index'>Instructor's Page</a></li> |
| 142 | + <li class="divider"></li> |
| 143 | + <li><a href="{{course_url}}/{{appname}}/default/user/profile" id="profilelink">Edit Profile</a></li> |
| 144 | + <li><a href="{{course_url}}/{{appname}}/default/user/change_password" id="passwordlink">Change Password</a></li> |
| 145 | + <li><a href="{{course_url}}/{{appname}}/default/user/register" id="registerlink">Register</a></li> |
| 146 | + <li class='loginout'><a href='#'>Login</a></li> <!-- correct link populated by addNavbarLoginLink() --> |
| 147 | + </ul> |
| 148 | + </li> |
| 149 | + <!-- end user account dropdown --> |
| 150 | + |
| 151 | + <li class="divider-vertical"></li> |
| 152 | + |
| 153 | + <!-- help menu dropdown --> |
| 154 | + <li class="dropdown"> |
| 155 | + <a class="dropdown-toggle" href="#" data-toggle="dropdown"> |
| 156 | + <i class="glyphicon glyphicon-question-sign" style="opacity:0.9;"></i> |
| 157 | + </a> |
| 158 | + <ul class="dropdown-menu user-menu"> |
| 159 | + <li><a href='/{{appname}}/static/{{course_id}}/navhelp.html'>Navigation Help</a></li> |
| 160 | + <li><a href='/{{appname}}/static/overview/instructor.html'>Help for Instructors</a></li> |
| 161 | + <li class="divider"></li> |
| 162 | + <li><a href='http://runestoneinteractive.org'>About Runestone</a></li> |
| 163 | + <li><a href='https://github.com/bnmnetp/runestone/issues/new'>Report A Problem</a></li> |
| 164 | + </ul> |
| 165 | + </li> |
| 166 | + <!-- end help menu dropdown --> |
| 167 | + |
| 168 | + <li class="divider-vertical"></li> |
| 169 | + |
| 170 | + </ul> |
| 171 | + |
| 172 | + <ul class="nav navbar-nav"> |
| 173 | + <li class="divider-vertical"></li> |
| 174 | + {% block sidebartoc %} |
| 175 | + {% include "localtoc.html" %} |
| 176 | + <li class="divider-vertical"></li> |
| 177 | + {% endblock %} |
| 178 | + {% block sidebarrel %} |
| 179 | + {% include "relations.html" %} |
| 180 | + {% endblock %} |
| 181 | + {% if theme_source_link_position == "nav" %} |
| 182 | + <li>{% include "sourcelink.html" %}</li> |
| 183 | + {% endif %} |
| 184 | + </ul> |
| 185 | + |
| 186 | + </div> |
| 187 | + </div> |
| 188 | +</div> |
| 189 | +{% endmacro %} |
| 190 | + |
| 191 | +{%- block extrahead %} |
| 192 | +<meta charset='utf-8'> |
| 193 | +<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'> |
| 194 | +<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' /> |
| 195 | +<script type="text/javascript"> |
| 196 | + eBookConfig = {}; |
| 197 | + eBookConfig.host = '{{course_url}}' ? '{{course_url}}' : 'http://127.0.0.1:8000'; |
| 198 | + eBookConfig.app = eBookConfig.host+'/{{appname}}'; |
| 199 | + eBookConfig.ajaxURL = eBookConfig.app+'/ajax/'; |
| 200 | + eBookConfig.course = '{{course_id}}'; |
| 201 | + eBookConfig.logLevel = {{loglevel}}; |
| 202 | + eBookConfig.loginRequired = {{login_required}} |
| 203 | + eBookConfig.build_info = "{{build_info}}"; |
| 204 | + eBookConfig.isLoggedIn = false; |
| 205 | +</script> |
| 206 | + |
| 207 | +<div id="fb-root"></div> |
| 208 | +<script> |
| 209 | + (function(d, s, id) { |
| 210 | + var js, fjs = d.getElementsByTagName(s)[0]; |
| 211 | + if (d.getElementById(id)) return; |
| 212 | + js = d.createElement(s); js.id = id; |
| 213 | + js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&status=0"; |
| 214 | + fjs.parentNode.insertBefore(js, fjs); |
| 215 | + }(document, 'script', 'facebook-jssdk')); |
| 216 | +</script> |
| 217 | + |
| 218 | +{% endblock %} |
| 219 | + |
| 220 | +{# Silence the sidebar's, relbar's #} |
| 221 | +{% block header %}{% endblock %} |
| 222 | +{% block sidebar1 %}{% endblock %} |
| 223 | +{% block sidebar2 %}{% endblock %} |
| 224 | +{% block relbar1 %}{% endblock %} |
| 225 | +{% block relbar2 %}{% endblock %} |
| 226 | +{% block sidebarsourcelink %}{% endblock %} |
| 227 | + |
| 228 | +{%- block content %} |
| 229 | +{{ navBar() }} |
| 230 | + |
| 231 | +<div class="container"> |
| 232 | + {% block body %}{% endblock %} |
| 233 | +</div> |
| 234 | +{%- endblock %} |
| 235 | + |
| 236 | +{%- block footer %} |
| 237 | +<footer class="footer"> |
| 238 | + <div class="container"> |
| 239 | + <p class="pull-right"> |
| 240 | + <span id='numuserspan'></span> readers online now | <span class='loggedinuser'></span> | <a href="#">Back to top</a> |
| 241 | + {% if theme_source_link_position == "footer" %} |
| 242 | + <br /> |
| 243 | + {% include "sourcelink.html" %} |
| 244 | + {% endif %} |
| 245 | + </p> |
| 246 | + <p> |
| 247 | + {%- if show_copyright %} |
| 248 | + {%- if hasdoc('copyright') %} |
| 249 | + {% trans path=pathto('copyright'), copyright=copyright|e %}© <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %} |
| 250 | + {%- else %} |
| 251 | + {% trans copyright=copyright|e %}© Copyright {{ copyright }}.{% endtrans %} |
| 252 | + {%- endif %} |
| 253 | + {%- endif %} |
| 254 | + {%- if last_updated %} |
| 255 | + {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}<br/> |
| 256 | + {%- endif %} |
| 257 | + {%- if show_sphinx %} |
| 258 | + {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %} |
| 259 | + {%- endif %} |
| 260 | + </p> |
| 261 | + </div> |
| 262 | +</footer> |
| 263 | + |
| 264 | +<script type="text/javascript" charset="utf-8"> |
| 265 | + $(document).ready(addUserToFooter); |
| 266 | + $(document).ready(addNavbarLoginLink); |
| 267 | + $(document).ready(createEditors); |
| 268 | + $(document).ready(getNumUsers); |
| 269 | + $(document).ready(getOnlineUsers); |
| 270 | + $(document).ready(createScratchActivecode()); |
| 271 | + $(document).ready(styleUnittestResults()); |
| 272 | +</script> |
| 273 | + |
| 274 | +<script type="text/javascript"> |
| 275 | + // add the video play button overlay image |
| 276 | + $(".video-play-overlay").each(function() { |
| 277 | + $(this).css('background-image', "url(\'{{pathto('_static/play_overlay_icon.png', 1)}}\')") |
| 278 | + }); |
| 279 | + |
| 280 | + // This function is needed to allow the dropdown search bar to work; |
| 281 | + // The default behaviour is that the dropdown menu closes when something in |
| 282 | + // it (like the search bar) is clicked |
| 283 | + $(function() { |
| 284 | + // Fix input element click problem |
| 285 | + $('.dropdown input, .dropdown label').click(function(e) { |
| 286 | + e.stopPropagation(); |
| 287 | + }); |
| 288 | + }); |
| 289 | + |
| 290 | + // style codelens buttons (doing it here because PyTutor is a submodule owned by someone else |
| 291 | + $(function() { |
| 292 | + $(".ExecutionVisualizer").each(function() { |
| 293 | + $(this).find("#jmpFirstInstr").addClass('btn btn-default'); |
| 294 | + $(this).find("#jmpStepBack").addClass('btn btn-danger'); |
| 295 | + $(this).find("#jmpStepFwd").addClass('btn btn-success'); |
| 296 | + $(this).find("#jmpLastInstr").addClass('btn btn-default'); |
| 297 | + }); |
| 298 | + }); |
| 299 | + |
| 300 | +</script> |
| 301 | + |
| 302 | +{% if appname == "runestone" %} |
| 303 | +<script type="text/javascript"> |
| 304 | + var _gaq = _gaq || []; |
| 305 | + _gaq.push(['_setAccount', 'UA-32029811-1']); |
| 306 | + _gaq.push(['_trackPageview']); |
| 307 | + |
| 308 | + (function() { |
| 309 | + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
| 310 | + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
| 311 | + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
| 312 | + })(); |
| 313 | +</script> |
| 314 | +{% endif %} |
| 315 | + |
| 316 | +{% endblock %} |
0 commit comments