slippery 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +2 -2
- data/assets/LICENSE.md +21 -0
- data/assets/README.md +48 -0
- data/assets/highlight.js/CHANGES.md +693 -0
- data/assets/highlight.js/README.md +86 -37
- data/assets/highlight.js/README.ru.md +65 -24
- data/assets/highlight.js/highlight.pack.js +2 -1
- data/assets/highlight.js/styles/agate.css +108 -0
- data/assets/highlight.js/styles/androidstudio.css +66 -0
- data/assets/highlight.js/styles/arduino-light.css +88 -0
- data/assets/highlight.js/styles/arta.css +25 -93
- data/assets/highlight.js/styles/ascetic.css +20 -28
- data/assets/highlight.js/styles/atelier-cave-dark.css +83 -0
- data/assets/highlight.js/styles/atelier-cave-light.css +85 -0
- data/assets/highlight.js/styles/atelier-dune-dark.css +69 -0
- data/assets/highlight.js/styles/atelier-dune-light.css +69 -0
- data/assets/highlight.js/styles/atelier-estuary-dark.css +84 -0
- data/assets/highlight.js/styles/atelier-estuary-light.css +84 -0
- data/assets/highlight.js/styles/atelier-forest-dark.css +69 -0
- data/assets/highlight.js/styles/atelier-forest-light.css +69 -0
- data/assets/highlight.js/styles/atelier-heath-dark.css +69 -0
- data/assets/highlight.js/styles/atelier-heath-light.css +69 -0
- data/assets/highlight.js/styles/atelier-lakeside-dark.css +69 -0
- data/assets/highlight.js/styles/atelier-lakeside-light.css +69 -0
- data/assets/highlight.js/styles/atelier-plateau-dark.css +84 -0
- data/assets/highlight.js/styles/atelier-plateau-light.css +84 -0
- data/assets/highlight.js/styles/atelier-savanna-dark.css +84 -0
- data/assets/highlight.js/styles/atelier-savanna-light.css +84 -0
- data/assets/highlight.js/styles/atelier-seaside-dark.css +69 -0
- data/assets/highlight.js/styles/atelier-seaside-light.css +69 -0
- data/assets/highlight.js/styles/atelier-sulphurpool-dark.css +69 -0
- data/assets/highlight.js/styles/atelier-sulphurpool-light.css +69 -0
- data/assets/highlight.js/styles/atom-one-dark.css +96 -0
- data/assets/highlight.js/styles/atom-one-light.css +96 -0
- data/assets/highlight.js/styles/brown-paper.css +64 -0
- data/assets/highlight.js/styles/codepen-embed.css +22 -70
- data/assets/highlight.js/styles/color-brewer.css +20 -118
- data/assets/highlight.js/styles/darcula.css +77 -0
- data/assets/highlight.js/styles/dark.css +20 -62
- data/assets/highlight.js/styles/darkula.css +6 -0
- data/assets/highlight.js/styles/default.css +67 -121
- data/assets/highlight.js/styles/docco.css +22 -61
- data/assets/highlight.js/styles/dracula.css +76 -0
- data/assets/highlight.js/styles/far.css +26 -67
- data/assets/highlight.js/styles/foundation.css +22 -70
- data/assets/highlight.js/styles/github-gist.css +71 -0
- data/assets/highlight.js/styles/github.css +23 -51
- data/assets/highlight.js/styles/googlecode.css +29 -88
- data/assets/highlight.js/styles/grayscale.css +101 -0
- data/assets/highlight.js/styles/gruvbox-dark.css +108 -0
- data/assets/highlight.js/styles/gruvbox-light.css +108 -0
- data/assets/highlight.js/styles/hopscotch.css +83 -0
- data/assets/highlight.js/styles/hybrid.css +22 -91
- data/assets/highlight.js/styles/idea.css +24 -53
- data/assets/highlight.js/styles/ir-black.css +73 -0
- data/assets/highlight.js/styles/kimbie.dark.css +24 -46
- data/assets/highlight.js/styles/kimbie.light.css +24 -46
- data/assets/highlight.js/styles/magula.css +19 -71
- data/assets/highlight.js/styles/mono-blue.css +22 -33
- data/assets/highlight.js/styles/monokai-sublime.css +83 -0
- data/assets/highlight.js/styles/monokai.css +23 -80
- data/assets/highlight.js/styles/obsidian.css +26 -92
- data/assets/highlight.js/styles/ocean.css +74 -0
- data/assets/highlight.js/styles/paraiso-dark.css +72 -0
- data/assets/highlight.js/styles/paraiso-light.css +72 -0
- data/assets/highlight.js/styles/pojoaque.css +29 -54
- data/assets/highlight.js/styles/purebasic.css +96 -0
- data/assets/highlight.js/styles/qtcreator_dark.css +83 -0
- data/assets/highlight.js/styles/qtcreator_light.css +83 -0
- data/assets/highlight.js/styles/railscasts.css +32 -111
- data/assets/highlight.js/styles/rainbow.css +34 -58
- data/assets/highlight.js/styles/routeros.css +108 -0
- data/assets/highlight.js/styles/school-book.css +72 -0
- data/assets/highlight.js/styles/solarized-dark.css +84 -0
- data/assets/highlight.js/styles/solarized-light.css +84 -0
- data/assets/highlight.js/styles/sunburst.css +28 -91
- data/assets/highlight.js/styles/tomorrow-night-blue.css +23 -43
- data/assets/highlight.js/styles/tomorrow-night-bright.css +23 -43
- data/assets/highlight.js/styles/tomorrow-night-eighties.css +23 -43
- data/assets/highlight.js/styles/tomorrow-night.css +23 -43
- data/assets/highlight.js/styles/tomorrow.css +23 -43
- data/assets/highlight.js/styles/vs.css +33 -59
- data/assets/highlight.js/styles/vs2015.css +115 -0
- data/assets/highlight.js/styles/xcode.css +28 -94
- data/assets/highlight.js/styles/xt256.css +92 -0
- data/assets/highlight.js/styles/zenburn.css +26 -65
- data/assets/index.html +186 -0
- data/assets/pictures/cover.jpg +0 -0
- data/assets/pictures/logo.svg +3 -0
- data/assets/pictures/picture.jpg +0 -0
- data/assets/reveal.js/css/print/paper.css +193 -167
- data/assets/reveal.js/css/print/pdf.css +20 -53
- data/assets/reveal.js/css/reveal.css +953 -1663
- data/assets/reveal.js/css/reveal.min.css +3 -3
- data/assets/reveal.js/css/reveal.scss +1319 -0
- data/assets/reveal.js/css/theme/README.md +2 -4
- data/assets/reveal.js/css/theme/beige.css +183 -60
- data/assets/reveal.js/css/theme/black.css +267 -0
- data/assets/reveal.js/css/theme/blood.css +190 -80
- data/assets/reveal.js/css/theme/league.css +273 -0
- data/assets/reveal.js/css/theme/moon.css +174 -51
- data/assets/reveal.js/css/theme/night.css +171 -42
- data/assets/reveal.js/css/theme/serif.css +187 -58
- data/assets/reveal.js/css/theme/simple.css +179 -50
- data/assets/reveal.js/css/theme/sky.css +176 -47
- data/assets/reveal.js/css/theme/solarized.css +174 -51
- data/assets/reveal.js/css/theme/source/beige.scss +1 -12
- data/assets/reveal.js/css/theme/source/black.scss +49 -0
- data/assets/reveal.js/css/theme/source/blood.scss +3 -15
- data/assets/reveal.js/css/theme/source/{default.scss → league.scss} +5 -13
- data/assets/reveal.js/css/theme/source/moon.scss +1 -12
- data/assets/reveal.js/css/theme/source/serif.scss +1 -1
- data/assets/reveal.js/css/theme/source/sky.scss +1 -1
- data/assets/reveal.js/css/theme/source/solarized.scss +1 -12
- data/assets/reveal.js/css/theme/source/white.scss +49 -0
- data/assets/reveal.js/css/theme/template/settings.scss +13 -4
- data/assets/reveal.js/css/theme/template/theme.scss +193 -14
- data/assets/reveal.js/css/theme/white.css +267 -0
- data/assets/reveal.js/js/reveal.js +1572 -446
- data/assets/reveal.js/js/reveal.min.js +4 -4
- data/assets/reveal.js/lib/css/zenburn.css +74 -71
- data/assets/reveal.js/lib/font/league-gothic/league-gothic.css +10 -0
- data/assets/reveal.js/lib/font/league-gothic/league-gothic.eot +0 -0
- data/assets/reveal.js/lib/font/league-gothic/league-gothic.ttf +0 -0
- data/assets/reveal.js/lib/font/league-gothic/league-gothic.woff +0 -0
- data/assets/reveal.js/lib/font/source-sans-pro/LICENSE +45 -0
- data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.eot +0 -0
- data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.ttf +0 -0
- data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.woff +0 -0
- data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.eot +0 -0
- data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.ttf +0 -0
- data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.woff +0 -0
- data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.eot +0 -0
- data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.ttf +0 -0
- data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.woff +0 -0
- data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot +0 -0
- data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf +0 -0
- data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff +0 -0
- data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro.css +39 -0
- data/assets/reveal.js/plugin/highlight/highlight.js +2 -4
- data/assets/reveal.js/plugin/leap/leap.js +4 -2
- data/assets/reveal.js/plugin/markdown/example.html +3 -3
- data/assets/reveal.js/plugin/markdown/markdown.js +10 -9
- data/assets/reveal.js/plugin/markdown/marked.js +2 -33
- data/assets/reveal.js/plugin/math/math.js +1 -1
- data/assets/reveal.js/plugin/notes/notes.html +321 -182
- data/assets/reveal.js/plugin/notes/notes.js +89 -45
- data/assets/reveal.js/plugin/notes-server/client.js +49 -46
- data/assets/reveal.js/plugin/notes-server/index.js +28 -21
- data/assets/reveal.js/plugin/notes-server/notes.html +351 -97
- data/assets/reveal.js/plugin/print-pdf/print-pdf.js +24 -20
- data/assets/reveal.js/plugin/zoom-js/zoom.js +78 -58
- data/assets/shower/shower.min.js +8 -0
- data/assets/shower/themes/material/LICENSE.md +21 -0
- data/assets/shower/themes/material/README.md +45 -0
- data/assets/shower/themes/material/fonts/COPYRIGHT.txt +1 -0
- data/assets/shower/themes/material/fonts/LICENSE.txt +202 -0
- data/assets/shower/themes/material/fonts/roboto-bold-italic.woff2 +0 -0
- data/assets/shower/themes/material/fonts/roboto-bold.woff2 +0 -0
- data/assets/shower/themes/material/fonts/roboto-italic.woff2 +0 -0
- data/assets/shower/themes/material/fonts/roboto-light.woff2 +0 -0
- data/assets/shower/themes/material/fonts/roboto-mono-regular.woff2 +0 -0
- data/assets/shower/themes/material/fonts/roboto-regular.woff2 +0 -0
- data/assets/shower/themes/material/index.html +488 -0
- data/assets/shower/themes/material/pictures/canvas.png +0 -0
- data/assets/shower/themes/material/pictures/exact.svg +3 -0
- data/assets/shower/themes/material/pictures/picture-1.svg +3 -0
- data/assets/shower/themes/material/pictures/picture-2.svg +3 -0
- data/assets/shower/themes/material/pictures/picture-3.svg +3 -0
- data/assets/shower/themes/material/pictures/square.svg +3 -0
- data/assets/shower/themes/material/pictures/tall.svg +3 -0
- data/assets/shower/themes/material/pictures/wide.svg +3 -0
- data/assets/shower/themes/material/styles/blocks/badge.css +65 -0
- data/assets/shower/themes/material/styles/blocks/caption.css +67 -0
- data/assets/shower/themes/material/styles/blocks/progress.css +37 -0
- data/assets/shower/themes/material/styles/blocks/region.css +29 -0
- data/assets/shower/themes/material/styles/fonts.css +64 -0
- data/assets/shower/themes/material/styles/shower/grid.svg +50 -0
- data/assets/shower/themes/material/styles/shower/shower-full.css +13 -0
- data/assets/shower/themes/material/styles/shower/shower-grid.css +13 -0
- data/assets/shower/themes/material/styles/shower/shower-list.css +30 -0
- data/assets/shower/themes/material/styles/shower/shower-print.css +11 -0
- data/assets/shower/themes/material/styles/shower/shower.css +39 -0
- data/assets/shower/themes/material/styles/slide/content/basic.css +23 -0
- data/assets/shower/themes/material/styles/slide/content/code.css +80 -0
- data/assets/shower/themes/material/styles/slide/content/footer.css +29 -0
- data/assets/shower/themes/material/styles/slide/content/inline.css +49 -0
- data/assets/shower/themes/material/styles/slide/content/lists.css +54 -0
- data/assets/shower/themes/material/styles/slide/content/quote.css +24 -0
- data/assets/shower/themes/material/styles/slide/content/table.css +53 -0
- data/assets/shower/themes/material/styles/slide/elements/columns.css +19 -0
- data/assets/shower/themes/material/styles/slide/elements/copyright.css +38 -0
- data/assets/shower/themes/material/styles/slide/elements/cover.css +25 -0
- data/assets/shower/themes/material/styles/slide/elements/next.css +9 -0
- data/assets/shower/themes/material/styles/slide/elements/place.css +63 -0
- data/assets/shower/themes/material/styles/slide/elements/shout.css +53 -0
- data/assets/shower/themes/material/styles/slide/modifiers/black.css +5 -0
- data/assets/shower/themes/material/styles/slide/modifiers/clear.css +11 -0
- data/assets/shower/themes/material/styles/slide/modifiers/white.css +5 -0
- data/assets/shower/themes/material/styles/slide/slide-full.css +16 -0
- data/assets/shower/themes/material/styles/slide/slide-list.css +68 -0
- data/assets/shower/themes/material/styles/slide/slide.css +56 -0
- data/assets/shower/themes/material/styles/styles.css +9 -0
- data/assets/shower/themes/ribbon/LICENSE.md +21 -0
- data/assets/shower/themes/ribbon/README.md +41 -0
- data/assets/shower/themes/ribbon/fonts/LICENSE.txt +44 -0
- data/assets/shower/themes/ribbon/fonts/pt-mono-regular.woff2 +0 -0
- data/assets/shower/themes/ribbon/fonts/pt-sans-bold-italic.woff2 +0 -0
- data/assets/shower/themes/ribbon/fonts/pt-sans-bold.woff2 +0 -0
- data/assets/shower/themes/ribbon/fonts/pt-sans-italic.woff2 +0 -0
- data/assets/shower/themes/ribbon/fonts/pt-sans-narrow-bold.woff2 +0 -0
- data/assets/shower/themes/ribbon/fonts/pt-sans-regular.woff2 +0 -0
- data/assets/shower/themes/ribbon/index.html +490 -0
- data/assets/shower/themes/ribbon/pictures/canvas.png +0 -0
- data/assets/shower/themes/ribbon/pictures/exact.svg +3 -0
- data/assets/shower/themes/ribbon/pictures/picture-1.svg +3 -0
- data/assets/shower/themes/ribbon/pictures/picture-2.svg +3 -0
- data/assets/shower/themes/ribbon/pictures/picture-3.svg +3 -0
- data/assets/shower/themes/ribbon/pictures/square.svg +3 -0
- data/assets/shower/themes/ribbon/pictures/tall.svg +3 -0
- data/assets/shower/themes/ribbon/pictures/wide.svg +3 -0
- data/assets/shower/themes/ribbon/styles/blocks/badge.css +63 -0
- data/assets/shower/themes/ribbon/styles/blocks/caption.css +63 -0
- data/assets/shower/themes/ribbon/styles/blocks/progress.css +46 -0
- data/assets/shower/themes/ribbon/styles/blocks/region.css +29 -0
- data/assets/shower/themes/ribbon/styles/fonts.css +64 -0
- data/assets/shower/themes/ribbon/styles/shower/grid.svg +40 -0
- data/assets/shower/themes/ribbon/styles/shower/shower-full.css +13 -0
- data/assets/shower/themes/ribbon/styles/shower/shower-grid.css +13 -0
- data/assets/shower/themes/ribbon/styles/shower/shower-list.css +30 -0
- data/assets/shower/themes/ribbon/styles/shower/shower-print.css +11 -0
- data/assets/shower/themes/ribbon/styles/shower/shower.css +32 -0
- data/assets/shower/themes/ribbon/styles/slide/content/basic.css +21 -0
- data/assets/shower/themes/ribbon/styles/slide/content/code.css +82 -0
- data/assets/shower/themes/ribbon/styles/slide/content/footer.css +29 -0
- data/assets/shower/themes/ribbon/styles/slide/content/inline.css +50 -0
- data/assets/shower/themes/ribbon/styles/slide/content/lists.css +55 -0
- data/assets/shower/themes/ribbon/styles/slide/content/quote.css +23 -0
- data/assets/shower/themes/ribbon/styles/slide/content/table.css +53 -0
- data/assets/shower/themes/ribbon/styles/slide/elements/columns.css +19 -0
- data/assets/shower/themes/ribbon/styles/slide/elements/copyright.css +38 -0
- data/assets/shower/themes/ribbon/styles/slide/elements/cover.css +25 -0
- data/assets/shower/themes/ribbon/styles/slide/elements/next.css +9 -0
- data/assets/shower/themes/ribbon/styles/slide/elements/place.css +63 -0
- data/assets/shower/themes/ribbon/styles/slide/elements/shout.css +54 -0
- data/assets/shower/themes/ribbon/styles/slide/modifiers/black.css +5 -0
- data/assets/shower/themes/ribbon/styles/slide/modifiers/clear.css +11 -0
- data/assets/shower/themes/ribbon/styles/slide/modifiers/white.css +5 -0
- data/assets/shower/themes/ribbon/styles/slide/ribbon.svg +1 -0
- data/assets/shower/themes/ribbon/styles/slide/slide-full.css +16 -0
- data/assets/shower/themes/ribbon/styles/slide/slide-list.css +68 -0
- data/assets/shower/themes/ribbon/styles/slide/slide.css +60 -0
- data/assets/shower/themes/ribbon/styles/styles.css +9 -0
- data/lib/slippery/presentation.rb +4 -0
- data/lib/slippery/processors/add_highlight.rb +3 -8
- data/lib/slippery/processors/reveal_js/add_reveal_js.rb +1 -1
- data/lib/slippery/processors/shower.rb +76 -0
- data/lib/slippery/rake_tasks.rb +8 -3
- data/lib/slippery/version.rb +1 -1
- data/lib/slippery.rb +1 -0
- data/slippery.gemspec +3 -3
- metadata +194 -56
- data/assets/highlight.js/highlight-0.8.default.min.css +0 -1
- data/assets/highlight.js/highlight-0.8.min.js +0 -1
- data/assets/highlight.js/styles/atelier-dune.dark.css +0 -95
- data/assets/highlight.js/styles/atelier-dune.light.css +0 -95
- data/assets/highlight.js/styles/atelier-forest.dark.css +0 -95
- data/assets/highlight.js/styles/atelier-forest.light.css +0 -95
- data/assets/highlight.js/styles/atelier-heath.dark.css +0 -95
- data/assets/highlight.js/styles/atelier-heath.light.css +0 -95
- data/assets/highlight.js/styles/atelier-lakeside.dark.css +0 -95
- data/assets/highlight.js/styles/atelier-lakeside.light.css +0 -95
- data/assets/highlight.js/styles/atelier-seaside.dark.css +0 -95
- data/assets/highlight.js/styles/atelier-seaside.light.css +0 -95
- data/assets/highlight.js/styles/brown_paper.css +0 -105
- data/assets/highlight.js/styles/ir_black.css +0 -110
- data/assets/highlight.js/styles/monokai_sublime.css +0 -148
- data/assets/highlight.js/styles/paraiso.dark.css +0 -95
- data/assets/highlight.js/styles/paraiso.light.css +0 -95
- data/assets/highlight.js/styles/school_book.css +0 -113
- data/assets/highlight.js/styles/solarized_dark.css +0 -109
- data/assets/highlight.js/styles/solarized_light.css +0 -109
- data/assets/reveal.js/css/theme/default.css +0 -148
- data/assets/reveal.js/lib/font/league_gothic-webfont.eot +0 -0
- data/assets/reveal.js/lib/font/league_gothic-webfont.svg +0 -230
- data/assets/reveal.js/lib/font/league_gothic-webfont.ttf +0 -0
- data/assets/reveal.js/lib/font/league_gothic-webfont.woff +0 -0
- data/assets/reveal.js/plugin/postmessage/example.html +0 -39
- data/assets/reveal.js/plugin/postmessage/postmessage.js +0 -42
- /data/assets/highlight.js/styles/{brown_papersq.png → brown-papersq.png} +0 -0
- /data/assets/highlight.js/styles/{school_book.png → school-book.png} +0 -0
- /data/assets/reveal.js/lib/font/{league_gothic_license → league-gothic/LICENSE} +0 -0
@@ -2,12 +2,24 @@
|
|
2
2
|
(function(){
|
3
3
|
var isEnabled = true;
|
4
4
|
|
5
|
-
document.querySelector( '.reveal' ).addEventListener( 'mousedown', function( event ) {
|
5
|
+
document.querySelector( '.reveal .slides' ).addEventListener( 'mousedown', function( event ) {
|
6
6
|
var modifier = ( Reveal.getConfig().zoomKey ? Reveal.getConfig().zoomKey : 'alt' ) + 'Key';
|
7
7
|
|
8
|
+
var zoomPadding = 20;
|
9
|
+
var revealScale = Reveal.getScale();
|
10
|
+
|
8
11
|
if( event[ modifier ] && isEnabled ) {
|
9
12
|
event.preventDefault();
|
10
|
-
|
13
|
+
|
14
|
+
var bounds = event.target.getBoundingClientRect();
|
15
|
+
|
16
|
+
zoom.to({
|
17
|
+
x: ( bounds.left * revealScale ) - zoomPadding,
|
18
|
+
y: ( bounds.top * revealScale ) - zoomPadding,
|
19
|
+
width: ( bounds.width * revealScale ) + ( zoomPadding * 2 ),
|
20
|
+
height: ( bounds.height * revealScale ) + ( zoomPadding * 2 ),
|
21
|
+
pan: false
|
22
|
+
});
|
11
23
|
}
|
12
24
|
} );
|
13
25
|
|
@@ -16,11 +28,11 @@
|
|
16
28
|
})();
|
17
29
|
|
18
30
|
/*!
|
19
|
-
* zoom.js 0.
|
31
|
+
* zoom.js 0.3 (modified for use with reveal.js)
|
20
32
|
* http://lab.hakim.se/zoom-js
|
21
33
|
* MIT licensed
|
22
34
|
*
|
23
|
-
* Copyright (C) 2011-
|
35
|
+
* Copyright (C) 2011-2014 Hakim El Hattab, http://hakim.se
|
24
36
|
*/
|
25
37
|
var zoom = (function(){
|
26
38
|
|
@@ -35,8 +47,6 @@ var zoom = (function(){
|
|
35
47
|
var panEngageTimeout = -1,
|
36
48
|
panUpdateInterval = -1;
|
37
49
|
|
38
|
-
var currentOptions = null;
|
39
|
-
|
40
50
|
// Check for transform support so that we can fallback otherwise
|
41
51
|
var supportsTransforms = 'WebkitTransform' in document.body.style ||
|
42
52
|
'MozTransform' in document.body.style ||
|
@@ -58,7 +68,7 @@ var zoom = (function(){
|
|
58
68
|
if( level !== 1 && event.keyCode === 27 ) {
|
59
69
|
zoom.out();
|
60
70
|
}
|
61
|
-
}
|
71
|
+
} );
|
62
72
|
|
63
73
|
// Monitor mouse movement for panning
|
64
74
|
document.addEventListener( 'mousemove', function( event ) {
|
@@ -66,38 +76,56 @@ var zoom = (function(){
|
|
66
76
|
mouseX = event.clientX;
|
67
77
|
mouseY = event.clientY;
|
68
78
|
}
|
69
|
-
}
|
79
|
+
} );
|
70
80
|
|
71
81
|
/**
|
72
|
-
* Applies the CSS required to zoom in,
|
82
|
+
* Applies the CSS required to zoom in, prefers the use of CSS3
|
73
83
|
* transforms but falls back on zoom for IE.
|
74
84
|
*
|
75
|
-
* @param {
|
76
|
-
* @param {Number} pageOffsetY
|
77
|
-
* @param {Number} elementOffsetX
|
78
|
-
* @param {Number} elementOffsetY
|
85
|
+
* @param {Object} rect
|
79
86
|
* @param {Number} scale
|
80
87
|
*/
|
81
|
-
function magnify(
|
88
|
+
function magnify( rect, scale ) {
|
89
|
+
|
90
|
+
var scrollOffset = getScrollOffset();
|
91
|
+
|
92
|
+
// Ensure a width/height is set
|
93
|
+
rect.width = rect.width || 1;
|
94
|
+
rect.height = rect.height || 1;
|
95
|
+
|
96
|
+
// Center the rect within the zoomed viewport
|
97
|
+
rect.x -= ( window.innerWidth - ( rect.width * scale ) ) / 2;
|
98
|
+
rect.y -= ( window.innerHeight - ( rect.height * scale ) ) / 2;
|
82
99
|
|
83
100
|
if( supportsTransforms ) {
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
101
|
+
// Reset
|
102
|
+
if( scale === 1 ) {
|
103
|
+
document.body.style.transform = '';
|
104
|
+
document.body.style.OTransform = '';
|
105
|
+
document.body.style.msTransform = '';
|
106
|
+
document.body.style.MozTransform = '';
|
107
|
+
document.body.style.WebkitTransform = '';
|
108
|
+
}
|
109
|
+
// Scale
|
110
|
+
else {
|
111
|
+
var origin = scrollOffset.x +'px '+ scrollOffset.y +'px',
|
112
|
+
transform = 'translate('+ -rect.x +'px,'+ -rect.y +'px) scale('+ scale +')';
|
113
|
+
|
114
|
+
document.body.style.transformOrigin = origin;
|
115
|
+
document.body.style.OTransformOrigin = origin;
|
116
|
+
document.body.style.msTransformOrigin = origin;
|
117
|
+
document.body.style.MozTransformOrigin = origin;
|
118
|
+
document.body.style.WebkitTransformOrigin = origin;
|
119
|
+
|
120
|
+
document.body.style.transform = transform;
|
121
|
+
document.body.style.OTransform = transform;
|
122
|
+
document.body.style.msTransform = transform;
|
123
|
+
document.body.style.MozTransform = transform;
|
124
|
+
document.body.style.WebkitTransform = transform;
|
125
|
+
}
|
98
126
|
}
|
99
127
|
else {
|
100
|
-
// Reset
|
128
|
+
// Reset
|
101
129
|
if( scale === 1 ) {
|
102
130
|
document.body.style.position = '';
|
103
131
|
document.body.style.left = '';
|
@@ -106,11 +134,11 @@ var zoom = (function(){
|
|
106
134
|
document.body.style.height = '';
|
107
135
|
document.body.style.zoom = '';
|
108
136
|
}
|
109
|
-
//
|
137
|
+
// Scale
|
110
138
|
else {
|
111
139
|
document.body.style.position = 'relative';
|
112
|
-
document.body.style.left = ( - (
|
113
|
-
document.body.style.top = ( - (
|
140
|
+
document.body.style.left = ( - ( scrollOffset.x + rect.x ) / scale ) + 'px';
|
141
|
+
document.body.style.top = ( - ( scrollOffset.y + rect.y ) / scale ) + 'px';
|
114
142
|
document.body.style.width = ( scale * 100 ) + '%';
|
115
143
|
document.body.style.height = ( scale * 100 ) + '%';
|
116
144
|
document.body.style.zoom = scale;
|
@@ -119,11 +147,13 @@ var zoom = (function(){
|
|
119
147
|
|
120
148
|
level = scale;
|
121
149
|
|
122
|
-
if(
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
150
|
+
if( document.documentElement.classList ) {
|
151
|
+
if( level !== 1 ) {
|
152
|
+
document.documentElement.classList.add( 'zoomed' );
|
153
|
+
}
|
154
|
+
else {
|
155
|
+
document.documentElement.classList.remove( 'zoomed' );
|
156
|
+
}
|
127
157
|
}
|
128
158
|
}
|
129
159
|
|
@@ -159,7 +189,7 @@ var zoom = (function(){
|
|
159
189
|
function getScrollOffset() {
|
160
190
|
return {
|
161
191
|
x: window.scrollX !== undefined ? window.scrollX : window.pageXOffset,
|
162
|
-
y: window.scrollY !== undefined ? window.scrollY : window.
|
192
|
+
y: window.scrollY !== undefined ? window.scrollY : window.pageYOffset
|
163
193
|
}
|
164
194
|
}
|
165
195
|
|
@@ -175,6 +205,7 @@ var zoom = (function(){
|
|
175
205
|
* - scale: can be used instead of width/height to explicitly set scale
|
176
206
|
*/
|
177
207
|
to: function( options ) {
|
208
|
+
|
178
209
|
// Due to an implementation limitation we can't zoom in
|
179
210
|
// to another element without zooming out first
|
180
211
|
if( level !== 1 ) {
|
@@ -188,11 +219,12 @@ var zoom = (function(){
|
|
188
219
|
if( !!options.element ) {
|
189
220
|
// Space around the zoomed in element to leave on screen
|
190
221
|
var padding = 20;
|
222
|
+
var bounds = options.element.getBoundingClientRect();
|
191
223
|
|
192
|
-
options.
|
193
|
-
options.
|
194
|
-
options.
|
195
|
-
options.
|
224
|
+
options.x = bounds.left - padding;
|
225
|
+
options.y = bounds.top - padding;
|
226
|
+
options.width = bounds.width + ( padding * 2 );
|
227
|
+
options.height = bounds.height + ( padding * 2 );
|
196
228
|
}
|
197
229
|
|
198
230
|
// If width/height values are set, calculate scale from those values
|
@@ -204,13 +236,7 @@ var zoom = (function(){
|
|
204
236
|
options.x *= options.scale;
|
205
237
|
options.y *= options.scale;
|
206
238
|
|
207
|
-
|
208
|
-
|
209
|
-
if( options.element ) {
|
210
|
-
scrollOffset.x -= ( window.innerWidth - ( options.width * options.scale ) ) / 2;
|
211
|
-
}
|
212
|
-
|
213
|
-
magnify( scrollOffset.x, scrollOffset.y, options.x, options.y, options.scale );
|
239
|
+
magnify( options, options.scale );
|
214
240
|
|
215
241
|
if( options.pan !== false ) {
|
216
242
|
|
@@ -222,8 +248,6 @@ var zoom = (function(){
|
|
222
248
|
|
223
249
|
}
|
224
250
|
}
|
225
|
-
|
226
|
-
currentOptions = options;
|
227
251
|
}
|
228
252
|
},
|
229
253
|
|
@@ -234,13 +258,7 @@ var zoom = (function(){
|
|
234
258
|
clearTimeout( panEngageTimeout );
|
235
259
|
clearInterval( panUpdateInterval );
|
236
260
|
|
237
|
-
|
238
|
-
|
239
|
-
if( currentOptions && currentOptions.element ) {
|
240
|
-
scrollOffset.x -= ( window.innerWidth - ( currentOptions.width * currentOptions.scale ) ) / 2;
|
241
|
-
}
|
242
|
-
|
243
|
-
magnify( scrollOffset.x, scrollOffset.y, 0, 0, 1 );
|
261
|
+
magnify( { x: 0, y: 0 }, 1 );
|
244
262
|
|
245
263
|
level = 1;
|
246
264
|
},
|
@@ -256,3 +274,5 @@ var zoom = (function(){
|
|
256
274
|
|
257
275
|
})();
|
258
276
|
|
277
|
+
|
278
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/**
|
2
|
+
* Core for Shower HTML presentation engine
|
3
|
+
* shower-core v2.1.0, https://github.com/shower/core
|
4
|
+
* @copyright 2010-2017 Vadim Makeev, http://pepelsbey.net/
|
5
|
+
* @license MIT
|
6
|
+
*/
|
7
|
+
!function(global){var undef,DECL_STATES={NOT_RESOLVED:"NOT_RESOLVED",IN_RESOLVING:"IN_RESOLVING",RESOLVED:"RESOLVED"},create=function(){var curOptions={trackCircularDependencies:!0,allowMultipleDeclarations:!0},modulesStorage={},waitForNextTick=!1,pendingRequires=[],define=function(name,deps,declFn){declFn||(declFn=deps,deps=[]);var module=modulesStorage[name];module||(module=modulesStorage[name]={name:name,decl:undef}),module.decl={name:name,prev:module.decl,fn:declFn,state:DECL_STATES.NOT_RESOLVED,deps:deps,dependents:[],exports:undef}},require=function(modules,cb,errorCb){"string"==typeof modules&&(modules=[modules]),waitForNextTick||(waitForNextTick=!0,nextTick(onNextTick)),pendingRequires.push({deps:modules,cb:function(exports,error){error?(errorCb||onError)(error):cb.apply(global,exports)}})},getState=function(name){var module=modulesStorage[name];return module?DECL_STATES[module.decl.state]:"NOT_DEFINED"},isDefined=function(name){return!!modulesStorage[name]},setOptions=function(options){for(var name in options)options.hasOwnProperty(name)&&(curOptions[name]=options[name])},getStat=function(){var module,res={};for(var name in modulesStorage)modulesStorage.hasOwnProperty(name)&&(module=modulesStorage[name],(res[module.decl.state]||(res[module.decl.state]=[])).push(name));return res},onNextTick=function(){waitForNextTick=!1,applyRequires()},applyRequires=function(){var require,requiresToProcess=pendingRequires,i=0;for(pendingRequires=[];require=requiresToProcess[i++];)requireDeps(null,require.deps,[],require.cb)},requireDeps=function(fromDecl,deps,path,cb){var unresolvedDepsCnt=deps.length;unresolvedDepsCnt||cb([]);for(var dep,decl,decls=[],onDeclResolved=function(_,error){if(error)return void cb(null,error);if(!--unresolvedDepsCnt){for(var decl,exports=[],i=0;decl=decls[i++];)exports.push(decl.exports);cb(exports)}},i=0,len=unresolvedDepsCnt;i<len;){if(dep=deps[i++],"string"==typeof dep){if(!modulesStorage[dep])return void cb(null,buildModuleNotFoundError(dep,fromDecl));decl=modulesStorage[dep].decl}else decl=dep;decls.push(decl),startDeclResolving(decl,path,onDeclResolved)}},startDeclResolving=function(decl,path,cb){if(decl.state===DECL_STATES.RESOLVED)return void cb(decl.exports);if(decl.state===DECL_STATES.IN_RESOLVING)return void(curOptions.trackCircularDependencies&&isDependenceCircular(decl,path)?cb(null,buildCircularDependenceError(decl,path)):decl.dependents.push(cb));if(decl.dependents.push(cb),decl.prev&&!curOptions.allowMultipleDeclarations)return void provideError(decl,buildMultipleDeclarationError(decl));curOptions.trackCircularDependencies&&(path=path.slice()).push(decl);var isProvided=!1,deps=decl.prev?decl.deps.concat([decl.prev]):decl.deps;decl.state=DECL_STATES.IN_RESOLVING,requireDeps(decl,deps,path,function(depDeclsExports,error){return error?void provideError(decl,error):(depDeclsExports.unshift(function(exports,error){return isProvided?void cb(null,buildDeclAreadyProvidedError(decl)):(isProvided=!0,void(error?provideError(decl,error):provideDecl(decl,exports)))}),void decl.fn.apply({name:decl.name,deps:decl.deps,global:global},depDeclsExports))})},provideDecl=function(decl,exports){decl.exports=exports,decl.state=DECL_STATES.RESOLVED;for(var dependent,i=0;dependent=decl.dependents[i++];)dependent(exports);decl.dependents=undef},provideError=function(decl,error){decl.state=DECL_STATES.NOT_RESOLVED;for(var dependent,i=0;dependent=decl.dependents[i++];)dependent(null,error);decl.dependents=[]};return{create:create,define:define,require:require,getState:getState,isDefined:isDefined,setOptions:setOptions,getStat:getStat}},onError=function(e){nextTick(function(){throw e})},buildModuleNotFoundError=function(name,decl){return Error(decl?'Module "'+decl.name+'": can\'t resolve dependence "'+name+'"':'Required module "'+name+"\" can't be resolved")},buildCircularDependenceError=function(decl,path){for(var pathDecl,strPath=[],i=0;pathDecl=path[i++];)strPath.push(pathDecl.name);return strPath.push(decl.name),Error('Circular dependence has been detected: "'+strPath.join(" -> ")+'"')},buildDeclAreadyProvidedError=function(decl){return Error('Declaration of module "'+decl.name+'" has already been provided')},buildMultipleDeclarationError=function(decl){return Error('Multiple declarations of module "'+decl.name+'" have been detected')},isDependenceCircular=function(decl,path){for(var pathDecl,i=0;pathDecl=path[i++];)if(decl===pathDecl)return!0;return!1},nextTick=function(){var fns=[],enqueueFn=function(fn){return 1===fns.push(fn)},callFns=function(){var fnsToCall=fns,i=0,len=fns.length;for(fns=[];i<len;)fnsToCall[i++]()};if("object"==typeof process&&process.nextTick)return function(fn){enqueueFn(fn)&&process.nextTick(callFns)};if(global.setImmediate)return function(fn){enqueueFn(fn)&&global.setImmediate(callFns)};if(global.postMessage&&!global.opera){var isPostMessageAsync=!0;if(global.attachEvent){var checkAsync=function(){isPostMessageAsync=!1};global.attachEvent("onmessage",checkAsync),global.postMessage("__checkAsync","*"),global.detachEvent("onmessage",checkAsync)}if(isPostMessageAsync){var msg="__modules"+ +new Date,onMessage=function(e){e.data===msg&&(e.stopPropagation&&e.stopPropagation(),callFns())};return global.addEventListener?global.addEventListener("message",onMessage,!0):global.attachEvent("onmessage",onMessage),function(fn){enqueueFn(fn)&&global.postMessage(msg,"*")}}}var doc=global.document;if("onreadystatechange"in doc.createElement("script")){var head=doc.getElementsByTagName("head")[0],createScript=function(){var script=doc.createElement("script");script.onreadystatechange=function(){script.parentNode.removeChild(script),script=script.onreadystatechange=null,callFns()},head.appendChild(script)};return function(fn){enqueueFn(fn)&&createScript()}}return function(fn){enqueueFn(fn)&&setTimeout(callFns,0)}}();"object"==typeof exports?module.exports=create():global.modules=create()}("undefined"!=typeof window?window:global),function(global){function initialize(){global.shower.modules.require("shower.defaultOptions",function(defaultOptions){var hasOptions=global.hasOwnProperty("showerOptions"),options=global.shower.options,containerSelector=options.shower_selector||defaultOptions.container_selector,element=document.querySelector(containerSelector),getDataAttr=getData.bind(this,element),autoInit="undefined"==typeof options.auto_init||options.auto_init;if(!element)throw new Error("Shower element with selector "+containerSelector+" not found.");("false"!==getDataAttr("auto-init")||hasOptions&&autoInit)&&(hasOptions||dataAttrsOptions.forEach(function(name){var value=getDataAttr(name);null!==value&&"undefined"!=typeof value&&(options[name.replace(/-/g,"_")]=value)}),global.shower.modules.require(["shower"],function(sh){sh.init({container:element,options:options})}))})}function getData(element,name){return element.dataset?element.dataset[name]:element.getAttribute("data-"+name)}var dataAttrsOptions=["debug-mode","slides-selector","hotkeys"];global.shower={modules:modules.create(),options:global.showerOptions||{}},/interactive|complete|loaded/.test(document.readyState)?initialize():document.addEventListener("DOMContentLoaded",initialize)}(window),shower.modules.define("shower",["shower.global"],function(provide,showerGlobal){provide(showerGlobal)}),shower.modules.define("Emitter",["emitter.Event","emitter.EventGroup","util.extend"],function(provide,EmitterEvent,EventGroup,extend){function EventEmitter(parameters){parameters=parameters||{},this._context=parameters.context,this._parent=parameters.parent,this._listeners={}}function sortByPriority(aListener,bListener){return aListener.priority-bListener.priority}extend(EventEmitter.prototype,{on:function(types,callback,context,priority){if("undefined"==typeof callback)throw new Error("Callback is not defined.");if(priority=priority||0,"string"==typeof types)this._addListener(types,callback,context,priority);else for(var i=0,l=types.length;i<l;i++)this._addListener(types[i],callback,context,priority);return this},off:function(types,callback,context,priority){if(priority=priority||0,"string"==typeof types)this._removeListener(types,callback,context,priority);else for(var i=0,l=types.length;i<l;i++)this._removeListener(types[i],callback,context,priority);return this},once:function(eventType,callback,context,priority){var handler=function(event){this.off(eventType,handler,this,priority),context?callback.call(context,event):callback(event)};return this.on(eventType,handler,this,priority),this},emit:function(eventType,eventObject){var event=eventObject,listeners=this._listeners;event&&"function"==typeof event.get||(event=this.createEventObject(eventType,eventObject,this._context)),event.isPropagationStopped()||(listeners.hasOwnProperty(eventType)&&this._callListeners(listeners[eventType],event),this._parent&&!event.isPropagationStopped()&&this._parent.emit(eventType,event))},createEventObject:function(type,eventData,target){var data={target:target,type:type};return new EmitterEvent(eventData?extend(data,eventData):data)},setParent:function(parent){this._parent!=parent&&(this._parent=parent)},getParent:function(){return this._parent},group:function(){return new EventGroup(this)},_addListener:function(eventType,callback,context,priority){var listener={callback:callback,context:context,priority:priority};this._listeners[eventType]?this._listeners[eventType].push(listener):this._listeners[eventType]=[listener]},_removeListener:function(eventType,callback,context,priority){var listener,listeners=this._listeners[eventType];if(listeners){for(var foundIndex=-1,i=0,l=listeners.length;i<l;i++)listener=listeners[i],listener.callback==callback&&listener.context==context&&listener.priority==priority&&(foundIndex=i);foundIndex!=-1&&(1==listeners.length?this._clearType(eventType):listeners.splice(foundIndex,1))}},_clearType:function(eventType){this._listeners.hasOwnProperty(eventType)&&delete this._listeners[eventType]},_callListeners:function(listeners,event){var i=listeners.length-1;for(listeners.sort(sortByPriority);i>=0&&!event.defaultPrevented();){var listener=listeners[i];listener&&(listener.context?listener.callback.call(listener.context,event):listener.callback(event)),i--}}}),provide(EventEmitter)}),shower.modules.define("emitter.Event",["util.extend"],function(provide,extend){function Event(data){this._data=data,this._preventDefault=!1,this._stopPropagation=!1}extend(Event.prototype,{get:function(key){return this._data[key]},preventDefault:function(){return this._preventDefault=!0,this._preventDefault},defaultPrevented:function(){return this._preventDefault},stopPropagation:function(){return this._stopPropagation=!0,this._stopPropagation},isPropagationStopped:function(){return this._stopPropagation}}),provide(Event)}),shower.modules.define("emitter.EventGroup",["util.extend"],function(provide,extend){function EventGroup(eventManager){this.events=eventManager,this._listeners=[]}extend(EventGroup.prototype,{on:function(types,callback,context){if(Array.isArray(types))for(var i=0,k=types.length;i<k;i++)this._listeners.push(types[i],callback,context);else this._listeners.push(types,callback,context);return this.events.on(types,callback,context),this},off:function(types,callback,context){if(Array.isArray(types))for(var i=0,k=types.length;i<k;i++)this._removeListener(types[i],callback,context);else this._removeListener(types,callback,context);return this},offAll:function(){for(var i=0,k=this._listeners.length;i<k;i+=3)this.events.off(this._listeners[i],this._listeners[i+1],this._listeners[i+2]);return this._listeners.length=0,this},_removeListener:function(type,callback,context){for(var index=this._listeners.indexOf(type,0);index!=-1;)this._listeners[index+1]==callback&&this._listeners[index+2]==context&&(this._listeners.splice(index,3),this.events.off(type,callback,context)),index=this._listeners.indexOf(type,index)}}),provide(EventGroup)}),shower.modules.define("Plugins",["Emitter","util.extend"],function(provide,EventEmitter,extend){function Plugins(showerGlobal){this.events=new EventEmitter({context:this}),this._showerGlobal=showerGlobal,this._showerInstances=showerGlobal.getInited(),this._plugins={},this._instances=[],showerGlobal.events.on("init",this._onShowerInit,this)}extend(Plugins.prototype,{destroy:function(){this._showerGlobal.events.off("init",this._onShowerInit,this),this._plugins=null},add:function(name,options){if(this._plugins.hasOwnProperty(name))throw new Error("Plugin "+name+" already exist.");return this._requireAndAdd({name:name,options:options}),this},remove:function(name){if(!this._plugins.hasOwnProperty(name))throw new Error("Plugin "+name+" not found.");return delete this._plugins[name],this.events.emit("remove",{name:name}),this},get:function(name,shower){var pluginInstance,plugin=this._plugins[name];if(plugin&&shower)for(var i=0,l=this._instances.length;i<l;i++){var instanceInfo=this._instances[i];instanceInfo.plugin.name===name&&instanceInfo.shower===shower&&(pluginInstance=instanceInfo.instance)}return pluginInstance},_requireAndAdd:function(plugin){shower.modules.require(plugin.name,function(pluginClass){plugin.class=pluginClass,this._plugins[plugin.name]=plugin,this._instancePlugin(plugin)}.bind(this))},_instancePlugin:function(plugin){this._showerInstances.forEach(function(shower){this._instance(plugin,shower)},this),this.events.emit("add",{name:plugin.name})},_instanceFor:function(shower){for(var name in this._plugins)this._plugins.hasOwnProperty(name)&&this._instance(this._plugins[name],shower)},_instance:function(plugin,shower){var options=plugin.options||shower.options.get("plugin_"+plugin.name);this._instances.push({shower:shower,plugin:plugin,instance:new plugin.class(shower,options)})},_onShowerInit:function(event){var shower=event.get("shower");this._instanceFor(shower)}}),provide(Plugins)}),shower.modules.define("shower.global",["Emitter","Plugins"],function(provide,EventEmitter,Plugins){var inited=[],sh={ready:function(callback){return callback&&(inited.length?inited.forEach(callback):this.events.once("init",function(e){callback(e.get("shower"))})),Boolean(inited.length)},init:function(initOptions){initOptions=initOptions||{},shower.modules.require(["Shower"],function(Shower){new Shower(initOptions.container,initOptions.options)})},getInited:function(){return inited.slice()}};sh.events=new EventEmitter({context:sh}),sh.plugins=new Plugins(sh),sh.events.on("notify",function(e){var showerInstance=e.get("shower");inited.push(showerInstance),sh.events.emit("init",e)}),provide(sh)}),shower.modules.define("Options",["Emitter","options.Monitor","util.Store","util.extend","util.inherit"],function(provide,EventEmitter,Monitor,Store,extend,inherit){function Options(initOptions){Options.super.constructor.apply(this,arguments),this.events=new EventEmitter}inherit(Options,Store,{set:function(name,value){var changed=[];if("string"==typeof name)Options.super.set.call(this,name,value),changed.push({name:name,value:value});else{var options=name||{};Object.keys(options).forEach(function(optionName){var optionValue=options[optionName];Options.super.set.call(this,optionName,optionValue),changed.push({name:optionName,value:optionValue})})}return changed.length&&this.events.emit("set",{items:changed}),this},unset:function(name){return Options.super.unset(this,name),this.events.emit("unset",{name:name}),this},getMonitor:function(){return new Monitor(this)}}),provide(Options)}),shower.modules.define("options.Monitor",["util.extend"],function(provide,extend){function Monitor(options){this._options=options,this._optionsEvents=options.events.group().on(["set","unset"],this._onOptionsChange,this),this._fieldsHanders={}}extend(Monitor.prototype,{destroy:function(){this._options=null,this._optionsEvents.offAll(),this._fieldsHanders=null},add:function(field,callback,context){if(Array.prototype.isArray.call(null,field)){var fields=field;for(var fieldName in fields)fields.hasOwnProperty(fieldName)&&this._addHandler(fieldName,callback,context)}else this._addHandler(field,callback,context);return this},remove:function(field,callback,context){if(Array.prototype.isArray.call(null,field)){var fields=field;for(var fieldName in fields)fields.hasOwnProperty(fieldName)&&this._remodeHandler(fieldName,callback,context)}else this._remodeHandler(field,callback,context);return this},getOptions:function(){return this._options},_onOptionsChange:function(event){var fieldsUpdated="unset"===event.get("type")?[event.get("name")]:event.get("items");fieldsUpdated.forEach(function(field){this._fieldsHanders.hasOwnProperty(field)&&this._fieldsHanders[field].forEach(function(handler){handler.callback.call(handler.context,this._options.get(field))})},this)},_addHandler:function(field,callback,context){var handler={callback:callback,context:context};this._fieldsHanders.hasOwnProperty(fieldName)?this._fieldsHanders[fieldName].push(handler):this._fieldsHanders[fieldName]=[handler]},_remodeHandler:function(field,callback,context){if(!this._fieldsHanders.hasOwnProperty(field))throw new Error("Remove undefined handler for "+field+" field");var fieldsHanders=this._fieldsHanders[field],handler=fieldsHanders.filter(function(hander){return hander.callback===callback&&hander.context===context})[0];if(!hander)throw new Error("Hanlder for "+field+" not found.");fieldsHanders.splice(fieldsHanders.indexOf(handler,1))}}),provide(Monitor)}),shower.modules.define("Shower",["Emitter","Options","shower.global","shower.defaultOptions","shower.Container","shower.Player","shower.Location","shower.slidesParser","util.extend"],function(provide,EventEmitter,Options,showerGlobal,defaultShowerOptions,Container,Player,Location,defaultSlidesParser,extend){function Shower(container,options){options=options||{},this.events=new EventEmitter({context:this}),this.options=new Options({},defaultShowerOptions,options);var containerElement=container||this.options.get("container_selector");"string"==typeof containerElement&&(containerElement=document.querySelector(containerElement)),this.player=new Player(this),this.container=new Container(this,containerElement),this._slides=[],this._isHotkeysOn=!0,this._liveRegion=null,this._initSlides(),this._initLiveRegion(),this.options.get("debug_mode")&&(document.body.classList.add(this.options.get("debug_mode_classname")),console.info("Debug mode on")),this.options.get("hotkeys")||this.disableHotkeys(),this.location=new Location(this),showerGlobal.events.emit("notify",{shower:this}),this._playerListeners=this.player.events.group().on("activate",this._onPlayerSlideActivate,this)}extend(Shower.prototype,{destroy:function(){this.events.emit("destroy"),this.location.destroy(),this.container.destroy(),this.player.destroy(),this._slides=[]},add:function(slide){if(Array.isArray.call(null,slide))for(var i=0,k=slide.length;i<k;i++)this._addSlide(slide[i]);else this._addSlide(slide);return this},remove:function(slide){var slidePosition;if("number"==typeof slide)slidePosition=slide;else{if(this._slides.indexOf(slide)==-1)throw new Error("Slide not found");slidePosition=this._slides.indexOf(slide)}return slide=this._slides.splice(slidePosition,1)[0],this.events.emit("slideremove",{slide:slide}),slide.destroy(),this},get:function(index){return this._slides[index]},getSlides:function(){return this._slides.slice()},getSlidesCount:function(){return this._slides.length},getSlideIndex:function(slide){return this._slides.indexOf(slide)},disableHotkeys:function(){return this._isHotkeysOn=!1,this},enableHotkeys:function(){return this._isHotkeysOn=!0,this},isHotkeysEnabled:function(){return this._isHotkeysOn},getLiveRegion:function(){return this._liveRegion},updateLiveRegion:function(content){return this._liveRegion.innerHTML=content,this},_onPlayerSlideActivate:function(event){var currentSlide=event.get("slide");this.updateLiveRegion(currentSlide.getContent())},_initSlides:function(){var slidesParser=this.options.get("slides_parser")||defaultSlidesParser,slides=slidesParser(this.container.getElement(),this.options.get("slides_selector"));this.add(slides)},_addSlide:function(slide){slide.state.set("index",this._slides.length),this._slides.push(slide),this.events.emit("slideadd",{slide:slide})},_initLiveRegion:function(){var liveRegion=document.createElement("section");liveRegion.setAttribute("role","region"),liveRegion.setAttribute("aria-live","assertive"),liveRegion.setAttribute("aria-relevant","additions"),liveRegion.setAttribute("aria-label","Slide Content: Auto-updating"),liveRegion.className="region",document.body.appendChild(liveRegion),this._liveRegion=liveRegion}}),provide(Shower)}),shower.modules.define("shower.Container",["Emitter","util.bound","util.extend"],function(provide,EventEmitter,bound,extend){function Container(shower,containerElement){this.events=new EventEmitter({context:this,parent:shower.events}),this._shower=shower,this._element=containerElement,this._isSlideMode=!1,this.init()}extend(Container.prototype,{init:function(){var bodyClassList=document.body.classList,showerOptions=this._shower.options,fullModeClass=showerOptions.get("mode_full_classname"),listModeClass=showerOptions.get("mode_list_classname");bodyClassList.contains(listModeClass)||bodyClassList.contains(fullModeClass)||bodyClassList.add(listModeClass),this._setupListeners()},destroy:function(){this._clearListeners(),this._element=null,this._shower=null,this._isSlideMode=null},getElement:function(){return this._element},enterSlideMode:function(){var bodyClassList=document.body.classList,showerOptions=this._shower.options;return bodyClassList.remove(showerOptions.get("mode_list_classname")),bodyClassList.add(showerOptions.get("mode_full_classname")),document.body.setAttribute("role","application"),this._applyTransform(this._getTransformScale()),this._isSlideMode=!0,this.events.emit("slidemodeenter"),this},exitSlideMode:function(){var elementClassList=document.body.classList,showerOptions=this._shower.options;return elementClassList.remove(showerOptions.get("mode_full_classname")),elementClassList.add(showerOptions.get("mode_list_classname")),document.body.removeAttribute("role","application"),this._applyTransform("none"),this._isSlideMode=!1,this.scrollToCurrentSlide(),this.events.emit("slidemodeexit"),this},isSlideMode:function(){return this._isSlideMode},scrollToCurrentSlide:function(){var activeSlideClassName=this._shower.options.get("slide_active_classname"),slideElement=this._element.querySelector("."+activeSlideClassName);return slideElement&&window.scrollTo(0,slideElement.offsetTop),this},_setupListeners:function(){this._showerListeners=this._shower.events.group().on("slideadd",this._onSlideAdd,this).on("slideremove",this._onSlideRemove,this),window.addEventListener("resize",bound(this,"_onResize")),document.addEventListener("keydown",bound(this,"_onKeyDown"))},_clearListeners:function(){this._showerListeners.offAll(),window.removeEventListener("resize",bound(this,"_onResize")),document.removeEventListener("keydown",bound(this,"_onKeyDown"))},_getTransformScale:function(){var denominator=Math.max(document.body.clientWidth/window.innerWidth,document.body.clientHeight/window.innerHeight);return"scale("+1/denominator+")"},_applyTransform:function(transformValue){["WebkitTransform","MozTransform","msTransform","OTransform","transform"].forEach(function(property){document.body.style[property]=transformValue})},_onResize:function(){this.isSlideMode()&&this._applyTransform(this._getTransformScale())},_onSlideAdd:function(e){var slide=e.get("slide");slide.events.on("click",this._onSlideClick,this)},_onSlideRemove:function(e){var slide=e.get("slide");slide.events.off("click",this._onSlideClick,this)},_onSlideClick:function(){this._isSlideMode||this.enterSlideMode()},_onKeyDown:function(e){if(this._shower.isHotkeysEnabled())switch(e.which){case 13:if(e.preventDefault(),!this.isSlideMode()&&e.metaKey){var slideNumber=e.shiftKey?0:this._shower.player.getCurrentSlideIndex();this._shower.player.go(slideNumber),this.enterSlideMode()}else e.shiftKey?this._shower.player.prev():this._shower.player.next();break;case 27:e.preventDefault(),this.exitSlideMode();break;case 116:if(!this.isSlideMode()&&e.shiftKey){e.preventDefault();var slideNumber=this._shower.player.getCurrentSlideIndex();this._shower.player.go(slideNumber),this.enterSlideMode()}break;case 80:!this.isSlideMode()&&e.altKey&&e.metaKey&&(e.preventDefault(),this.enterSlideMode())}}}),provide(Container)}),shower.modules.define("shower.Location",["util.SessionStore","util.bound","util.extend"],function(provide,SessionStore,bound,extend){function Location(shower){this._shower=shower;var sessionStoreKey=shower.options.get("sessionstore_key")+"-shower.Location";this.state=new SessionStore(sessionStoreKey,{isSlideMode:!1}),this._showerListeners=null,this._playerListeners=null,this._documentTitle=document.title,this._popStateProcess=null,this._setupListeners(),this._init()}extend(Location.prototype,{destroy:function(){this._clearListeners()},save:function(){this.state.set("isSlideMode",this._isSlideMode())},_init:function(){var slideInfo,shower=this._shower,currentSlideId=window.location.hash.substr(1),slideModeClass=shower.options.get("mode_full_classname");window.location.hash="",(this.state.get("isSlideMode")||document.body.classList.contains(slideModeClass))&&shower.container.enterSlideMode(),""!==currentSlideId&&(slideInfo=this._getSlideById(currentSlideId),shower.player.go("undefined"!=typeof slideInfo.index?slideInfo.index:0))},_setupListeners:function(){var shower=this._shower;this._playerListeners=shower.player.events.group().on("activate",this._onSlideActivate,this),this._containerListener=shower.container.events.group().on(["slidemodeenter","slidemodeexit"],this._onContainerSlideModeChange,this),window.addEventListener("popstate",bound(this,"_onPopstate"))},_clearListeners:function(){window.removeEventListener("popstate",bound(this,"_onPopstate")),this._playerListeners.offAll(),this._containerListener.offAll()},_getSlideById:function(slideId){for(var slide,index,slides=this._shower.getSlides(),i=slides.length-1;i>=0;i--)if(slides[i].getId()===slideId){slide=slides[i],index=i;break}return{slide:slide,index:index}},_onSlideActivate:function(e){window.location.hash=e.get("slide").getId(),this._setTitle()},_onContainerSlideModeChange:function(){this._setTitle(),this.save()},_isSlideMode:function(){return this._shower.container.isSlideMode()},_onPopstate:function(){var slideInfo,shower=this._shower,slideId=window.location.hash.substr(1),currentSlide=shower.player.getCurrentSlide(),currentSlideNumber=shower.player.getCurrentSlideIndex();this._isSlideMode()&¤tSlideNumber===-1?shower.player.go(0):currentSlideNumber===-1&&""!==window.location.hash&&shower.player.go(0),currentSlide&&slideId!==currentSlide.getId()&&(slideInfo=this._getSlideById(slideId),shower.player.go(slideInfo.index))},_setTitle:function(){var title=document.title,isSlideMode=this._isSlideMode(),currentSlide=this._shower.player.getCurrentSlide();if(isSlideMode&¤tSlide){var slideTitle=currentSlide.getTitle();document.title=slideTitle?slideTitle+" — "+this._documentTitle:this._documentTitle}else this._documentTitle!==title&&(document.title=this._documentTitle)}}),provide(Location)}),shower.modules.define("shower.Player",["Emitter","util.bound","util.extend"],function(provide,EventEmitter,bound,extend){function Player(shower){this.events=new EventEmitter({context:this,parent:shower.events}),this._shower=shower,this._showerListeners=null,this._playerListeners=null,this._currentSlideNumber=-1,this._currentSlide=null,this.init()}extend(Player.prototype,{init:function(){this._showerListeners=this._shower.events.group().on("slideadd",this._onSlideAdd,this).on("slideremove",this._onSlideRemove,this).on("slidemodeenter",this._onSlideModeEnter,this),this._playerListeners=this.events.group().on("prev",this._onPrev,this).on("next",this._onNext,this).on("prevslide",this._onPrev,this).on("nextslide",this._onNext,this),document.addEventListener("keydown",bound(this,"_onKeyDown"))},destroy:function(){this._showerListeners.offAll(),this._playerListeners.offAll(),document.removeEventListener("keydown",bound(this,"_onKeyDown")),this._currentSlide=null,this._currentSlideNumber=null,this._shower=null},next:function(){return this.events.emit("next"),this},prev:function(){return this.events.emit("prev"),this},nextSlide:function(){return this.events.emit("nextslide"),this},prevSlide:function(){return this.events.emit("prevslide"),this},first:function(){return this.go(0),this},last:function(){return this.go(this._shower.getSlidesCount()-1),this},go:function(index){"number"!=typeof index&&(index=this._shower.getSlideIndex(index));var slidesCount=this._shower.getSlidesCount(),currentSlide=this._currentSlide;return index!=this._currentSlideNumber&&index<slidesCount&&index>=0&&(currentSlide&¤tSlide.isActive()&¤tSlide.deactivate(),currentSlide=this._shower.get(index),this._currentSlide=currentSlide,this._currentSlideNumber=index,currentSlide.isActive()||currentSlide.activate(),this.events.emit("activate",{index:index,slide:currentSlide})),this},getCurrentSlide:function(){return this._currentSlide},getCurrentSlideIndex:function(){return this._currentSlideNumber},_onPrev:function(){this._changeSlide(this._currentSlideNumber-1)},_onNext:function(){this._changeSlide(this._currentSlideNumber+1)},_changeSlide:function(index){this.go(index)},_onSlideAdd:function(e){var slide=e.get("slide");slide.events.on("activate",this._onSlideActivate,this)},_onSlideRemove:function(e){var slide=e.get("slide");slide.events.off("activate",this._onSlideActivate,this)},_onSlideActivate:function(e){var slide=e.get("slide"),slideNumber=this._shower.getSlideIndex(slide);this.go(slideNumber)},_onKeyDown:function(e){if(this._shower.isHotkeysEnabled()&&!/^(?:button|input|select|textarea)$/i.test(e.target.tagName)){this.events.emit("keydown",{event:e});var action,allowModifiers=!1;switch(e.which){case 33:case 38:case 37:case 72:case 75:case 80:action=e.shiftKey?"prevSlide":"prev";break;case 34:case 40:case 39:case 76:case 74:case 78:action=e.shiftKey?"nextSlide":"next";break;case 36:allowModifiers=!0,action="first";break;case 35:allowModifiers=!0,action="last";break;case 32:this._shower.container.isSlideMode()&&(action=e.shiftKey?"prev":"next")}!action||!allowModifiers&&(e.altKey||e.ctrlKey||e.metaKey)||(e.preventDefault(),this[action]())}},_onSlideModeEnter:function(){this._currentSlide||this.go(0)}}),provide(Player)}),shower.modules.define("shower.defaultOptions",function(provide,slidesParser){provide({container_selector:".shower",debug_mode:!1,debug_mode_classname:"debug",hotkeys:!0,sessionstore_key:"shower",slides_selector:".shower .slide",mode_full_classname:"full",mode_list_classname:"list",slide_title_element_selector:"H2",slide_active_classname:"active",slide_visited_classname:"visited"})}),shower.modules.define("shower.slidesParser",["Slide"],function(provide,Slide){function parse(containerElement,cssSelector){var slidesElements=containerElement.querySelectorAll(cssSelector);return slidesElements=Array.prototype.slice.call(slidesElements),slidesElements.map(function(slideElement,index){var slide=new Slide(slideElement);return slideElement.id||(slideElement.id=index+1),slide})}provide(parse)}),shower.modules.define("Slide",["shower.defaultOptions","Emitter","Options","slide.Layout","slide.layoutFactory","util.Store","util.extend"],function(provide,defaultOptions,EventEmitter,OptionsManager,Layout,slideLayoutFactory,DataStore,extend){function Slide(content,options,state){this.events=new EventEmitter,this.options=new OptionsManager(options),this.layout=null,this.state=new DataStore({visited:0,index:null},state),this._content=content,this._isVisited=this.state.get("visited")>0,this._isActive=!1,this.init()}extend(Slide.prototype,{init:function(){this.layout="string"==typeof this._content?new slideLayoutFactory.createLayout({content:this._content}):new Layout(this._content,this.options),this.layout.setParent(this),
|
8
|
+
this._setupListeners()},destroy:function(){this._clearListeners(),this._isActive=null,this.options=null,this.layout.destroy()},activate:function(){this._isActive=!0;var visited=this.state.get("visited");return this.state.set("visited",++visited),this.events.emit("activate",{slide:this}),this},deactivate:function(){return this._isActive=!1,this.events.emit("deactivate",{slide:this}),this},isActive:function(){return this._isActive},isVisited:function(){return this.state.get("visited")>0},getTitle:function(){return this.layout.getTitle()},setTitle:function(title){return this.layout.setTitle(title),this},getId:function(){return this.layout.getElement().id},getContent:function(){return this.layout.getContent()},_setupListeners:function(){this.layoutListeners=this.layout.events.group().on("click",this._onSlideClick,this)},_clearListeners:function(){this.layoutListeners.offAll()},_onSlideClick:function(){this.activate(),this.events.emit("click",{slide:this})}}),provide(Slide)}),shower.modules.define("slide.Layout",["Options","shower.defaultOptions","Emitter","util.bound","util.extend"],function(provide,OptionsManager,defaultOptions,EventEmitter,bound,extend){function Layout(element,options){this.options=new OptionsManager({title_element_selector:defaultOptions.slide_title_element_selector,active_classname:defaultOptions.slide_active_classname,visited_classname:defaultOptions.slide_visited_classname},options),this.events=new EventEmitter,this._element=element,this._parent=null,this._parentElement=null,this.init()}extend(Layout.prototype,{init:function(){var parentNode=this._element.parentNode;parentNode?this._parentElement=parentNode:this.setParentElement(parentNode)},destroy:function(){this.setParent(null)},setParent:function(parent){this._parent!=parent&&(this._clearListeners(),this._parent=parent,this._parent&&this._setupListeners(),this.events.emit("parentchange",{parent:parent}))},getParent:function(){return this._parent},setParentElement:function(parentElement){parentElement!=this._parentElement&&(this._parentElement=parentElement,parentElement.appendChild(this._element),this.events.emit("parentelementchange",{parentElement:parentElement}))},getParentElement:function(){return this._parentElement},getElement:function(){return this._element},setTitle:function(title){var titleElementSelector=this.options.get("title_element_selector"),titleElement=this._element.querySelector(titleElementSelector);titleElement?titleElement.innerHTML=title:(titleElement=document.createElement(titleElementSelector),titleElement.innerHTML=title,this._element.insertBefore(titleElement,this._element.firstChild))},getTitle:function(){var titleElementSelector=this.options.get("title_element_selector"),titleElement=this._element.querySelector(titleElementSelector);return titleElement?titleElement.textContent:null},getData:function(name){var element=this._element;return element.dataset?element.dataset[name]:element.getAttribute("data-"+name)},getContent:function(){return this._element.innerHTML},_setupListeners:function(){this._slideListeners=this._parent.events.group().on("activate",this._onSlideActivate,this).on("deactivate",this._onSlideDeactivate,this),this._element.addEventListener("click",bound(this,"_onSlideClick"),!1)},_clearListeners:function(){this._slideListeners&&this._slideListeners.offAll(),this._element.removeEventListener("click",bound(this,"_onSlideClick"))},_onSlideActivate:function(){this._element.classList.add(this.options.get("active_classname"))},_onSlideDeactivate:function(){var elementClassList=this._element.classList;elementClassList.remove(this.options.get("active_classname")),elementClassList.add(this.options.get("visited_classname"))},_onSlideClick:function(){this.events.emit("click")}}),provide(Layout)}),shower.modules.define("slide.layoutFactory",["slide.Layout","util.extend"],function(provide,SlideLayout,extend){var layoutFactory={};extend(layoutFactory,{createLayout:function(parameters){parameters=parameters||{};var element=layoutFactory._createElement(extend({content:"",contentType:"slide"},parameters));return new SlideLayout(element)},_createElement:function(options){var element=document.createElement("section");return element.innerHTML=options.content,element.classList.add(options.contentType),element}}),provide(layoutFactory)}),shower.modules.define("util.SessionStore",["util.Store","util.inherit"],function(provide,Store,inherit){function SessionStore(storeKey,initData){this._storageKey=storeKey;var data=this._loadFromStorage()||initData;SessionStore.super.constructor.call(this,data)}inherit(SessionStore,Store,{set:function(key,value){SessionStore.super.set.call(this,key,value),this._saveToStorage()},unset:function(key){SessionStore.super.unset.call(this,key),this._saveToStorage()},_saveToStorage:function(){window.sessionStorage.setItem(this._storageKey,JSON.stringify(this.getAll()))},_loadFromStorage:function(){var store=window.sessionStorage.getItem(this._storageKey);return store&&JSON.parse(store)}}),provide(SessionStore)}),shower.modules.define("util.Store",["util.extend"],function(provide,extend){function Store(initData){this._data=initData||{};for(var i=1,k=arguments.length;i<k;i++)extend(this._data,arguments[i]||{})}extend(Store.prototype,{get:function(key,defaultValue){return this._data.hasOwnProperty(key)?this._data[key]:defaultValue},getAll:function(){return extend({},this._data)},set:function(key,value){return this._data[key]=value,this},unset:function(key){if(!this._data.hasOwnProperty(key))throw new Error(key+" not found.");return delete this._data[key],this},destroy:function(){this._data={}}}),provide(Store)}),shower.modules.define("util.bound",function(provide){function bound(ctx,fn){return ctx["__bound_"+fn]||(ctx["__bound_"+fn]=ctx[fn].bind(ctx))}provide(bound)}),shower.modules.define("util.extend",function(provide){function extend(target){if(!target)throw new Error("util.extend: Target not found");return"undefined"==typeof Object.assign?polyfill.apply(null,arguments):Object.assign.apply(null,arguments)}function polyfill(target){for(var i=1,l=arguments.length;i<l;i++){var obj=arguments[i];for(var property in obj)obj.hasOwnProperty(property)&&(target[property]=obj[property])}return target}provide(extend)}),shower.modules.define("util.inherit",["util.extend"],function(provide,extend){var inherit=function(childClass,parentClass,override){return childClass.prototype=Object.create(parentClass.prototype),childClass.prototype.constructor=childClass,childClass.super=parentClass.prototype,childClass.super.constructor=parentClass,override&&extend(childClass.prototype,override),childClass.prototype};provide(inherit)}),shower.modules.define("shower-next",["shower","Emitter","util.extend"],function(provide,globalShower,EventEmitter,extend){function Next(shower,options){options=options||{},this.events=new EventEmitter({context:this}),this._shower=shower,this._elementsSelector=options.selector||DEFAULT_SELECTOR,this._elements=[],this._innerComplete=0,this._setupListeners(),this._shower.player.getCurrentSlideIndex()!=-1&&this._onSlideActivate()}var TIMER_PLUGIN_NAME="shower-timer",DEFAULT_SELECTOR=".next";extend(Next.prototype,{destroy:function(){this._clearListeners(),this._elements=null,this._elementsSelector=null,this._innerComplete=null,this._shower=null},next:function(){if(!this._elements.length)throw new Error("Inner nav elements not found.");return this._innerComplete++,this._go(),this.events.emit("next"),this},prev:function(){if(!this._elements.length)throw new Error("Inner nav elements not found.");return this._innerComplete--,this._go(),this.events.emit("prev"),this},getLength:function(){return this._elements=this._getElements(),this._elements.length},getComplete:function(){return this._innerComplete},_setupListeners:function(){var shower=this._shower;this._showerListeners=shower.events.group().on("destroy",this.destroy,this),this._playerListeners=shower.player.events.group().on("activate",this._onSlideActivate,this).on("next",this._onNext,this).on("prev",this._onPrev,this);var timerPlugin=globalShower.plugins.get(TIMER_PLUGIN_NAME,shower);timerPlugin?this._setupTimerPluginListener(timerPlugin):this._pluginsListeners=globalShower.plugins.events.group().on("add",function(e){e.get("name")===TIMER_PLUGIN_NAME&&(this._setupTimerPluginListener(),this._pluginsListeners.offAll())},this)},_setupTimerPluginListener:function(plugin){if(!plugin){globalShower.plugins.get(TIMER_PLUGIN_NAME,this._shower)}plugin.events.on("next",this._onNext,this,100)},_clearListeners:function(){this._showerListeners.offAll(),this._playerListeners.offAll(),this._pluginsListeners&&this._pluginsListeners.offAll()},_getElements:function(){var slideLayout=this._shower.player.getCurrentSlide().layout,slideElement=slideLayout.getElement();return Array.prototype.slice.call(slideElement.querySelectorAll(this._elementsSelector))},_onNext:function(e){var elementsLength=this._elements.length,isSlideMode=this._shower.container.isSlideMode();isSlideMode&&elementsLength&&this._innerComplete<elementsLength&&(e.preventDefault(),this.next())},_onPrev:function(e){var elementsLength=this._elements.length,completed=(this._shower.container.isSlideMode(),this._innerComplete);elementsLength&&completed<elementsLength&&completed>0&&(e.preventDefault(),this.prev())},_go:function(){for(var i=0,k=this._elements.length;i<k;i++){var element=this._elements[i];i<this._innerComplete?element.classList.add("active"):element.classList.remove("active")}},_onSlideActivate:function(){this._elements=this._getElements(),this._innerComplete=this._getInnerComplete()},_getInnerComplete:function(){return this._elements.filter(function(element){return element.classList.contains("active")}).length}}),provide(Next)}),shower.modules.require(["shower"],function(sh){sh.plugins.add("shower-next")}),shower.modules.define("shower-progress",["util.extend"],function(provide,extend){function Progress(shower,options){options=options||{},this._shower=shower,this._playerListeners=null,this._element=null,this._elementSelector=options.selector||".progress";var showerContainerElement=this._shower.container.getElement();this._element=showerContainerElement.querySelector(this._elementSelector),this._element&&(this._setupListeners(),this._element.setAttribute("role","progressbar"),this._element.setAttribute("aria-valuemin","0"),this._element.setAttribute("aria-valuemax","100"),this.updateProgress())}extend(Progress.prototype,{destroy:function(){this._clearListeners(),this._shower=null},updateProgress:function(){var slidesCount=this._shower.getSlidesCount(),currentSlideNumber=this._shower.player.getCurrentSlideIndex(),currentProgressValue=100/(slidesCount-1)*currentSlideNumber;this._element&&(this._element.style.width=currentProgressValue.toFixed(2)+"%",this._element.setAttribute("aria-valuenow",currentProgressValue.toFixed()),this._element.setAttribute("aria-valuetext","Slideshow Progress: "+currentProgressValue.toFixed()+"%"))},_setupListeners:function(){var shower=this._shower;this._showerListeners=shower.events.group().on("destroy",this.destroy,this),this._playerListeners=shower.player.events.group().on("activate",this._onSlideChange,this)},_clearListeners:function(){this._showerListeners&&this._showerListeners.offAll(),this._playerListeners&&this._playerListeners.offAll()},_onSlideChange:function(){this.updateProgress()}}),provide(Progress)}),shower.modules.require(["shower"],function(sh){sh.plugins.add("shower-progress")}),shower.modules.define("shower-timer",["shower","Emitter","util.extend"],function(provide,showerGlobal,EventEmitter,extend){function Timer(shower){this.events=new EventEmitter,this._shower=shower,this._timer=null,this._showerListeners=null,this._playerListeners=null,this._pluginsListeners=null,this._setupListeners()}var PLUGIN_NAME_NEXT="shower-next";extend(Timer.prototype,{destroy:function(){this._clearTimer(),this._clearListeners(),this._shower=null},run:function(timing){this._initTimer(timing)},stop:function(){this._clearTimer()},_setupListeners:function(){var shower=this._shower;this.events.on("next",this._onNext,this),this._showerListeners=shower.events.group().on("destroy",this.destroy,this),this._playerListeners=shower.player.events.group().on("keydown",this._clearTimer,this).on("activate",this._onSlideActivate,this),this._nextPlugin=showerGlobal.plugins.get(PLUGIN_NAME_NEXT,shower),this._nextPlugin||(this._pluginsListeners=shower.plugins.events.group().on("pluginadd",function(e){e.get("name")===PLUGIN_NAME_NEXT&&(this._nextPlugin=shower.plugins.get(PLUGIN_NAME_NEXT),this._pluginsListeners.offAll())},this)),shower.player.getCurrentSlideIndex()!=-1&&this._onSlideActivate()},_clearListeners:function(){this._showerListeners.offAll(),this._playerListeners.offAll()},_onSlideActivate:function(){this._clearTimer();var currentSlide=this._shower.player.getCurrentSlide();if(this._shower.container.isSlideMode()&¤tSlide.state.get("visited")<2){var timing=currentSlide.layout.getData("timing");timing&&/^(\d{1,2}:)?\d{1,3}$/.test(timing)&&(timing.indexOf(":")!==-1?(timing=timing.split(":"),timing=1e3*(60*parseInt(timing[0],10)+parseInt(timing[1],10))):timing=1e3*parseInt(timing,10),0!==timing&&this._initTimer(timing))}},_initTimer:function(timing){var events=this.events,nextPlugin=(this._shower,this._nextPlugin);nextPlugin&&nextPlugin.getLength()&&nextPlugin.getLength()!=nextPlugin.getComplete()&&(timing/=nextPlugin.getLength()+1),this._timer=setInterval(function(){events.emit("next")},timing)},_clearTimer:function(){this._timer&&(clearInterval(this._timer),this._timer=null)},_onNext:function(){this._clearTimer(),this._shower.player.next()}}),provide(Timer)}),shower.modules.require(["shower"],function(sh){sh.plugins.add("shower-timer")}),shower.modules.define("shower-touch",["util.extend"],function(provide,extend){function Touch(shower,options){options=options||{},this._shower=shower,this._setupListeners()}var INTERACTIVE_ELEMENTS=["VIDEO","AUDIO","A","BUTTON","INPUT"];extend(Touch.prototype,{destroy:function(){this._clearListeners(),this._shower=null},_setupListeners:function(){var shower=this._shower;this._showerListeners=shower.events.group().on("add",this._onSlideAdd,this),this._bindedTouchStart=this._onTouchStart.bind(this),this._bindedTouchMove=this._onTouchMove.bind(this),this._shower.getSlides().forEach(this._addTouchStartListener,this),document.addEventListener("touchmove",this._bindedTouchMove,!0)},_clearListeners:function(){this._showerListeners.offAll(),this._shower.getSlides().forEach(this._removeTouchStartListener,this),document.removeEventListener("touchmove",this._bindedTouchMove,!1)},_onSlideAdd:function(event){var slide=event.get("slide");this._addTouchStartListener(slide)},_addTouchStartListener:function(slide){var element=slide.layout.getElement();element.addEventListener("touchstart",this._bindedTouchStart,!1)},_removeTouchStartListener:function(slide){var element=slide.layout.getElement();element.removeEventListener("touchstart",this._bindedTouchStart,!1)},_onTouchStart:function(e){var x,shower=this._shower,isSlideMode=shower.container.isSlideMode(),element=e.target,slide=this._getSlideByElement(e.currentTarget);slide&&(isSlideMode&&!this._isInteractiveElement(element)&&(e.preventDefault(),x=e.touches[0].pageX,x>window.innerWidth/2?shower.player.next():shower.player.prev()),isSlideMode||slide.activate())},_onTouchMove:function(e){this._shower.container.isSlideMode()&&e.preventDefault()},_getSlideByElement:function(element){for(var slides=this._shower.getSlides(),result=null,i=0,k=slides.length;i<k;i++)if(element.id===slides[i].getId()){result=this._shower.get(i);break}return result},_isInteractiveElement:function(element){return INTERACTIVE_ELEMENTS.some(function(elName){return elName===element.tagName})}}),provide(Touch)}),shower.modules.require(["shower"],function(sh){sh.plugins.add("shower-touch")});
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# The MIT License
|
2
|
+
|
3
|
+
Copyright © 2010–2018 Vadim Makeev, http://pepelsbey.net/
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
6
|
+
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
8
|
+
|
9
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
10
|
+
|
11
|
+
---
|
12
|
+
|
13
|
+
# Лицензия MIT
|
14
|
+
|
15
|
+
Copyright © 2010–2018 Вадим Макеев, http://pepelsbey.net/
|
16
|
+
|
17
|
+
Данная лицензия разрешает лицам, получившим копию данного программного обеспечения и сопутствующей документации (в дальнейшем именуемыми «Программное Обеспечение»), безвозмездно использовать Программное Обеспечение без ограничений, включая неограниченное право на использование, копирование, изменение, добавление, публикацию, распространение, сублицензирование и/или продажу копий Программного Обеспечения, также как и лицам, которым предоставляется данное Программное Обеспечение, при соблюдении следующих условий:
|
18
|
+
|
19
|
+
Указанное выше уведомление об авторском праве и данные условия должны быть включены во все копии или значимые части данного Программного Обеспечения.
|
20
|
+
|
21
|
+
ДАННОЕ ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ ПРЕДОСТАВЛЯЕТСЯ «КАК ЕСТЬ», БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ, ЯВНО ВЫРАЖЕННЫХ ИЛИ ПОДРАЗУМЕВАЕМЫХ, ВКЛЮЧАЯ, НО НЕ ОГРАНИЧИВАЯСЬ ГАРАНТИЯМИ ТОВАРНОЙ ПРИГОДНОСТИ, СООТВЕТСТВИЯ ПО ЕГО КОНКРЕТНОМУ НАЗНАЧЕНИЮ И ОТСУТСТВИЯ НАРУШЕНИЙ ПРАВ. НИ В КАКОМ СЛУЧАЕ АВТОРЫ ИЛИ ПРАВООБЛАДАТЕЛИ НЕ НЕСУТ ОТВЕТСТВЕННОСТИ ПО ИСКАМ О ВОЗМЕЩЕНИИ УЩЕРБА, УБЫТКОВ ИЛИ ДРУГИХ ТРЕБОВАНИЙ ПО ДЕЙСТВУЮЩИМ КОНТРАКТАМ, ДЕЛИКТАМ ИЛИ ИНОМУ, ВОЗНИКШИМ ИЗ, ИМЕЮЩИМ ПРИЧИНОЙ ИЛИ СВЯЗАННЫМ С ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ ИЛИ ИСПОЛЬЗОВАНИЕМ ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ ИЛИ ИНЫМИ ДЕЙСТВИЯМИ С ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ.
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# Material theme for Shower [![Build Status](https://travis-ci.org/shower/material.svg?branch=master)](https://travis-ci.org/shower/material)
|
2
|
+
|
3
|
+
![Ribbon screen shot](pictures/canvas.png)
|
4
|
+
|
5
|
+
Default theme for the [Shower](https://github.com/shower/shower/) presentation engine. Doesn’t include engine itself. [See it in action](http://shwr.me/shower/themes/material/). Follow [@shower_me](https://twitter.com/shower_me) for support and updates, [file an issue](https://github.com/shower/shower/issues/new) if you have any.
|
6
|
+
|
7
|
+
## Usage
|
8
|
+
|
9
|
+
Get the Shower template where Material is already included. Download the [template archive](http://shwr.me/shower.zip) or install the package:
|
10
|
+
|
11
|
+
npm install shower
|
12
|
+
|
13
|
+
If you want to install Material separately you can install the package:
|
14
|
+
|
15
|
+
npm install shower-material
|
16
|
+
|
17
|
+
## Features
|
18
|
+
|
19
|
+
All theme’s features are demonstrated in the [index.html](index.html) file, [see it live](https://shwr.me/shower/themes/material/). Use it as a reference while building your presentation. See more detailed [features overview](https://github.com/shower/shower/blob/master/docs/features.md).
|
20
|
+
|
21
|
+
## Ratios
|
22
|
+
|
23
|
+
Material theme supports any slide ratio you want. But it’s optimized for the most common ones: 16×9 and 4×3. It’s 16×9 by default, but you can change it by adjusting `--slide-ratio` property for `.shower`, [see example](https://github.com/shower/ribbon/blob/master/index.html#L10) in `index.html`.
|
24
|
+
|
25
|
+
## Key color
|
26
|
+
|
27
|
+
By default Material theme is green, but you can easily change the key color by adjusting `--color-key` property for `.shower`. You can choose any color you want, just make sure that it’s dark enough for a good contrast. For example, in [Material Color Tool](https://material.io/tools/color/) good colors start at 500 column.
|
28
|
+
|
29
|
+
## PDF
|
30
|
+
|
31
|
+
Ribbon could be exported to PDF by printing it from the list mode in Chrome or Opera browsers. See [printing documentation](https://github.com/shower/shower/blob/master/docs/pdf.md) for more options.
|
32
|
+
|
33
|
+
## Development
|
34
|
+
|
35
|
+
If you want to adjust theme for your needs:
|
36
|
+
|
37
|
+
1. Fork this repository and clone it to your local machine.
|
38
|
+
2. Install dependencies: `npm install`.
|
39
|
+
3. Start a local server with watcher: `npm run dev` or just `gulp` if you have it installed globally.
|
40
|
+
4. Edit your files and see changes in the opened browser.
|
41
|
+
|
42
|
+
To take part in Material development please read [contributing guidelines](CONTRIBUTING.md) first and [file an issue](https://github.com/shower/shower/issues/new) before sending any pull request.
|
43
|
+
|
44
|
+
---
|
45
|
+
Licensed under [MIT License](LICENSE.md).
|
@@ -0,0 +1 @@
|
|
1
|
+
Copyright 2011 Google Inc. All Rights Reserved.
|
@@ -0,0 +1,202 @@
|
|
1
|
+
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
5
|
+
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
+
|
8
|
+
1. Definitions.
|
9
|
+
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
+
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
+
the copyright owner that is granting the License.
|
15
|
+
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
+
other entities that control, are controlled by, or are under common
|
18
|
+
control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
20
|
+
direction or management of such entity, whether by contract or
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
+
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
+
exercising permissions granted by this License.
|
26
|
+
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
28
|
+
including but not limited to software source code, documentation
|
29
|
+
source, and configuration files.
|
30
|
+
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
32
|
+
transformation or translation of a Source form, including but
|
33
|
+
not limited to compiled object code, generated documentation,
|
34
|
+
and conversions to other media types.
|
35
|
+
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
37
|
+
Object form, made available under the License, as indicated by a
|
38
|
+
copyright notice that is included in or attached to the work
|
39
|
+
(an example is provided in the Appendix below).
|
40
|
+
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
+
the Work and Derivative Works thereof.
|
48
|
+
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
50
|
+
the original version of the Work and any modifications or additions
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
+
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
65
|
+
subsequently incorporated within the Work.
|
66
|
+
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
73
|
+
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
+
where such license applies only to those patent claims licensable
|
80
|
+
by such Contributor that are necessarily infringed by their
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
83
|
+
institute patent litigation against any entity (including a
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
86
|
+
or contributory patent infringement, then any patent licenses
|
87
|
+
granted to You under this License for that Work shall terminate
|
88
|
+
as of the date such litigation is filed.
|
89
|
+
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
92
|
+
modifications, and in Source or Object form, provided that You
|
93
|
+
meet the following conditions:
|
94
|
+
|
95
|
+
(a) You must give any other recipients of the Work or
|
96
|
+
Derivative Works a copy of this License; and
|
97
|
+
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
99
|
+
stating that You changed the files; and
|
100
|
+
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
103
|
+
attribution notices from the Source form of the Work,
|
104
|
+
excluding those notices that do not pertain to any part of
|
105
|
+
the Derivative Works; and
|
106
|
+
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
109
|
+
include a readable copy of the attribution notices contained
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
112
|
+
of the following places: within a NOTICE text file distributed
|
113
|
+
as part of the Derivative Works; within the Source form or
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
115
|
+
within a display generated by the Derivative Works, if and
|
116
|
+
wherever such third-party notices normally appear. The contents
|
117
|
+
of the NOTICE file are for informational purposes only and
|
118
|
+
do not modify the License. You may add Your own attribution
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
121
|
+
that such additional attribution notices cannot be construed
|
122
|
+
as modifying the License.
|
123
|
+
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
125
|
+
may provide additional or different license terms and conditions
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
129
|
+
the conditions stated in this License.
|
130
|
+
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
134
|
+
this License, without any additional terms or conditions.
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
+
the terms of any separate license agreement you may have executed
|
137
|
+
with Licensor regarding such Contributions.
|
138
|
+
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
141
|
+
except as required for reasonable and customary use in describing the
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
+
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
153
|
+
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
159
|
+
incidental, or consequential damages of any character arising as a
|
160
|
+
result of this License or out of the use or inability to use the
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
163
|
+
other commercial damages or losses), even if such Contributor
|
164
|
+
has been advised of the possibility of such damages.
|
165
|
+
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
+
or other liability obligations and/or rights consistent with this
|
170
|
+
License. However, in accepting such obligations, You may act only
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
175
|
+
of your accepting any such warranty or additional liability.
|
176
|
+
|
177
|
+
END OF TERMS AND CONDITIONS
|
178
|
+
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
180
|
+
|
181
|
+
To apply the Apache License to your work, attach the following
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
183
|
+
replaced with your own identifying information. (Don't include
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
185
|
+
comment syntax for the file format. We also recommend that a
|
186
|
+
file or class name and description of purpose be included on the
|
187
|
+
same "printed page" as the copyright notice for easier
|
188
|
+
identification within third-party archives.
|
189
|
+
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
191
|
+
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
193
|
+
you may not use this file except in compliance with the License.
|
194
|
+
You may obtain a copy of the License at
|
195
|
+
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
197
|
+
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
201
|
+
See the License for the specific language governing permissions and
|
202
|
+
limitations under the License.
|