Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit d06e990

Browse files
committed
Add some support for hieroglyph to make slides.
1 parent 7b56ab7 commit d06e990

File tree

17 files changed

+1989
-1
lines changed

17 files changed

+1989
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ develop-eggs
1616
.installed.cfg
1717
__pycache__
1818
_deploy
19+
conf.py
1920

2021
# Installer logs
2122
pip-log.txt
@@ -32,4 +33,4 @@ nosetests.xml
3233
.mr.developer.cfg
3334
.project
3435
.pydevproject
35-
.idea
36+
.idea
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{% extends "layout.html" %}
2+
3+
{% block header %}
4+
<section id="controls">
5+
<a href="" id="prev">prev</a>
6+
<span id="cur_slide_num"></span> / <span id="num_slides"></span>
7+
<a href="" id="next">next</a>
8+
</section>
9+
{% endblock %}
10+
11+
{%- block slide_container_class %}table{%- endblock %}
12+
13+
{%- block presenter_notes %}<div class="presenter_notes" id="presenter_notes">notes go here</div>{% endblock %}
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
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 ' &raquo;' 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 = " &mdash; "|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>
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
var PERMANENT_URL_PREFIX = DOCUMENTATION_OPTIONS.URL_ROOT + '_static/';
2+
3+
var SLIDE_CLASSES = ['far-past', 'past', 'current', 'next', 'far-next'];
4+
var SLIDES_SELECTOR = 'section.slides > article';
5+
6+
var PM_TOUCH_SENSITIVITY = 15;
7+
var TABLE_CLASS = 'table';
8+
9+
/* ---------------------------------------------------------------------- */
10+
/* classList polyfill by Eli Grey
11+
* (http://purl.eligrey.com/github/classList.js/blob/master/classList.js) */
12+
13+
if (typeof document !== "undefined" && !("classList" in document.createElement("a"))) {
14+
15+
(function (view) {
16+
17+
var
18+
classListProp = "classList"
19+
, protoProp = "prototype"
20+
, elemCtrProto = (view.HTMLElement || view.Element)[protoProp]
21+
, objCtr = Object
22+
strTrim = String[protoProp].trim || function () {
23+
return this.replace(/^\s+|\s+$/g, "");
24+
}
25+
, arrIndexOf = Array[protoProp].indexOf || function (item) {
26+
for (var i = 0, len = this.length; i < len; i++) {
27+
if (i in this && this[i] === item) {
28+
return i;
29+
}
30+
}
31+
return -1;
32+
}
33+
// Vendors: please allow content code to instantiate DOMExceptions
34+
, DOMEx = function (type, message) {
35+
this.name = type;
36+
this.code = DOMException[type];
37+
this.message = message;
38+
}
39+
, checkTokenAndGetIndex = function (classList, token) {
40+
if (token === "") {
41+
throw new DOMEx(
42+
"SYNTAX_ERR"
43+
, "An invalid or illegal string was specified"
44+
);
45+
}
46+
if (/\s/.test(token)) {
47+
throw new DOMEx(
48+
"INVALID_CHARACTER_ERR"
49+
, "String contains an invalid character"
50+
);
51+
}
52+
return arrIndexOf.call(classList, token);
53+
}
54+
, ClassList = function (elem) {
55+
var
56+
trimmedClasses = strTrim.call(elem.className)
57+
, classes = trimmedClasses ? trimmedClasses.split(/\s+/) : []
58+
;
59+
for (var i = 0, len = classes.length; i < len; i++) {
60+
this.push(classes[i]);
61+
}
62+
this._updateClassName = function () {
63+
elem.className = this.toString();
64+
};
65+
}
66+
, classListProto = ClassList[protoProp] = []
67+
, classListGetter = function () {
68+
return new ClassList(this);
69+
}
70+
;
71+
// Most DOMException implementations don't allow calling DOMException's toString()
72+
// on non-DOMExceptions. Error's toString() is sufficient here.
73+
DOMEx[protoProp] = Error[protoProp];
74+
classListProto.item = function (i) {
75+
return this[i] || null;
76+
};
77+
classListProto.contains = function (token) {
78+
token += "";
79+
return checkTokenAndGetIndex(this, token) !== -1;
80+
};
81+
classListProto.add = function (token) {
82+
token += "";
83+
if (checkTokenAndGetIndex(this, token) === -1) {
84+
this.push(token);
85+
this._updateClassName();
86+
}
87+
};
88+
classListProto.remove = function (token) {
89+
token += "";
90+
var index = checkTokenAndGetIndex(this, token);
91+
if (index !== -1) {
92+
this.splice(index, 1);
93+
this._updateClassName();
94+
}
95+
};
96+
classListProto.toggle = function (token) {
97+
token += "";
98+
if (checkTokenAndGetIndex(this, token) === -1) {
99+
this.add(token);
100+
} else {
101+
this.remove(token);
102+
}
103+
};
104+
classListProto.toString = function () {
105+
return this.join(" ");
106+
};
107+
108+
if (objCtr.defineProperty) {
109+
var classListPropDesc = {
110+
get: classListGetter
111+
, enumerable: true
112+
, configurable: true
113+
};
114+
try {
115+
objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
116+
} catch (ex) { // IE 8 doesn't support enumerable:true
117+
if (ex.number === -0x7FF5EC54) {
118+
classListPropDesc.enumerable = false;
119+
objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
120+
}
121+
}
122+
} else if (objCtr[protoProp].__defineGetter__) {
123+
elemCtrProto.__defineGetter__(classListProp, classListGetter);
124+
}
125+
126+
}(self));
127+
128+
}
129+
/* ---------------------------------------------------------------------- */
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#controls {
2+
text-align: center;
3+
width: 100%;
4+
margin: 10px;
5+
font-size: 1.5em;
6+
font-family: sans-serif;
7+
}
8+
9+
.slides.table > article {
10+
display: inline-block;
11+
}
12+
13+
article.placeholder {
14+
background: #ddd;
15+
}
16+
17+
.slides.table > article {
18+
position: absolute;
19+
left: 50%;
20+
margin-left: -225px;
21+
}
22+
23+
.slides.table > article.past {
24+
transform: translate(-325px);
25+
-o-transform: translate(-325px);
26+
-moz-transform: translate(-325px);
27+
-webkit-transform: translate3d(-325px, 0, 0);
28+
29+
}
30+
31+
.slides.table > article.next {
32+
transform: translate(475px);
33+
-o-transform: translate(475px);
34+
-moz-transform: translate(475px);
35+
-webkit-transform: translate3d(475px, 0, 0);
36+
}
37+
38+
.slides > article.past,
39+
.slides > article.next {
40+
height: 230px;
41+
width: 300px;
42+
43+
margin-top: 60px;
44+
}
45+
46+
div.presenter_notes {
47+
position: absolute;
48+
top: 420px;
49+
left: 10%;
50+
background-color: white;
51+
color: black;
52+
padding: 1em;
53+
width: 80%;
54+
font-size: 130%;
55+
56+
border-radius: 10px;
57+
-o-border-radius: 10px;
58+
-moz-border-radius: 10px;
59+
-webkit-border-radius: 10px;
60+
}

0 commit comments

Comments
 (0)