Slides plugins
This commit is contained in:
parent
24db091867
commit
b5eb9a5ff9
19
slides/reveal.js-3.6.0/js/MathJax.js
Normal file
19
slides/reveal.js-3.6.0/js/MathJax.js
Normal file
File diff suppressed because one or more lines are too long
19
slides/reveal.js-3.7.0/js/MathJax.js
Normal file
19
slides/reveal.js-3.7.0/js/MathJax.js
Normal file
File diff suppressed because one or more lines are too long
38
slides/reveal.js-3.7.0/plugin/svginline/data-src-svg.js
Normal file
38
slides/reveal.js-3.7.0/plugin/svginline/data-src-svg.js
Normal file
|
@ -0,0 +1,38 @@
|
|||
// Courtesy of...
|
||||
// https://github.com/flying-sheep/revealjs-template/blob/master/src/data-src-svg.js
|
||||
// as per
|
||||
// https://github.com/hakimel/reveal.js/issues/1258
|
||||
|
||||
'use strict';
|
||||
|
||||
(function() {
|
||||
var svgsToLoad = document.querySelectorAll('svg[data-src]');
|
||||
|
||||
console.log(svgsToLoad)
|
||||
|
||||
var loadSVGs = Array.map(svgsToLoad, function (svg) {
|
||||
fetch(svg.getAttribute('data-src')).then(function (response) {
|
||||
return response.text();
|
||||
}).then(function (svgCode) {
|
||||
var svgDoc = new DOMParser().parseFromString(svgCode, 'image/svg+xml');
|
||||
var newSVG = svgDoc.documentElement;
|
||||
for (var i = 0; i < svg.attributes.length; i++) {
|
||||
var attr = svg.attributes[i];
|
||||
newSVG.setAttribute(attr.name, attr.value);
|
||||
}
|
||||
svg.parentNode.replaceChild(newSVG, svg);
|
||||
});
|
||||
});
|
||||
|
||||
Promise.all(loadSVGs).then(function (val) {
|
||||
var stretchSVGs = document.querySelectorAll('svg.stretch:not([preserveAspectRatio])');
|
||||
Array.call(stretchSVGs, function (svg) {
|
||||
if (!svg.hasAttribute('viewBox')) {
|
||||
var w = svg.getAttribute('width');
|
||||
var h = svg.getAttribute('height');
|
||||
svg.setAttribute('viewBox', '0 0 ' + w + ' ' + h);
|
||||
}
|
||||
svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');
|
||||
});
|
||||
});
|
||||
})()
|
1181
slides/reveal.js-3.7.0/plugin/svginline/es6-promise.auto.js
Normal file
1181
slides/reveal.js-3.7.0/plugin/svginline/es6-promise.auto.js
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue