Skip to content

Commit 77a6d01

Browse files
author
Jennifer Mankoff
committed
added reveal support
1 parent 9b50c63 commit 77a6d01

File tree

141 files changed

+23729
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+23729
-2
lines changed

_config.yml

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,23 @@ description: A modern, highly customizable, responsive Jekyll template for cours
1919
author: Kevin Lin
2020
baseurl: '/just-the-class' # the subpath of your site, e.g. /blog
2121
url: 'https://kevinl.info' # the base hostname & protocol for your site, e.g. http://example.com
22-
exclude: ["Gemfile", "Gemfile.lock", "LICENSE"]
22+
exclude: [
23+
"Gemfile",
24+
"Gemfile.lock",
25+
"LICENSE",
26+
"vendor",
27+
"assets/revealjs/test",
28+
"assets/revealjs/index.html",
29+
"assets/revealjs/README.md",
30+
"assets/revealjs/bower.json",
31+
"assets/revealjs/Gruntfile.js",
32+
"assets/revealjs/CONTRIBUTING.md",
33+
"assets/revealjs/LICENSE",
34+
"assets/revealjs/package.json",
35+
"assets/revealjs/examples",
36+
"assets/revealjs/css/theme/README.md",
37+
"assets/revealjs/demo.html",
38+
]
2339

2440
# Theme settings
2541
remote_theme: just-the-docs/[email protected]
@@ -40,6 +56,10 @@ collections:
4056
modules:
4157
schedules:
4258
announcements:
59+
revealjs:
60+
search_exclude: true
61+
nav_exclude: true
62+
4363
# Default layouts for each collection type
4464
defaults:
4565
- scope:
@@ -77,3 +97,56 @@ compress_html:
7797
liquid:
7898
error_mode: strict
7999
strict_filters: true
100+
101+
markdown_slide_separator: ---
102+
permalink: "/:title"
103+
slideNumber:
104+
# Slide number formatting can be configured using these variables:
105+
# "h.v": horizontal . vertical slide number (default)
106+
# "h/v": horizontal / vertical slide number
107+
# "c": flattened slide number
108+
# "c/t": flattened slide number / total slides
109+
# "none": dont't show slide numbers
110+
format: "c/t"
111+
reveal_path: "assets/revealjs/"
112+
113+
## most values are unchanged from their defaults. The variables
114+
## that are unchanged are commented out and their default value is shown with _val_
115+
## for a full listing of values and defaults see https://revealjs.com/config/
116+
reveal:
117+
theme: "white" # black/beige/blood/league/moon/night/serif/simple/sky/solarized/white
118+
## The "normal" size of the presentation, aspect ratio will be preserved
119+
## when the presentation is scaled to fit different resolutions. Can be
120+
## specified using percentage units.
121+
width: 1200
122+
height: 960
123+
## Factor of the display size that should remain empty around the content
124+
margin: 0.1
125+
## Bounds for smallest/largest possible scale to apply to content
126+
minScale: 0.2
127+
maxScale: 1.5
128+
## Add the current slide number to the URL hash so that reloading the
129+
## page/copying the URL will return you to the same slide (true | _false_)
130+
hash: true ## must be true or fragments break
131+
## Push each slide change to the browser history. Implies `hash: true` (true | _false_)
132+
## history: false
133+
134+
135+
## Display presentation control arrows
136+
## Show controls? (_true_ | false) default values for all settings shown as _val_
137+
## controls: true
138+
139+
## Help the user learn the controls by providing hints, for example by
140+
## bouncing the down arrow when they first encounter a vertical slide (true | _false_)
141+
## controlsTutorial: false
142+
143+
## Disables the default revealjs slide layout (scaling and centering)
144+
## so that you can use custom CSS layout (true | _false_)
145+
## disableLayout: false
146+
147+
## The maximum number of pages a single slide can expand onto when printing
148+
## to PDF, unlimited by default (Number.POSITIVE_INFINITY)
149+
## pdfMaxPagesPerSlide: 100
150+
151+
152+

_includes/slide_head.html

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<meta charset="utf-8">
2+
3+
<title>
4+
{% if page.title %}
5+
{{ page.title }} | {{ site.title }}
6+
{% else %}
7+
{{ site.title }}
8+
{% endif %}
9+
</title>
10+
11+
<meta name="author" content="{{ page.author }}">
12+
13+
<!-- Description -->
14+
{% if page.description %}
15+
<meta name="description" content="{{ page.description }}" />
16+
{% else %}
17+
<meta name="description" content="{{ site.description }}">
18+
{% endif %}
19+
20+
<meta name="mobile-web-app-capable" content="yes">
21+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
22+
23+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
24+
<link rel="shortcut icon" href="{{ site.baseurl }}/assets/images/favicon.ico">
25+
26+
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/reveal.css">
27+
<link rel="stylesheet" href="{{ site.baseurl }}/assets/revealjs/dist/reset.css">
28+
<link rel="stylesheet" href="{{ site.baseurl }}/assets/revealjs/dist/reveal.css">
29+
<link rel="stylesheet" href="{{ site.baseurl }}/assets/revealjs/dist/theme/{{site.reveal.theme}}.css" id="theme">
30+
<link rel="stylesheet" href="{{ site.baseurl }}/assets/revealjs/plugin/highlight/monokai.css">
31+
32+
<!-- jQuery -->
33+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
34+
35+
<!-- If the query includes 'print-pdf', include the PDF print sheet -->
36+
<script>
37+
if( window.location.search.match( /print-pdf/gi ) ) {
38+
var link = document.createElement( 'link' );
39+
link.rel = 'stylesheet';
40+
link.type = 'text/css';
41+
link.href = '{{ site.baseurl }}/assets/revealjs/css/print/pdf.css';
42+
document.getElementsByTagName( 'head' )[0].appendChild( link );
43+
}
44+
</script>

_includes/slide_md.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{% assign post = include.post %}
2+
{% assign page_name = post.name | split:'.' | first %}
3+
{% assign slides = post.load_dir %}
4+
{% capture asset_folder %}slides/{{ page_name }}{% endcapture %}
5+
{% assign file_ending = post.path | split:'.' | last %}
6+
{% if file_ending == "html" %}
7+
{{ post.content }}
8+
{% else %}
9+
{% capture my_include %}{% include_relative {{ post.path }} %}{% endcapture %}
10+
{% assign slide_contents = my_include | split: site.markdown_slide_separator %}
11+
{% assign file = post.path | split:'/' | last %}
12+
{% assign filename = file | split:'.' | first %}
13+
{% assign filename_no_data = filename | replace: '0000-1-1-', '' %}
14+
{% for slide_content in slide_contents %}
15+
{% if forloop.index == 1 %}
16+
<section id="{{ filename_no_data }}" data-markdown>
17+
{% else %}
18+
<section data-markdown>
19+
{% endif %}
20+
<textarea data-template>
21+
{{ slide_content }}
22+
</textarea>
23+
</section>
24+
{% endfor %}
25+
{% endif %}

_includes/slide_script.html

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<script src="{{ site.baseurl }}/assets/revealjs/dist/reveal.js"></script>
2+
<script src="{{ site.baseurl }}/assets/revealjs/plugin/zoom/zoom.js"></script>
3+
<script src="{{ site.baseurl }}/assets/revealjs/plugin/notes/notes.js"></script>
4+
<script src="{{ site.baseurl }}/assets/revealjs/plugin/search/search.js"></script>
5+
<script src="{{ site.baseurl }}/assets/revealjs/plugin/markdown/markdown.js"></script>
6+
<script src="{{ site.baseurl }}/assets/revealjs/plugin/highlight/highlight.js"></script>
7+
<script src="{{ site.baseurl }}/assets/revealjs/plugin/math/math.js"></script>
8+
9+
10+
<!-- revealjs init -->
11+
<script>
12+
// Full list of configuration options available here:
13+
// https://revealjs.com/config/
14+
Reveal.initialize({...{{site.reveal | jsonify}}, ...{{page.reveal | jsonify}},
15+
...{plugins: [RevealZoom, RevealNotes, RevealSearch, RevealMarkdown, RevealHighlight, RevealMath]}});
16+
//Reveal.initialize({{site.reveal | jsonify}});
17+
Reveal.configure({
18+
math: {
19+
// mathjax: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js',
20+
config: 'TeX-AMS_HTML-full',
21+
TeX: {
22+
Macros: {
23+
R: '\\mathbb{R}',
24+
set: [ '\\left\\{#1 \\; ; \\; #2\\right\\}', 2 ]
25+
}
26+
},
27+
},
28+
});
29+
30+
{% if site.slideNumber.format and site.slideNumber.format != "none" %}
31+
// Shows the slide number using default formatting
32+
Reveal.configure({ slideNumber: true });
33+
Reveal.configure({ slideNumber: '{{ site.slideNumber.format }}' });
34+
{% endif %}
35+
</script>
36+
<!-- End revealjs init -->

_layouts/print.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
{% include head.html %}
5+
</head>
6+
<body>
7+
<div class="reveal">
8+
{{ content }}
9+
</div>
10+
</body>
11+
</html>

_layouts/reveal.html

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
{% include slide_head.html %}
5+
</head>
6+
<body>
7+
<div class="reveal">
8+
<div class='footer' style="position: absolute; bottom: 1em; left: 1em; font-size: 0.5em;">
9+
</div>
10+
<div class="slides" aria-live="assertive">
11+
{% unless page.content == blank %}
12+
<!-- Display page content if it's not blank -->
13+
<section id={{page.title}} data-markdown>
14+
<textarea data-template>
15+
{{ page.content }}
16+
</textarea>
17+
</section>
18+
{% endunless %}
19+
{% if page.load_dir %}
20+
{% assign slide_dir = page.load_dir %}
21+
{% else %}
22+
{% assign slide_dir = page.name %}
23+
{% endif %}
24+
25+
{% for slide_page in site.pages %}
26+
{% assign slide_page_path = slide_page.url | split:'/' %}
27+
{% if slide_page_path[1] == "slides" and slide_page_path[2] == slide_dir %}
28+
{% if slide_page_path.size == 4 %}
29+
<section id={{slide_page_path[3]}} data-markdown>
30+
<textarea data-template>
31+
{{slide_page.content}}
32+
</textarea>
33+
</section>
34+
35+
{% endif %}
36+
{% endif %}
37+
{% endfor %}
38+
</div>
39+
</div>
40+
{% include slide_script.html %}
41+
</body>
42+
</html>
43+

_layouts/slide.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<style>
2+
.responsive-wrap iframe{ max-width: 100%;}
3+
</style>
4+
<div class="responsive-wrap">
5+
<!-- this is the embed code provided by Google -->
6+
{{content}}
7+
<!-- Google embed ends -->
8+
</div>

_modules/week-01.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@ Oct 1
2020
Oct 2
2121
: [Tracing, IntLists, & Recursion](#)
2222
: [2.1](#)
23+
: Sample Google Slides
24+
: [Slides](slides/2_example_google.html)
2325
: **HW 1 due**{: .label .label-red }

_modules/week-02.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ title: Basic Data Structures
55
Oct 5
66
: [Linked Lists & Encapsulation](#)
77
: [3.1](#), [2.2](#), [2.3](#)
8-
8+
: Sample Reveal Slides
9+
: [Slides](slides/1_example_reveal.html)
10+
911
Oct 6
1012
: **Section**{: .label .label-purple }[Linked Lists](#)
1113
: [Solution](#)

assets/css/mermaid.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
div.diagram-display {
2+
position: relative;
3+
}
4+
div.diagram-display svg {
5+
position: absolute;
6+
left: 0;
7+
top: 0;
8+
max-width: 100% !important;
9+
width: 100%;
10+
height: 100%;
11+
}
12+
span.edgeLabel, .edgeLabel rect {
13+
background: none !important;
14+
backdrop-filter: blur(10px);
15+
fill: none !important;
16+
}

0 commit comments

Comments
 (0)