-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlecture1.html
More file actions
281 lines (224 loc) · 9.94 KB
/
Copy pathlecture1.html
File metadata and controls
281 lines (224 loc) · 9.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Lecture 1</title>
<meta name="description" content="Lecture 1 - Ionic Materials.">
<!-- <link rel="stylesheet" type="text/css" href="./common/style.css"></style> - Old JCC style settings -->
<link rel="stylesheet" type="text/css" href="./common/slide_layout.css"></style>
<link rel="stylesheet" type="text/css" href="./common/image_layout.css"></style>
<link rel="stylesheet" type="text/css" href="./common/adirondack.css"></style>
<style type="text/css">
@page {
size: 1366px 768px;
margin: 0;
}
</style>
<!-- <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous"> -->
<!-- <link href="https://fonts.googleapis.com/css?family=Quattrocento+Sans:400,400i,700,700i|Quattrocento:400,700|Spectral:400,400i,700,700i&subset=latin-ext" rel="stylesheet"> -->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> -->
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.9.0/dist/katex.min.css" integrity="sha384-TEMocfGvRuD1rIAacqrknm5BQZ7W7uWitoih+jMNFXQIbNl16bO8OZmylH/Vi/Ei" crossorigin="anonymous"> -->
<!-- <script src="https://cdn.jsdelivr.net/npm/katex@0.9.0/dist/katex.min.js" integrity="sha384-jmxIlussZWB7qCuB+PgKG1uLjjxbVVIayPJwi6cG6Zb4YKq0JIw+OMnkkEC7kYCq" crossorigin="anonymous"></script> -->
<!-- <script src="https://story.xaprb.com/js/auto-render.min.js"></script> -->
<!-- <script src="https://story.xaprb.com/js/abcjs_basic_5.6.3-min.js"></script> -->
<!-- <script src="https://story.xaprb.com/js/story.js"></script> -->
</head>
<body class="ma0 bg-white section-slides page-kind-page is-page-true feature-nohighlight">
<main role="main">
<textarea id="source">
</textarea>
<script type="text/javascript" src="./common/JSmol.min.js"></script>
<script src="common/remark-latest.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS_HTML&delayStartupUntil=configured" type="text/javascript"></script>
<script>
var hljs = remark.highlighter.engine;
</script>
<!-- ******************************************************* -->
<!-- Uncomment this block to enable embedded video playback -->
<!-- -->
<!-- Container to hold slides -->
<!-- <div id="slideshow" class="slideshow"></div> -->
<!-- Container to hold video -->
<!-- <div id="presentervid" class="video"> -->
<!-- <div id="dummy" style="margin-top 56%;"></div> -->
<!-- <div id="kaltura_player" style="position:absolute;top:0;left:0;left: 0;right: 0;bottom:0;border:solid thin black;"></div> -->
<!-- </div> -->
<!-- Line to modify video source -->
<!-- <script src="https://cdnapisec.kaltura.com/p/2010292/sp/201029200/embedIframeJs/uiconf_id/32599141/partner_id/2010292"></script> -->
<!-- ******************************************************** -->
<script src="common/remark.language.js"></script>
<script>
// Necessary to make jmol play nicely with Learn (and avoid clobbering Kaltura updating)
delete Jmol._tracker
var slideshow = remark.create({
slideNumberFormat: '%current%',
countIncrementalSlides: false,
ratio: '16:9',
sourceUrl: 'lecture1.md',
container: document.getElementById('slideshow'),
});
//// Uncomment the following block to enable video embedding
//kWidget.embed({
// "targetId": "kaltura_player",
// "wid": "1_xm2mjoqi",
// "uiconf_id": "32599141",
// "flashvars": {
// 'streamerType' : 'auto',
// 'localizationCode': 'en',
// 'leadWithHTML5' : 'true',
// 'sideBarContainer.plugin' : 'true',
// 'sideBarContainer.position' : 'left',
// 'sideBarContainer.clickToClose' : 'true',
// 'chapters.plugin' : 'true',
// 'chapters.layout' : 'vertical',
// 'chapters.thumbnailRotator' : 'false',
// 'streamSelector.plugin': 'true',
// 'EmbedPlayer.SpinnerTarget' : 'videoHolder',
// 'dualScreen.plugin' : 'true',
// 'Kaltura.addCrossoriginToIframe' : 'true',
//
//
// },
// "entry_id": "1_ncumtzdx"
//});
//
//kWidget.addReadyCallback( function( playerId ){
// var kdp = document.getElementById( playerId );
// // Add a binding for when seek is completed:
// kdp.kBind('playerSeekEnd', function(){
// if( console )
// console.log( 'playerSeekEnd, playhead should have moved');
// });
//
// // Wait for "media ready" before starting playback:
// kdp.kBind('mediaReady', function(){
// kdp.sendNotification('doPlay');
// })
//});
//
//// Adds the showSlide event to the kWidget callback, so that every time the
//// slide is changed the video will seek to the slide property 'time'.
//kWidget.addReadyCallback( function(playerId){
// var kdp = document.getElementById( playerId );
// slideshow.on('showSlide', function (slide) {
// if (typeof slide.properties.time !== 'undefined' && slide.properties.continued !== "true"){
// var times = slide.properties.time.split(':');
// var seconds =0;
// var m = 1;
// while (times.length > 0){
// seconds += m * parseInt(times.pop(), 10)
// m *= 60
// }
// console.log(seconds)
// kdp.sendNotification('doSeek', seconds );
// }
// });
//});
// Setup MathJax
MathJax.Hub.Config({
tex2jax: { inlineMath: [["$","$"]],
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre']
},
TeX: {
extensions: ["mhchem.js"],
noErrors: {
multiline: true,
}
},
"HTML-CSS": {
scale: 85,
},
});
remark.macros.width = function (width) {
var url = this;
return '<img src="' + url + '" style="width: ' + width + '" />';
};
remark.macros.vote = function () {
// return vote from mentimeter
// To use in remark, do
// [:vote](link/to/voting/page)
var url = this;
return '<div style="position: relative; height: 70%; padding-left: 10%; overflow: visible;"><iframe src="' + url + '" height="100%" frameborder=0 style="min-width: 300px" width="80%" ></iframe></div>';
};
remark.macros.results = function () {
// return results from mentimeter without mouse interaction (pointer-events: none)
// To use in remark, do
// [:results](link/to/results/slide)
var url = this;
//return '<div style="position: relative; height: 80%; overflow: visible; pointer-events: none"><iframe sandbox="allow-scripts allow-same-origin allow-presentation" allowfullscreen="false" allowtransparency="true" frameborder="0" height="315" src="' + url + '" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe></div>'
//return '<div style="position: relative; height: 80%; overflow: visible"><iframe allowfullscreen="false" allowtransparency="true" frameborder="0" height="315" src="' + url + '" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe></div>'
// Just return a simple png image
return '<img src="' + url + '" alt = "Quiz Results"></img>'
};
remark.macros.jmol = function (width, height, x=1, y=1, z=1, other_commands='') {
// Generate a jmol object of a given size (in pixels)
// The CIF file to read is given as the macro argument, i.e.
// 
// Note that x,y,z are optional, default =1
// other_commands can be used to chain jmol commands together to be run on loading (semicolon separated lines)
// To use a literal [ ] characters (otherwise intercepted by remark) use \< or \>
// To use literal { } characters (for some reason broken?) use \( and \)
// Set up an object name to hold the jmol applet
var i = 1;
var jmolId = "jmolId_" + this.replace(/^.*[\\\/]/, '').replace('.cif','');
if (typeof window[jmolId] !== 'undefined') {
while (true) {
var testid = jmolId + i;
if (typeof window[testid] == 'undefined') {
jmolId = testid;
break;
}
i += 1;
}
};
// For some reason remark inserts a backslash escape before passing through jmol...
other_commands = other_commands.replaceAll('\\<', '[').replaceAll("\\>", "]").replaceAll("\\(","{").replaceAll("\\)","}").replaceAll("\\~",",");
//alert(other_commands)
// Info contains the parameters for initialising jsmol
var Info = {
color: "#FFFFFF",
height: height,
width: width,
script: "load " + this + " {" + x + " " + y + " " + z + "} packed; set displayCellParameters FALSE;" + other_commands,
use: "HTML5",
j2sPath: "common/j2s"
};
// Create the jmol object (called jmolId) and generate the HTML representation of it
// ._cover(false) is necessary to allow things to load when displayed
Jmol.setDocument(false);
var html = Jmol.getAppletHtml(jmolId, Info);
window[jmolId]._cover(false)
// Return the HTML for the jmol object wrapped in a div
return '<div id=' + jmolId + '_div>' + html + '</div>'
};
remark.macros.colortable = function (color) {
console.log(this)
var cells = this.split('|');
console.log(cells)
var newcells = cells.map(function (val, idx, array) {
return val.trim()
})
console.log(newcells)
return newcells.join("|");
}
remark.macros.grid = function () {
var content = this.replace( /&\n/g, " ");
return ".grid[".concat(content).concat("]");
}
$(".remark-slide-content.fit-h1 h1").each(function(i, e) {
var $e = $(e);
var $p = $e.closest('div.remark-slide-container');
var needsToggle = !$p.hasClass('remark-visible');
if ( needsToggle ) $p.toggleClass('remark-visible');
while (e.scrollHeight > e.clientHeight + 1 && $e.css('font-size') != '1px') {
$e.css('font-size', (parseInt($e.css('font-size')) - 1) + "px");
}
if ( needsToggle ) $p.toggleClass('remark-visible');
});
// Delay mathjax loading so that it doesn't get clobbered by JSmol (fudge it to work...)
setTimeout(() => {MathJax.Hub.Configured(); }, 2000);
</script>
</main>
</body>
</html>