hyla 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/Rakefile +6 -2
- data/bin/hyla +3 -2
- data/lib/hyla/commands/generate.rb +43 -41
- data/lib/hyla/configuration.rb +1 -1
- data/lib/hyla/project.rb +1 -1
- data/lib/resources/assets/revealjs-redhat/image/collapsed.png +0 -0
- data/lib/resources/assets/revealjs-redhat/image/expanded.png +0 -0
- data/lib/resources/assets/revealjs-redhat/lib/css/conference.css +663 -0
- data/lib/resources/assets/revealjs-redhat/lib/css/font-awesome-4.3.0.css +2886 -1098
- data/lib/resources/assets/revealjs-redhat/lib/css/gpe.css +746 -180
- data/lib/resources/assets/revealjs-redhat/lib/css/print/pdf.css +32 -65
- data/lib/resources/assets/revealjs-redhat/lib/css/theme-output.css +1509 -395
- data/lib/resources/assets/revealjs-redhat/lib/css/theme-v2-liberation.css +4332 -1366
- data/lib/resources/assets/revealjs-redhat/lib/css/theme-v2-overpass.css +4320 -1364
- data/lib/resources/assets/revealjs-redhat/lib/js/debug/gpe.js +8 -8
- data/lib/resources/assets/revealjs-redhat/lib/js/debug/reveal.js +129 -91
- data/lib/resources/assets/revealjs-redhat/lib/js/gpe.min.js +3 -3
- data/lib/resources/assets/revealjs-redhat/lib/js/reveal.min.js +18 -13
- data/lib/resources/assets/revealjs/css/theme/conference-redhat.css +14 -6
- data/lib/resources/assets/revealjs/css/theme/old-gpe.css +670 -181
- data/lib/resources/assets/revealjs/js/{reveal.js → debug/reveal.js} +1619 -492
- data/lib/resources/assets/revealjs/js/reveal.min.js +342 -9
- data/lib/resources/assets/revealjs/lib/css/font-awesome-4.3.0.css +2886 -1098
- data/lib/resources/assets/sass/conference.scss +589 -0
- data/lib/resources/assets/sass/new-gpe.scss +79 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_paragraph.html.slim +18 -6
- data/lib/resources/backends/slim/revealjs-redhat/block_ulist.html.slim +25 -9
- data/lib/resources/backends/slim/revealjs/document.html.slim +1 -1
- data/lib/templates/course/audio.txt +2 -2
- data/lib/templates/course/cover.txt +19 -7
- data/lib/templates/course/footer.txt +1 -3
- data/lib/templates/course/index.txt +2 -2
- data/lib/templates/course/labinstructions.txt +1 -3
- data/lib/templates/course/objectives.txt +1 -12
- data/lib/templates/course/summary.txt +1 -8
- metadata +7 -3
@@ -2,27 +2,27 @@
|
|
2
2
|
/* Module GPE
|
3
3
|
/**************************************************************/
|
4
4
|
var GPE = {
|
5
|
-
|
6
|
-
$('#
|
5
|
+
list: function () {
|
6
|
+
$('#expandlist > li')
|
7
7
|
.click(function (event) {
|
8
8
|
if (this == event.target) {
|
9
9
|
$(this).toggleClass('expanded');
|
10
|
-
$(this).
|
10
|
+
$(this).find('ul').toggle('medium');
|
11
11
|
}
|
12
12
|
return false;
|
13
13
|
})
|
14
14
|
.addClass('collapsed')
|
15
|
-
.
|
15
|
+
.find('ul').hide();
|
16
16
|
|
17
|
-
//Create the button
|
18
|
-
$('#
|
17
|
+
//Create the button functionality
|
18
|
+
$('#expandall')
|
19
19
|
.unbind('click')
|
20
20
|
.click(function () {
|
21
21
|
$('.collapsed').addClass('expanded');
|
22
22
|
$('.collapsed').children().show('medium');
|
23
23
|
})
|
24
24
|
|
25
|
-
$('#
|
25
|
+
$('#collapseall')
|
26
26
|
.unbind('click')
|
27
27
|
.click(function () {
|
28
28
|
$('.collapsed').removeClass('expanded');
|
@@ -58,7 +58,7 @@ var GPE = {
|
|
58
58
|
$(document).ready(function () {
|
59
59
|
|
60
60
|
// Check expandable and collapsable lists
|
61
|
-
GPE.
|
61
|
+
GPE.list();
|
62
62
|
|
63
63
|
// Add click event for <a href where id=popuplink and audio-file
|
64
64
|
$("a[id][audio-file]").click(function () {
|
@@ -2,6 +2,7 @@
|
|
2
2
|
* reveal.js
|
3
3
|
* http://lab.hakim.se/reveal-js
|
4
4
|
* MIT licensed
|
5
|
+
* Version 3.1.0
|
5
6
|
*
|
6
7
|
* Copyright (C) 2015 Hakim El Hattab, http://hakim.se
|
7
8
|
*/
|
@@ -30,7 +31,7 @@
|
|
30
31
|
VERTICAL_SLIDES_SELECTOR = '.slides>section.present>section',
|
31
32
|
HOME_SLIDE_SELECTOR = '.slides>section:first-of-type',
|
32
33
|
|
33
|
-
//
|
34
|
+
// Configuration defaults, can be overridden at initialization time
|
34
35
|
config = {
|
35
36
|
|
36
37
|
// The "normal" size of the presentation, aspect ratio will be preserved
|
@@ -41,10 +42,6 @@
|
|
41
42
|
// Factor of the display size that should remain empty around the content
|
42
43
|
margin: 0.1,
|
43
44
|
|
44
|
-
// Top and Left margins to reposition the slides
|
45
|
-
marginTop: '',
|
46
|
-
marginLeft: '',
|
47
|
-
|
48
45
|
// Bounds for smallest/largest possible scale to apply to content
|
49
46
|
minScale: 0.2,
|
50
47
|
maxScale: 1.5,
|
@@ -242,14 +239,18 @@
|
|
242
239
|
if( !features.transforms2d && !features.transforms3d ) {
|
243
240
|
document.body.setAttribute( 'class', 'no-transforms' );
|
244
241
|
|
245
|
-
// Since JS won't be running any further, we
|
246
|
-
//
|
247
|
-
var images = document.getElementsByTagName( 'img' )
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
242
|
+
// Since JS won't be running any further, we load all lazy
|
243
|
+
// loading elements upfront
|
244
|
+
var images = toArray( document.getElementsByTagName( 'img' ) ),
|
245
|
+
iframes = toArray( document.getElementsByTagName( 'iframe' ) );
|
246
|
+
|
247
|
+
var lazyLoadable = images.concat( iframes );
|
248
|
+
|
249
|
+
for( var i = 0, len = lazyLoadable.length; i < len; i++ ) {
|
250
|
+
var element = lazyLoadable[i];
|
251
|
+
if( element.getAttribute( 'data-src' ) ) {
|
252
|
+
element.setAttribute( 'src', element.getAttribute( 'data-src' ) );
|
253
|
+
element.removeAttribute( 'data-src' );
|
253
254
|
}
|
254
255
|
}
|
255
256
|
|
@@ -290,16 +291,16 @@
|
|
290
291
|
function checkCapabilities() {
|
291
292
|
|
292
293
|
features.transforms3d = 'WebkitPerspective' in document.body.style ||
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
294
|
+
'MozPerspective' in document.body.style ||
|
295
|
+
'msPerspective' in document.body.style ||
|
296
|
+
'OPerspective' in document.body.style ||
|
297
|
+
'perspective' in document.body.style;
|
297
298
|
|
298
299
|
features.transforms2d = 'WebkitTransform' in document.body.style ||
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
300
|
+
'MozTransform' in document.body.style ||
|
301
|
+
'msTransform' in document.body.style ||
|
302
|
+
'OTransform' in document.body.style ||
|
303
|
+
'transform' in document.body.style;
|
303
304
|
|
304
305
|
features.requestAnimationFrameMethod = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;
|
305
306
|
features.requestAnimationFrame = typeof features.requestAnimationFrameMethod === 'function';
|
@@ -735,14 +736,14 @@
|
|
735
736
|
// the same.
|
736
737
|
if( data.background || data.backgroundColor || data.backgroundImage || data.backgroundVideo || data.backgroundIframe ) {
|
737
738
|
element.setAttribute( 'data-background-hash', data.background +
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
739
|
+
data.backgroundSize +
|
740
|
+
data.backgroundImage +
|
741
|
+
data.backgroundVideo +
|
742
|
+
data.backgroundIframe +
|
743
|
+
data.backgroundColor +
|
744
|
+
data.backgroundRepeat +
|
745
|
+
data.backgroundPosition +
|
746
|
+
data.backgroundTransition );
|
746
747
|
}
|
747
748
|
|
748
749
|
// Additional and optional background properties
|
@@ -1136,7 +1137,7 @@
|
|
1136
1137
|
}
|
1137
1138
|
|
1138
1139
|
/**
|
1139
|
-
*
|
1140
|
+
* Converts various color input formats to an {r:0,g:0,b:0} object.
|
1140
1141
|
*
|
1141
1142
|
* @param {String} color The string representation of a color,
|
1142
1143
|
* the following formats are supported:
|
@@ -1533,21 +1534,15 @@
|
|
1533
1534
|
// Prefer zooming in desktop Chrome so that content remains crisp
|
1534
1535
|
if( !isMobileDevice && /chrome/i.test( navigator.userAgent ) && typeof dom.slides.style.zoom !== 'undefined' ) {
|
1535
1536
|
dom.slides.style.zoom = scale;
|
1536
|
-
dom.slides.style.marginTop = config.marginTop;
|
1537
|
-
dom.slides.style.marginLeft = config.marginLeft;
|
1538
1537
|
transformSlides( { layout: '' } );
|
1539
1538
|
}
|
1540
1539
|
// Apply scale transform as a fallback
|
1541
1540
|
else {
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1547
|
-
dom.slides.style.marginLeft = config.marginLeft;
|
1548
|
-
dom.slides.style.marginBottom = 'auto';
|
1549
|
-
dom.slides.style.marginRight = 'auto';
|
1550
|
-
transformSlides( { layout: 'translate(-50%, -50%) scale('+ scale +') translate(50%, 50%)' } );
|
1541
|
+
dom.slides.style.left = '50%';
|
1542
|
+
dom.slides.style.top = '50%';
|
1543
|
+
dom.slides.style.bottom = 'auto';
|
1544
|
+
dom.slides.style.right = 'auto';
|
1545
|
+
transformSlides( { layout: 'translate(-50%, -50%) scale('+ scale +')' } );
|
1551
1546
|
}
|
1552
1547
|
}
|
1553
1548
|
|
@@ -1635,7 +1630,7 @@
|
|
1635
1630
|
};
|
1636
1631
|
|
1637
1632
|
// Reduce available space by margin
|
1638
|
-
size.presentationWidth -= ( size.
|
1633
|
+
size.presentationWidth -= ( size.presentationWidth * config.margin );
|
1639
1634
|
size.presentationHeight -= ( size.presentationHeight * config.margin );
|
1640
1635
|
|
1641
1636
|
// Slide width may be a percentage of available width
|
@@ -2203,6 +2198,7 @@
|
|
2203
2198
|
updateSlidesVisibility();
|
2204
2199
|
|
2205
2200
|
formatEmbeddedContent();
|
2201
|
+
startEmbeddedContent( currentSlide );
|
2206
2202
|
|
2207
2203
|
if( isOverview() ) {
|
2208
2204
|
layoutOverview();
|
@@ -2485,12 +2481,10 @@
|
|
2485
2481
|
format = config.slideNumber;
|
2486
2482
|
}
|
2487
2483
|
|
2488
|
-
var totalSlides = getTotalSlides();
|
2489
|
-
|
2490
2484
|
dom.slideNumber.innerHTML = format.replace( /h/g, indexh )
|
2491
2485
|
.replace( /v/g, indexv )
|
2492
|
-
.replace( /c/g,
|
2493
|
-
.replace( /t/g,
|
2486
|
+
.replace( /c/g, getSlidePastCount() + 1 )
|
2487
|
+
.replace( /t/g, getTotalSlides() );
|
2494
2488
|
}
|
2495
2489
|
|
2496
2490
|
}
|
@@ -2731,7 +2725,7 @@
|
|
2731
2725
|
slide.style.display = 'block';
|
2732
2726
|
|
2733
2727
|
// Media elements with data-src attributes
|
2734
|
-
toArray( slide.querySelectorAll( 'img[data-src], video[data-src], audio[data-src]
|
2728
|
+
toArray( slide.querySelectorAll( 'img[data-src], video[data-src], audio[data-src]' ) ).forEach( function( element ) {
|
2735
2729
|
element.setAttribute( 'src', element.getAttribute( 'data-src' ) );
|
2736
2730
|
element.removeAttribute( 'data-src' );
|
2737
2731
|
} );
|
@@ -2878,21 +2872,22 @@
|
|
2878
2872
|
*/
|
2879
2873
|
function formatEmbeddedContent() {
|
2880
2874
|
|
2875
|
+
var _appendParamToIframeSource = function( sourceAttribute, sourceURL, param ) {
|
2876
|
+
toArray( dom.slides.querySelectorAll( 'iframe['+ sourceAttribute +'*="'+ sourceURL +'"]' ) ).forEach( function( el ) {
|
2877
|
+
var src = el.getAttribute( sourceAttribute );
|
2878
|
+
if( src && src.indexOf( param ) === -1 ) {
|
2879
|
+
el.setAttribute( sourceAttribute, src + ( !/\?/.test( src ) ? '?' : '&' ) + param );
|
2880
|
+
}
|
2881
|
+
});
|
2882
|
+
};
|
2883
|
+
|
2881
2884
|
// YouTube frames must include "?enablejsapi=1"
|
2882
|
-
|
2883
|
-
|
2884
|
-
if( !/enablejsapi\=1/gi.test( src ) ) {
|
2885
|
-
el.setAttribute( 'src', src + ( !/\?/.test( src ) ? '?' : '&' ) + 'enablejsapi=1' );
|
2886
|
-
}
|
2887
|
-
});
|
2885
|
+
_appendParamToIframeSource( 'src', 'youtube.com/embed/', 'enablejsapi=1' );
|
2886
|
+
_appendParamToIframeSource( 'data-src', 'youtube.com/embed/', 'enablejsapi=1' );
|
2888
2887
|
|
2889
2888
|
// Vimeo frames must include "?api=1"
|
2890
|
-
|
2891
|
-
|
2892
|
-
if( !/api\=1/gi.test( src ) ) {
|
2893
|
-
el.setAttribute( 'src', src + ( !/\?/.test( src ) ? '?' : '&' ) + 'api=1' );
|
2894
|
-
}
|
2895
|
-
});
|
2889
|
+
_appendParamToIframeSource( 'src', 'player.vimeo.com/', 'api=1' );
|
2890
|
+
_appendParamToIframeSource( 'data-src', 'player.vimeo.com/', 'api=1' );
|
2896
2891
|
|
2897
2892
|
}
|
2898
2893
|
|
@@ -2912,29 +2907,47 @@
|
|
2912
2907
|
|
2913
2908
|
// HTML5 media elements
|
2914
2909
|
toArray( slide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) {
|
2915
|
-
if( el.hasAttribute( 'data-autoplay' ) ) {
|
2910
|
+
if( el.hasAttribute( 'data-autoplay' ) && typeof el.play === 'function' ) {
|
2916
2911
|
el.play();
|
2917
2912
|
}
|
2918
2913
|
} );
|
2919
2914
|
|
2920
|
-
//
|
2921
|
-
toArray( slide.querySelectorAll( 'iframe' ) ).forEach( function( el ) {
|
2922
|
-
|
2923
|
-
});
|
2915
|
+
// Normal iframes
|
2916
|
+
toArray( slide.querySelectorAll( 'iframe[src]' ) ).forEach( function( el ) {
|
2917
|
+
startEmbeddedIframe( { target: el } );
|
2918
|
+
} );
|
2924
2919
|
|
2925
|
-
//
|
2926
|
-
toArray( slide.querySelectorAll( 'iframe[src
|
2927
|
-
if( el.
|
2928
|
-
el.
|
2920
|
+
// Lazy loading iframes
|
2921
|
+
toArray( slide.querySelectorAll( 'iframe[data-src]' ) ).forEach( function( el ) {
|
2922
|
+
if( el.getAttribute( 'src' ) !== el.getAttribute( 'data-src' ) ) {
|
2923
|
+
el.removeEventListener( 'load', startEmbeddedIframe ); // remove first to avoid dupes
|
2924
|
+
el.addEventListener( 'load', startEmbeddedIframe );
|
2925
|
+
el.setAttribute( 'src', el.getAttribute( 'data-src' ) );
|
2929
2926
|
}
|
2930
|
-
});
|
2927
|
+
} );
|
2928
|
+
}
|
2931
2929
|
|
2932
|
-
|
2933
|
-
|
2934
|
-
|
2935
|
-
|
2936
|
-
|
2937
|
-
|
2930
|
+
}
|
2931
|
+
|
2932
|
+
/**
|
2933
|
+
* "Starts" the content of an embedded iframe using the
|
2934
|
+
* postmessage API.
|
2935
|
+
*/
|
2936
|
+
function startEmbeddedIframe( event ) {
|
2937
|
+
|
2938
|
+
var iframe = event.target;
|
2939
|
+
|
2940
|
+
// YouTube postMessage API
|
2941
|
+
if( /youtube\.com\/embed\//.test( iframe.getAttribute( 'src' ) ) && iframe.hasAttribute( 'data-autoplay' ) ) {
|
2942
|
+
iframe.contentWindow.postMessage( '{"event":"command","func":"playVideo","args":""}', '*' );
|
2943
|
+
}
|
2944
|
+
// Vimeo postMessage API
|
2945
|
+
else if( /player\.vimeo\.com\//.test( iframe.getAttribute( 'src' ) ) && iframe.hasAttribute( 'data-autoplay' ) ) {
|
2946
|
+
iframe.contentWindow.postMessage( '{"method":"play"}', '*' );
|
2947
|
+
}
|
2948
|
+
// Generic postMessage API
|
2949
|
+
else {
|
2950
|
+
iframe.contentWindow.postMessage( 'slide:start', '*' );
|
2938
2951
|
}
|
2939
2952
|
|
2940
2953
|
}
|
@@ -2948,43 +2961,51 @@
|
|
2948
2961
|
if( slide && slide.parentNode ) {
|
2949
2962
|
// HTML5 media elements
|
2950
2963
|
toArray( slide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) {
|
2951
|
-
if( !el.hasAttribute( 'data-ignore' ) ) {
|
2964
|
+
if( !el.hasAttribute( 'data-ignore' ) && typeof el.pause === 'function' ) {
|
2952
2965
|
el.pause();
|
2953
2966
|
}
|
2954
2967
|
} );
|
2955
2968
|
|
2956
|
-
//
|
2969
|
+
// Generic postMessage API for non-lazy loaded iframes
|
2957
2970
|
toArray( slide.querySelectorAll( 'iframe' ) ).forEach( function( el ) {
|
2958
2971
|
el.contentWindow.postMessage( 'slide:stop', '*' );
|
2972
|
+
el.removeEventListener( 'load', startEmbeddedIframe );
|
2959
2973
|
});
|
2960
2974
|
|
2961
|
-
// YouTube
|
2975
|
+
// YouTube postMessage API
|
2962
2976
|
toArray( slide.querySelectorAll( 'iframe[src*="youtube.com/embed/"]' ) ).forEach( function( el ) {
|
2963
2977
|
if( !el.hasAttribute( 'data-ignore' ) && typeof el.contentWindow.postMessage === 'function' ) {
|
2964
2978
|
el.contentWindow.postMessage( '{"event":"command","func":"pauseVideo","args":""}', '*' );
|
2965
2979
|
}
|
2966
2980
|
});
|
2967
2981
|
|
2968
|
-
// Vimeo
|
2982
|
+
// Vimeo postMessage API
|
2969
2983
|
toArray( slide.querySelectorAll( 'iframe[src*="player.vimeo.com/"]' ) ).forEach( function( el ) {
|
2970
2984
|
if( !el.hasAttribute( 'data-ignore' ) && typeof el.contentWindow.postMessage === 'function' ) {
|
2971
2985
|
el.contentWindow.postMessage( '{"method":"pause"}', '*' );
|
2972
2986
|
}
|
2973
2987
|
});
|
2988
|
+
|
2989
|
+
// Lazy loading iframes
|
2990
|
+
toArray( slide.querySelectorAll( 'iframe[data-src]' ) ).forEach( function( el ) {
|
2991
|
+
// Only removing the src doesn't actually unload the frame
|
2992
|
+
// in all browsers (Firefox) so we set it to blank first
|
2993
|
+
el.setAttribute( 'src', 'about:blank' );
|
2994
|
+
el.removeAttribute( 'src' );
|
2995
|
+
} );
|
2974
2996
|
}
|
2975
2997
|
|
2976
2998
|
}
|
2977
2999
|
|
2978
3000
|
/**
|
2979
|
-
* Returns
|
2980
|
-
*
|
3001
|
+
* Returns the number of past slides. This can be used as a global
|
3002
|
+
* flattened index for slides.
|
2981
3003
|
*/
|
2982
|
-
function
|
3004
|
+
function getSlidePastCount() {
|
2983
3005
|
|
2984
3006
|
var horizontalSlides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) );
|
2985
3007
|
|
2986
|
-
// The number of past
|
2987
|
-
var totalCount = getTotalSlides();
|
3008
|
+
// The number of past slides
|
2988
3009
|
var pastCount = 0;
|
2989
3010
|
|
2990
3011
|
// Step through all slides and count the past ones
|
@@ -3016,6 +3037,20 @@
|
|
3016
3037
|
|
3017
3038
|
}
|
3018
3039
|
|
3040
|
+
return pastCount;
|
3041
|
+
|
3042
|
+
}
|
3043
|
+
|
3044
|
+
/**
|
3045
|
+
* Returns a value ranging from 0-1 that represents
|
3046
|
+
* how far into the presentation we have navigated.
|
3047
|
+
*/
|
3048
|
+
function getProgress() {
|
3049
|
+
|
3050
|
+
// The number of past and total slides
|
3051
|
+
var totalCount = getTotalSlides();
|
3052
|
+
var pastCount = getSlidePastCount();
|
3053
|
+
|
3019
3054
|
if( currentSlide ) {
|
3020
3055
|
|
3021
3056
|
var allFragments = currentSlide.querySelectorAll( '.fragment' );
|
@@ -3500,14 +3535,17 @@
|
|
3500
3535
|
|
3501
3536
|
// If there are media elements with data-autoplay,
|
3502
3537
|
// automatically set the autoSlide duration to the
|
3503
|
-
// length of that media
|
3504
|
-
|
3505
|
-
|
3506
|
-
|
3507
|
-
|
3538
|
+
// length of that media. Not applicable if the slide
|
3539
|
+
// is divided up into fragments.
|
3540
|
+
if( currentSlide.querySelectorAll( '.fragment' ).length === 0 ) {
|
3541
|
+
toArray( currentSlide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) {
|
3542
|
+
if( el.hasAttribute( 'data-autoplay' ) ) {
|
3543
|
+
if( autoSlide && el.duration * 1000 > autoSlide ) {
|
3544
|
+
autoSlide = ( el.duration * 1000 ) + 1000;
|
3545
|
+
}
|
3508
3546
|
}
|
3509
|
-
}
|
3510
|
-
}
|
3547
|
+
} );
|
3548
|
+
}
|
3511
3549
|
|
3512
3550
|
// Cue the next auto-slide if:
|
3513
3551
|
// - There is an autoSlide value
|
@@ -1,3 +1,3 @@
|
|
1
|
-
var GPE={
|
2
|
-
return false;}).addClass('collapsed').
|
3
|
-
$('#
|
1
|
+
var GPE={list:function(){$('#expandlist > li').click(function(event){if(this==event.target){$(this).toggleClass('expanded');$(this).find('ul').toggle('medium');}
|
2
|
+
return false;}).addClass('collapsed').find('ul').hide();$('#expandall').unbind('click').click(function(){$('.collapsed').addClass('expanded');$('.collapsed').children().show('medium');})
|
3
|
+
$('#collapseall').unbind('click').click(function(){$('.collapsed').removeClass('expanded');$('.collapsed').children().hide('medium');})},popuplink:function(audio_file){window.open(audio_file,'audio','resizable=yes,status=no,location=no,toolbar=no,menubar=no,fullscreen=no,scrollbars=no,dependent=no,width=400,height=200');return false},moveAudioBlock:function(){$('section').each(function(){var $this=$(this);var $audio=$this.find('.audioblock');var $audioHtml=$audio.html();if($audioHtml!=null){$this.removeData($audioHtml);$audio.prependTo($this);}});}};$(document).ready(function(){GPE.list();$("a[id][audio-file]").click(function(){GPE.popuplink($(this).attr('audio-file'))});GPE.moveAudioBlock();});
|
@@ -1,4 +1,4 @@
|
|
1
|
-
(function(root,factory){if(typeof define==='function'&&define.amd){define(function(){root.Reveal=factory();return root.Reveal;});}else if(typeof exports==='object'){module.exports=factory();}else{root.Reveal=factory();}}(this,function(){'use strict';var Reveal;var SLIDES_SELECTOR='.slides section',HORIZONTAL_SLIDES_SELECTOR='.slides>section',VERTICAL_SLIDES_SELECTOR='.slides>section.present>section',HOME_SLIDE_SELECTOR='.slides>section:first-of-type',config={width:960,height:700,margin:0.1,
|
1
|
+
(function(root,factory){if(typeof define==='function'&&define.amd){define(function(){root.Reveal=factory();return root.Reveal;});}else if(typeof exports==='object'){module.exports=factory();}else{root.Reveal=factory();}}(this,function(){'use strict';var Reveal;var SLIDES_SELECTOR='.slides section',HORIZONTAL_SLIDES_SELECTOR='.slides>section',VERTICAL_SLIDES_SELECTOR='.slides>section.present>section',HOME_SLIDE_SELECTOR='.slides>section:first-of-type',config={width:960,height:700,margin:0.1,minScale:0.2,maxScale:1.5,controls:true,progress:true,slideNumber:false,history:false,keyboard:true,keyboardCondition:null,overview:true,center:true,touch:true,loop:false,rtl:false,fragments:true,embedded:false,help:true,pause:true,autoSlide:0,autoSlideStoppable:true,mouseWheel:false,rollingLinks:false,hideAddressBar:true,previewLinks:false,postMessage:true,postMessageEvents:false,focusBodyOnPageVisibilityChange:true,transition:'slide',transitionSpeed:'default',backgroundTransition:'fade',parallaxBackgroundImage:'',parallaxBackgroundSize:'',parallaxBackgroundHorizontal:null,parallaxBackgroundVertical:null,viewDistance:3,dependencies:[]},loaded=false,overview=false,indexh,indexv,previousSlide,currentSlide,previousBackground,state=[],scale=1,slidesTransform={layout:'',overview:''},dom={},features={},isMobileDevice,lastMouseWheelStep=0,writeURLTimeout=0,eventsAreBound=false,autoSlide=0,autoSlidePlayer,autoSlideTimeout=0,autoSlideStartTime=-1,autoSlidePaused=false,touch={startX:0,startY:0,startSpan:0,startCount:0,captured:false,threshold:40},keyboardShortcuts={'N , SPACE':'Next slide','P':'Previous slide','← , H':'Navigate left','→ , L':'Navigate right','↑ , K':'Navigate up','↓ , J':'Navigate down','Home':'First slide','End':'Last slide','B , .':'Pause','F':'Fullscreen','ESC, O':'Slide overview'};function initialize(options){checkCapabilities();if(!features.transforms2d&&!features.transforms3d){document.body.setAttribute('class','no-transforms');var images=toArray(document.getElementsByTagName('img')),iframes=toArray(document.getElementsByTagName('iframe'));var lazyLoadable=images.concat(iframes);for(var i=0,len=lazyLoadable.length;i<len;i++){var element=lazyLoadable[i];if(element.getAttribute('data-src')){element.setAttribute('src',element.getAttribute('data-src'));element.removeAttribute('data-src');}}
|
2
2
|
return;}
|
3
3
|
dom.wrapper=document.querySelector('.reveal');dom.slides=document.querySelector('.reveal .slides');window.addEventListener('load',layout,false);var query=Reveal.getQueryHash();if(typeof query['dependencies']!=='undefined')delete query['dependencies'];extend(config,options);extend(config,query);hideAddressBar();load();}
|
4
4
|
function checkCapabilities(){features.transforms3d='WebkitPerspective'in document.body.style||'MozPerspective'in document.body.style||'msPerspective'in document.body.style||'OPerspective'in document.body.style||'perspective'in document.body.style;features.transforms2d='WebkitTransform'in document.body.style||'MozTransform'in document.body.style||'msTransform'in document.body.style||'OTransform'in document.body.style||'transform'in document.body.style;features.requestAnimationFrameMethod=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;features.requestAnimationFrame=typeof features.requestAnimationFrameMethod==='function';features.canvas=!!document.createElement('canvas').getContext;features.touch=!!('ontouchstart'in window);features.overviewTransitions=!/Version\/[\d\.]+.*Safari/.test(navigator.userAgent);isMobileDevice=/(iphone|ipod|ipad|android)/gi.test(navigator.userAgent);}
|
@@ -108,8 +108,8 @@ function showHelp(){if(config.help){closeOverlay();dom.overlay=document.createEl
|
|
108
108
|
html+='</table>';dom.overlay.innerHTML=['<header>','<a class="close" href="#"><span class="icon"></span></a>','</header>','<div class="viewport">','<div class="viewport-inner">'+html+'</div>','</div>'].join('');dom.overlay.querySelector('.close').addEventListener('click',function(event){closeOverlay();event.preventDefault();},false);setTimeout(function(){dom.overlay.classList.add('visible');},1);}}
|
109
109
|
function closeOverlay(){if(dom.overlay){dom.overlay.parentNode.removeChild(dom.overlay);dom.overlay=null;}}
|
110
110
|
function layout(){if(dom.wrapper&&!isPrintingPDF()){var size=getComputedSlideSize();var slidePadding=20;layoutSlideContents(config.width,config.height,slidePadding);dom.slides.style.width=size.width+'px';dom.slides.style.height=size.height+'px';scale=Math.min(size.presentationWidth/size.width,size.presentationHeight/size.height);scale=Math.max(scale,config.minScale);scale=Math.min(scale,config.maxScale);if(scale===1){dom.slides.style.zoom='';dom.slides.style.left='';dom.slides.style.top='';dom.slides.style.bottom='';dom.slides.style.right='';transformSlides({layout:''});}
|
111
|
-
else{if(!isMobileDevice&&/chrome/i.test(navigator.userAgent)&&typeof dom.slides.style.zoom!=='undefined'){dom.slides.style.zoom=scale;
|
112
|
-
else{dom.slides.style.
|
111
|
+
else{if(!isMobileDevice&&/chrome/i.test(navigator.userAgent)&&typeof dom.slides.style.zoom!=='undefined'){dom.slides.style.zoom=scale;transformSlides({layout:''});}
|
112
|
+
else{dom.slides.style.left='50%';dom.slides.style.top='50%';dom.slides.style.bottom='auto';dom.slides.style.right='auto';transformSlides({layout:'translate(-50%, -50%) scale('+scale+')'});}}
|
113
113
|
var slides=toArray(dom.wrapper.querySelectorAll(SLIDES_SELECTOR));for(var i=0,len=slides.length;i<len;i++){var slide=slides[i];if(slide.style.display==='none'){continue;}
|
114
114
|
if(config.center||slide.classList.contains('center')){if(slide.classList.contains('stack')){slide.style.top=0;}
|
115
115
|
else{slide.style.top=Math.max(((size.height-getAbsoluteHeight(slide))/2)-slidePadding,0)+'px';}}
|
@@ -117,7 +117,7 @@ else{slide.style.top='';}}
|
|
117
117
|
updateProgress();updateParallax();}}
|
118
118
|
function layoutSlideContents(width,height,padding){toArray(dom.slides.querySelectorAll('section > .stretch')).forEach(function(element){var remainingHeight=getRemainingHeight(element,height);if(/(img|video)/gi.test(element.nodeName)){var nw=element.naturalWidth||element.videoWidth,nh=element.naturalHeight||element.videoHeight;var es=Math.min(width/nw,remainingHeight/nh);element.style.width=(nw*es)+'px';element.style.height=(nh*es)+'px';}
|
119
119
|
else{element.style.width=width+'px';element.style.height=remainingHeight+'px';}});}
|
120
|
-
function getComputedSlideSize(presentationWidth,presentationHeight){var size={width:config.width,height:config.height,presentationWidth:presentationWidth||dom.wrapper.offsetWidth,presentationHeight:presentationHeight||dom.wrapper.offsetHeight};size.presentationWidth-=(size.
|
120
|
+
function getComputedSlideSize(presentationWidth,presentationHeight){var size={width:config.width,height:config.height,presentationWidth:presentationWidth||dom.wrapper.offsetWidth,presentationHeight:presentationHeight||dom.wrapper.offsetHeight};size.presentationWidth-=(size.presentationWidth*config.margin);size.presentationHeight-=(size.presentationHeight*config.margin);if(typeof size.width==='string'&&/%$/.test(size.width)){size.width=parseInt(size.width,10)/100*size.presentationWidth;}
|
121
121
|
if(typeof size.height==='string'&&/%$/.test(size.height)){size.height=parseInt(size.height,10)/100*size.presentationHeight;}
|
122
122
|
return size;}
|
123
123
|
function setPreviousVerticalIndex(stack,v){if(typeof stack==='object'&&typeof stack.setAttribute==='function'){stack.setAttribute('data-previous-indexv',v||0);}}
|
@@ -155,7 +155,7 @@ else{previousSlide=null;}
|
|
155
155
|
if(previousSlide){previousSlide.classList.remove('present');previousSlide.setAttribute('aria-hidden','true');if(dom.wrapper.querySelector(HOME_SLIDE_SELECTOR).classList.contains('present')){setTimeout(function(){var slides=toArray(dom.wrapper.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR+'.stack')),i;for(i in slides){if(slides[i]){setPreviousVerticalIndex(slides[i],0);}}},0);}}
|
156
156
|
if(slideChanged||!previousSlide){stopEmbeddedContent(previousSlide);startEmbeddedContent(currentSlide);}
|
157
157
|
dom.statusDiv.textContent=currentSlide.textContent;updateControls();updateProgress();updateBackground();updateParallax();updateSlideNumber();writeURL();cueAutoSlide();}
|
158
|
-
function sync(){removeEventListeners();addEventListeners();layout();autoSlide=config.autoSlide;cueAutoSlide();createBackgrounds();writeURL();sortAllFragments();updateControls();updateProgress();updateBackground(true);updateSlideNumber();updateSlidesVisibility();formatEmbeddedContent();if(isOverview()){layoutOverview();}}
|
158
|
+
function sync(){removeEventListeners();addEventListeners();layout();autoSlide=config.autoSlide;cueAutoSlide();createBackgrounds();writeURL();sortAllFragments();updateControls();updateProgress();updateBackground(true);updateSlideNumber();updateSlidesVisibility();formatEmbeddedContent();startEmbeddedContent(currentSlide);if(isOverview()){layoutOverview();}}
|
159
159
|
function resetVerticalSlides(){var horizontalSlides=toArray(dom.wrapper.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR));horizontalSlides.forEach(function(horizontalSlide){var verticalSlides=toArray(horizontalSlide.querySelectorAll('section'));verticalSlides.forEach(function(verticalSlide,y){if(y>0){verticalSlide.classList.remove('present');verticalSlide.classList.remove('past');verticalSlide.classList.add('future');verticalSlide.setAttribute('aria-hidden','true');}});});}
|
160
160
|
function sortAllFragments(){var horizontalSlides=toArray(dom.wrapper.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR));horizontalSlides.forEach(function(horizontalSlide){var verticalSlides=toArray(horizontalSlide.querySelectorAll('section'));verticalSlides.forEach(function(verticalSlide,y){sortFragments(verticalSlide.querySelectorAll('.fragment'));});if(verticalSlides.length===0)sortFragments(horizontalSlide.querySelectorAll('.fragment'));});}
|
161
161
|
function updateSlides(selector,index){var slides=toArray(dom.wrapper.querySelectorAll(selector)),slidesLength=slides.length;var printMode=isPrintingPDF();if(slidesLength){if(config.loop){index%=slidesLength;if(index<0){index=slidesLength+index;}}
|
@@ -175,7 +175,7 @@ if(verticalSlidesLength){var oy=getPreviousVerticalIndex(horizontalSlide);for(va
|
|
175
175
|
else{hideSlide(verticalSlide);}}}}}}
|
176
176
|
function updateProgress(){if(config.progress&&dom.progressbar){dom.progressbar.style.width=getProgress()*dom.wrapper.offsetWidth+'px';}}
|
177
177
|
function updateSlideNumber(){if(config.slideNumber&&dom.slideNumber){var format='c';if(typeof config.slideNumber==='string'){format=config.slideNumber;}
|
178
|
-
|
178
|
+
dom.slideNumber.innerHTML=format.replace(/h/g,indexh).replace(/v/g,indexv).replace(/c/g,getSlidePastCount()+1).replace(/t/g,getTotalSlides());}}
|
179
179
|
function updateControls(){var routes=availableRoutes();var fragments=availableFragments();dom.controlsLeft.concat(dom.controlsRight).concat(dom.controlsUp).concat(dom.controlsDown).concat(dom.controlsPrev).concat(dom.controlsNext).forEach(function(node){node.classList.remove('enabled');node.classList.remove('fragmented');});if(routes.left)dom.controlsLeft.forEach(function(el){el.classList.add('enabled');});if(routes.right)dom.controlsRight.forEach(function(el){el.classList.add('enabled');});if(routes.up)dom.controlsUp.forEach(function(el){el.classList.add('enabled');});if(routes.down)dom.controlsDown.forEach(function(el){el.classList.add('enabled');});if(routes.left||routes.up)dom.controlsPrev.forEach(function(el){el.classList.add('enabled');});if(routes.right||routes.down)dom.controlsNext.forEach(function(el){el.classList.add('enabled');});if(currentSlide){if(fragments.prev)dom.controlsPrev.forEach(function(el){el.classList.add('fragmented','enabled');});if(fragments.next)dom.controlsNext.forEach(function(el){el.classList.add('fragmented','enabled');});if(isVerticalSlide(currentSlide)){if(fragments.prev)dom.controlsUp.forEach(function(el){el.classList.add('fragmented','enabled');});if(fragments.next)dom.controlsDown.forEach(function(el){el.classList.add('fragmented','enabled');});}
|
180
180
|
else{if(fragments.prev)dom.controlsLeft.forEach(function(el){el.classList.add('fragmented','enabled');});if(fragments.next)dom.controlsRight.forEach(function(el){el.classList.add('fragmented','enabled');});}}}
|
181
181
|
function updateBackground(includeAll){var currentBackground=null;var horizontalPast=config.rtl?'future':'past',horizontalFuture=config.rtl?'past':'future';toArray(dom.background.childNodes).forEach(function(backgroundh,h){backgroundh.classList.remove('past');backgroundh.classList.remove('present');backgroundh.classList.remove('future');if(h<indexh){backgroundh.classList.add(horizontalPast);}
|
@@ -198,7 +198,7 @@ else{horizontalOffsetMultiplier=(backgroundWidth-slideWidth)/(horizontalSlideCou
|
|
198
198
|
horizontalOffset=horizontalOffsetMultiplier*indexh*-1;var slideHeight=dom.background.offsetHeight,verticalSlideCount=verticalSlides.length,verticalOffsetMultiplier,verticalOffset;if(typeof config.parallaxBackgroundVertical==='number'){verticalOffsetMultiplier=config.parallaxBackgroundVertical;}
|
199
199
|
else{verticalOffsetMultiplier=(backgroundHeight-slideHeight)/(verticalSlideCount-1);}
|
200
200
|
verticalOffset=verticalSlideCount>0?verticalOffsetMultiplier*indexv*1:0;dom.background.style.backgroundPosition=horizontalOffset+'px '+-verticalOffset+'px';}}
|
201
|
-
function showSlide(slide){slide.style.display='block';toArray(slide.querySelectorAll('img[data-src], video[data-src], audio[data-src]
|
201
|
+
function showSlide(slide){slide.style.display='block';toArray(slide.querySelectorAll('img[data-src], video[data-src], audio[data-src]')).forEach(function(element){element.setAttribute('src',element.getAttribute('data-src'));element.removeAttribute('data-src');});toArray(slide.querySelectorAll('video, audio')).forEach(function(media){var sources=0;toArray(media.querySelectorAll('source[data-src]')).forEach(function(source){source.setAttribute('src',source.getAttribute('data-src'));source.removeAttribute('data-src');sources+=1;});if(sources>0){media.load();}});var indices=getIndices(slide);var background=getSlideBackground(indices.h,indices.v);if(background){background.style.display='block';if(background.hasAttribute('data-loaded')===false){background.setAttribute('data-loaded','true');var backgroundImage=slide.getAttribute('data-background-image'),backgroundVideo=slide.getAttribute('data-background-video'),backgroundVideoLoop=slide.hasAttribute('data-background-video-loop'),backgroundIframe=slide.getAttribute('data-background-iframe');if(backgroundImage){background.style.backgroundImage='url('+backgroundImage+')';}
|
202
202
|
else if(backgroundVideo&&!isSpeakerNotes()){var video=document.createElement('video');if(backgroundVideoLoop){video.setAttribute('loop','');}
|
203
203
|
backgroundVideo.split(',').forEach(function(source){video.innerHTML+='<source src="'+source+'">';});background.appendChild(video);}
|
204
204
|
else if(backgroundIframe){var iframe=document.createElement('iframe');iframe.setAttribute('src',backgroundIframe);iframe.style.width='100%';iframe.style.height='100%';iframe.style.maxHeight='100%';iframe.style.maxWidth='100%';background.appendChild(iframe);}}}}
|
@@ -207,14 +207,18 @@ function availableRoutes(){var horizontalSlides=dom.wrapper.querySelectorAll(HOR
|
|
207
207
|
return routes;}
|
208
208
|
function availableFragments(){if(currentSlide&&config.fragments){var fragments=currentSlide.querySelectorAll('.fragment');var hiddenFragments=currentSlide.querySelectorAll('.fragment:not(.visible)');return{prev:fragments.length-hiddenFragments.length>0,next:!!hiddenFragments.length};}
|
209
209
|
else{return{prev:false,next:false};}}
|
210
|
-
function formatEmbeddedContent(){toArray(dom.slides.querySelectorAll('iframe[
|
211
|
-
function startEmbeddedContent(slide){if(slide&&!isSpeakerNotes()){toArray(slide.querySelectorAll('img[src$=".gif"]')).forEach(function(el){el.setAttribute('src',el.getAttribute('src'));});toArray(slide.querySelectorAll('video, audio')).forEach(function(el){if(el.hasAttribute('data-autoplay')){el.play();}});toArray(slide.querySelectorAll('iframe')).forEach(function(el){
|
212
|
-
function
|
213
|
-
|
210
|
+
function formatEmbeddedContent(){var _appendParamToIframeSource=function(sourceAttribute,sourceURL,param){toArray(dom.slides.querySelectorAll('iframe['+sourceAttribute+'*="'+sourceURL+'"]')).forEach(function(el){var src=el.getAttribute(sourceAttribute);if(src&&src.indexOf(param)===-1){el.setAttribute(sourceAttribute,src+(!/\?/.test(src)?'?':'&')+param);}});};_appendParamToIframeSource('src','youtube.com/embed/','enablejsapi=1');_appendParamToIframeSource('data-src','youtube.com/embed/','enablejsapi=1');_appendParamToIframeSource('src','player.vimeo.com/','api=1');_appendParamToIframeSource('data-src','player.vimeo.com/','api=1');}
|
211
|
+
function startEmbeddedContent(slide){if(slide&&!isSpeakerNotes()){toArray(slide.querySelectorAll('img[src$=".gif"]')).forEach(function(el){el.setAttribute('src',el.getAttribute('src'));});toArray(slide.querySelectorAll('video, audio')).forEach(function(el){if(el.hasAttribute('data-autoplay')&&typeof el.play==='function'){el.play();}});toArray(slide.querySelectorAll('iframe[src]')).forEach(function(el){startEmbeddedIframe({target:el});});toArray(slide.querySelectorAll('iframe[data-src]')).forEach(function(el){if(el.getAttribute('src')!==el.getAttribute('data-src')){el.removeEventListener('load',startEmbeddedIframe);el.addEventListener('load',startEmbeddedIframe);el.setAttribute('src',el.getAttribute('data-src'));}});}}
|
212
|
+
function startEmbeddedIframe(event){var iframe=event.target;if(/youtube\.com\/embed\//.test(iframe.getAttribute('src'))&&iframe.hasAttribute('data-autoplay')){iframe.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}','*');}
|
213
|
+
else if(/player\.vimeo\.com\//.test(iframe.getAttribute('src'))&&iframe.hasAttribute('data-autoplay')){iframe.contentWindow.postMessage('{"method":"play"}','*');}
|
214
|
+
else{iframe.contentWindow.postMessage('slide:start','*');}}
|
215
|
+
function stopEmbeddedContent(slide){if(slide&&slide.parentNode){toArray(slide.querySelectorAll('video, audio')).forEach(function(el){if(!el.hasAttribute('data-ignore')&&typeof el.pause==='function'){el.pause();}});toArray(slide.querySelectorAll('iframe')).forEach(function(el){el.contentWindow.postMessage('slide:stop','*');el.removeEventListener('load',startEmbeddedIframe);});toArray(slide.querySelectorAll('iframe[src*="youtube.com/embed/"]')).forEach(function(el){if(!el.hasAttribute('data-ignore')&&typeof el.contentWindow.postMessage==='function'){el.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}','*');}});toArray(slide.querySelectorAll('iframe[src*="player.vimeo.com/"]')).forEach(function(el){if(!el.hasAttribute('data-ignore')&&typeof el.contentWindow.postMessage==='function'){el.contentWindow.postMessage('{"method":"pause"}','*');}});toArray(slide.querySelectorAll('iframe[data-src]')).forEach(function(el){el.setAttribute('src','about:blank');el.removeAttribute('src');});}}
|
216
|
+
function getSlidePastCount(){var horizontalSlides=toArray(dom.wrapper.querySelectorAll(HORIZONTAL_SLIDES_SELECTOR));var pastCount=0;mainLoop:for(var i=0;i<horizontalSlides.length;i++){var horizontalSlide=horizontalSlides[i];var verticalSlides=toArray(horizontalSlide.querySelectorAll('section'));for(var j=0;j<verticalSlides.length;j++){if(verticalSlides[j].classList.contains('present')){break mainLoop;}
|
214
217
|
pastCount++;}
|
215
218
|
if(horizontalSlide.classList.contains('present')){break;}
|
216
219
|
if(horizontalSlide.classList.contains('stack')===false){pastCount++;}}
|
217
|
-
|
220
|
+
return pastCount;}
|
221
|
+
function getProgress(){var totalCount=getTotalSlides();var pastCount=getSlidePastCount();if(currentSlide){var allFragments=currentSlide.querySelectorAll('.fragment');if(allFragments.length>0){var visibleFragments=currentSlide.querySelectorAll('.fragment.visible');var fragmentWeight=0.9;pastCount+=(visibleFragments.length/allFragments.length)*fragmentWeight;}}
|
218
222
|
return pastCount/(totalCount-1);}
|
219
223
|
function isSpeakerNotes(){return!!window.location.search.match(/receiver/gi);}
|
220
224
|
function readURL(){var hash=window.location.hash;var bits=hash.slice(2).split('/'),name=hash.replace(/#|\//gi,'');if(isNaN(parseInt(bits[0],10))&&name.length){var element;if(/^[a-zA-Z][\w:.-]*$/.test(name)){element=document.getElementById(name);}
|
@@ -258,7 +262,8 @@ function cueAutoSlide(){cancelAutoSlide();if(currentSlide){var currentFragment=c
|
|
258
262
|
else if(slideAutoSlide){autoSlide=parseInt(slideAutoSlide,10);}
|
259
263
|
else if(parentAutoSlide){autoSlide=parseInt(parentAutoSlide,10);}
|
260
264
|
else{autoSlide=config.autoSlide;}
|
261
|
-
toArray(currentSlide.querySelectorAll('video, audio')).forEach(function(el){if(el.hasAttribute('data-autoplay')){if(autoSlide&&el.duration*1000>autoSlide){autoSlide=(el.duration*1000)+1000;}}});
|
265
|
+
if(currentSlide.querySelectorAll('.fragment').length===0){toArray(currentSlide.querySelectorAll('video, audio')).forEach(function(el){if(el.hasAttribute('data-autoplay')){if(autoSlide&&el.duration*1000>autoSlide){autoSlide=(el.duration*1000)+1000;}}});}
|
266
|
+
if(autoSlide&&!autoSlidePaused&&!isPaused()&&!isOverview()&&(!Reveal.isLastSlide()||availableFragments().next||config.loop===true)){autoSlideTimeout=setTimeout(navigateNext,autoSlide);autoSlideStartTime=Date.now();}
|
262
267
|
if(autoSlidePlayer){autoSlidePlayer.setPlaying(autoSlideTimeout!==-1);}}}
|
263
268
|
function cancelAutoSlide(){clearTimeout(autoSlideTimeout);autoSlideTimeout=-1;}
|
264
269
|
function pauseAutoSlide(){if(autoSlide&&!autoSlidePaused){autoSlidePaused=true;dispatchEvent('autoslidepaused');clearTimeout(autoSlideTimeout);if(autoSlidePlayer){autoSlidePlayer.setPlaying(false);}}}
|