hyla 1.0.7.pre.2 → 1.0.7.pre.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.gitignore +2 -0
- data/README.adoc +2 -2
- data/Rakefile +93 -24
- data/config.yaml +49 -0
- data/documentation/developer.adoc +6 -6
- data/documentation/imgkit.adoc +44 -0
- data/documentation/index.txt +3 -0
- data/documentation/introduction.adoc +8 -335
- data/documentation/prerequisites.adoc +1 -1
- data/documentation/scenario.adoc +320 -0
- data/lib/hyla/commands/generate.rb +11 -2
- data/lib/hyla/configuration.rb +10 -1
- data/lib/hyla/project.rb +1 -1
- data/lib/resources/assets/cover/cover.html +62 -0
- data/lib/resources/assets/cover/cover.png +0 -0
- data/lib/resources/{cover.slim → assets/cover/cover.slim} +0 -0
- data/lib/resources/assets/cover/image/1153872-redhat-backroung.png +0 -0
- data/lib/resources/assets/cover/image/1156515-Logo_RH_RGB_Reverse.png +0 -0
- data/lib/resources/assets/cover/image/1156524-bg_redhat.png +0 -0
- data/lib/resources/assets/cover/new_cover.slim +95 -0
- data/lib/resources/assets/revealjs-redhat/image/1156515-Logo_RH_RGB_Reverse.png +0 -0
- data/lib/resources/assets/revealjs-redhat/image/1156524-bg_redhat.png +0 -0
- data/lib/resources/assets/revealjs-redhat/lib/css/font-awesome-4.3.0.css +2893 -0
- data/lib/resources/assets/revealjs-redhat/lib/css/gpe.css +705 -0
- data/lib/resources/assets/revealjs-redhat/lib/css/offline-v2.css +3646 -0
- data/lib/resources/assets/revealjs-redhat/lib/css/print/paper.css +176 -0
- data/lib/resources/assets/revealjs-redhat/lib/css/print/pdf.css +190 -0
- data/lib/resources/assets/revealjs-redhat/lib/css/theme-output.css +1358 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/font-awesome/FontAwesome.otf +0 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/font-awesome/fontawesome-webfont.eot +0 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/font-awesome/fontawesome-webfont.svg +565 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/font-awesome/fontawesome-webfont.ttf +0 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/font-awesome/fontawesome-webfont.woff +0 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/font-awesome/fontawesome-webfont.woff2 +0 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-bold.eot +0 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-bold.svg +637 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-bold.ttf +0 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-bold.woff +0 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-light.eot +0 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-light.svg +2121 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-light.ttf +0 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-light.woff +0 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-regular.eot +0 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-regular.svg +637 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-regular.ttf +0 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass-regular.woff +0 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass.css +32 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass.css-TODO +12 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass_bold-web.eot +0 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass_bold-web.svg +454 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass_bold-web.ttf +0 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass_bold-web.woff +0 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass_regular-web.eot +0 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass_regular-web.svg +454 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass_regular-web.ttf +0 -0
- data/lib/resources/assets/revealjs-redhat/lib/font/overpass/overpass_regular-web.woff +0 -0
- data/lib/resources/assets/revealjs-redhat/lib/js/head.min.js +131 -0
- data/lib/resources/assets/revealjs-redhat/lib/js/reveal.min.js +1279 -0
- data/lib/resources/assets/revealjs-redhat/lib/plugin/highlight/highlight.js +25 -0
- data/lib/resources/assets/revealjs-redhat/lib/plugin/markdown/markdown.js +320 -0
- data/lib/resources/assets/revealjs-redhat/lib/plugin/markdown/marked.js +37 -0
- data/lib/resources/assets/revealjs-redhat/lib/plugin/notes/notes.html +387 -0
- data/lib/resources/assets/revealjs-redhat/lib/plugin/notes/notes.js +117 -0
- data/lib/resources/assets/revealjs-redhat/lib/plugin/zoom-js/zoom.js +258 -0
- data/lib/resources/assets/revealjs/css/theme/default.css +121 -0
- data/lib/resources/assets/revealjs/css/theme/gpe.css +85 -86
- data/lib/resources/assets/sass/gpe.scss +15 -14
- data/lib/resources/assets/sass/gpe2.scss +598 -0
- data/lib/resources/assets/sass/{_overpass.scss → overpass.scss} +0 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_admonition.html.slim +13 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_audio.html.slim +6 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_colist.html.slim +20 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_dlist.html.slim +53 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_example.html.slim +4 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_floating_title.html.slim +1 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_image.html.slim +15 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_listing.html.slim +31 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_literal.html.slim +4 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_math.html.slim +10 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_olist.html.slim +9 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_open.html.slim +15 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_page_break.html.slim +1 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_paragraph.html.slim +16 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_pass.html.slim +1 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_preamble.html.slim +6 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_quote.html.slim +14 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_ruler.html.slim +1 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_sidebar.html.slim +5 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_table.html.slim +45 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_toc.html.slim +12 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_ulist.html.slim +25 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_verse.html.slim +14 -0
- data/lib/resources/backends/slim/revealjs-redhat/block_video.html.slim +27 -0
- data/lib/resources/backends/slim/revealjs-redhat/document.html.slim +162 -0
- data/lib/resources/backends/slim/revealjs-redhat/embedded.html.slim +9 -0
- data/lib/resources/backends/slim/revealjs-redhat/helpers.rb +8 -0
- data/lib/resources/backends/slim/revealjs-redhat/inline_anchor.html.slim +11 -0
- data/lib/resources/backends/slim/revealjs-redhat/inline_break.html.slim +2 -0
- data/lib/resources/backends/slim/revealjs-redhat/inline_button.html.slim +1 -0
- data/lib/resources/backends/slim/revealjs-redhat/inline_callout.html.slim +7 -0
- data/lib/resources/backends/slim/revealjs-redhat/inline_footnote.html.slim +6 -0
- data/lib/resources/backends/slim/revealjs-redhat/inline_image.html.slim +24 -0
- data/lib/resources/backends/slim/revealjs-redhat/inline_indexterm.html.slim +2 -0
- data/lib/resources/backends/slim/revealjs-redhat/inline_kbd.html.slim +8 -0
- data/lib/resources/backends/slim/revealjs-redhat/inline_menu.html.slim +15 -0
- data/lib/resources/backends/slim/revealjs-redhat/inline_quoted.html.slim +22 -0
- data/lib/resources/backends/slim/revealjs-redhat/section.html.slim +23 -0
- data/lib/resources/backends/slim/revealjs/section.html.slim +2 -2
- data/lib/templates/_config.yaml +28 -8
- data/lib/templates/sample/slideshow_revealjs.adoc +21 -0
- metadata +97 -6
- data/.rakeTasks +0 -7
- data/.travis.yml +0 -10
@@ -0,0 +1,117 @@
|
|
1
|
+
/**
|
2
|
+
* Handles opening of and synchronization with the reveal.js
|
3
|
+
* notes window.
|
4
|
+
*
|
5
|
+
* Handshake process:
|
6
|
+
* 1. This window posts 'connect' to notes window
|
7
|
+
* - Includes URL of presentation to show
|
8
|
+
* 2. Notes window responds with 'connected' when it is available
|
9
|
+
* 3. This window proceeds to send the current presentation state
|
10
|
+
* to the notes window
|
11
|
+
*/
|
12
|
+
var RevealNotes = (function() {
|
13
|
+
|
14
|
+
function openNotes() {
|
15
|
+
var jsFileLocation = document.querySelector('script[src$="notes.js"]').src; // this js file path
|
16
|
+
jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, ''); // the js folder path
|
17
|
+
var notesPopup = window.open( jsFileLocation + 'notes.html', 'reveal.js - Notes', 'width=1100,height=700' );
|
18
|
+
|
19
|
+
/**
|
20
|
+
* Connect to the notes window through a postmessage handshake.
|
21
|
+
* Using postmessage enables us to work in situations where the
|
22
|
+
* origins differ, such as a presentation being opened from the
|
23
|
+
* file system.
|
24
|
+
*/
|
25
|
+
function connect() {
|
26
|
+
// Keep trying to connect until we get a 'connected' message back
|
27
|
+
var connectInterval = setInterval( function() {
|
28
|
+
notesPopup.postMessage( JSON.stringify( {
|
29
|
+
namespace: 'reveal-notes',
|
30
|
+
type: 'connect',
|
31
|
+
url: window.location.protocol + '//' + window.location.host + window.location.pathname,
|
32
|
+
state: Reveal.getState()
|
33
|
+
} ), '*' );
|
34
|
+
}, 500 );
|
35
|
+
|
36
|
+
window.addEventListener( 'message', function( event ) {
|
37
|
+
var data = JSON.parse( event.data );
|
38
|
+
if( data && data.namespace === 'reveal-notes' && data.type === 'connected' ) {
|
39
|
+
clearInterval( connectInterval );
|
40
|
+
onConnected();
|
41
|
+
}
|
42
|
+
} );
|
43
|
+
}
|
44
|
+
|
45
|
+
/**
|
46
|
+
* Posts the current slide data to the notes window
|
47
|
+
*/
|
48
|
+
function post() {
|
49
|
+
|
50
|
+
var slideElement = Reveal.getCurrentSlide(),
|
51
|
+
notesElement = slideElement.querySelector( 'aside.notes' );
|
52
|
+
|
53
|
+
var messageData = {
|
54
|
+
namespace: 'reveal-notes',
|
55
|
+
type: 'state',
|
56
|
+
notes: '',
|
57
|
+
markdown: false,
|
58
|
+
state: Reveal.getState()
|
59
|
+
};
|
60
|
+
|
61
|
+
// Look for notes defined in a slide attribute
|
62
|
+
if( slideElement.hasAttribute( 'data-notes' ) ) {
|
63
|
+
messageData.notes = slideElement.getAttribute( 'data-notes' );
|
64
|
+
}
|
65
|
+
|
66
|
+
// Look for notes defined in an aside element
|
67
|
+
if( notesElement ) {
|
68
|
+
messageData.notes = notesElement.innerHTML;
|
69
|
+
messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string';
|
70
|
+
}
|
71
|
+
|
72
|
+
notesPopup.postMessage( JSON.stringify( messageData ), '*' );
|
73
|
+
|
74
|
+
}
|
75
|
+
|
76
|
+
/**
|
77
|
+
* Called once we have established a connection to the notes
|
78
|
+
* window.
|
79
|
+
*/
|
80
|
+
function onConnected() {
|
81
|
+
|
82
|
+
// Monitor events that trigger a change in state
|
83
|
+
Reveal.addEventListener( 'slidechanged', post );
|
84
|
+
Reveal.addEventListener( 'fragmentshown', post );
|
85
|
+
Reveal.addEventListener( 'fragmenthidden', post );
|
86
|
+
Reveal.addEventListener( 'overviewhidden', post );
|
87
|
+
Reveal.addEventListener( 'overviewshown', post );
|
88
|
+
Reveal.addEventListener( 'paused', post );
|
89
|
+
Reveal.addEventListener( 'resumed', post );
|
90
|
+
|
91
|
+
// Post the initial state
|
92
|
+
post();
|
93
|
+
|
94
|
+
}
|
95
|
+
|
96
|
+
connect();
|
97
|
+
}
|
98
|
+
|
99
|
+
// If the there's a 'notes' query set, open directly
|
100
|
+
if( window.location.search.match( /(\?|\&)notes/gi ) !== null ) {
|
101
|
+
openNotes();
|
102
|
+
}
|
103
|
+
|
104
|
+
// Open the notes when the 's' key is hit
|
105
|
+
document.addEventListener( 'keydown', function( event ) {
|
106
|
+
// Disregard the event if the target is editable or a
|
107
|
+
// modifier is present
|
108
|
+
if ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return;
|
109
|
+
|
110
|
+
if( event.keyCode === 83 ) {
|
111
|
+
event.preventDefault();
|
112
|
+
openNotes();
|
113
|
+
}
|
114
|
+
}, false );
|
115
|
+
|
116
|
+
return { open: openNotes };
|
117
|
+
})();
|
@@ -0,0 +1,258 @@
|
|
1
|
+
// Custom reveal.js integration
|
2
|
+
(function(){
|
3
|
+
var isEnabled = true;
|
4
|
+
|
5
|
+
document.querySelector( '.reveal' ).addEventListener( 'mousedown', function( event ) {
|
6
|
+
var modifier = ( Reveal.getConfig().zoomKey ? Reveal.getConfig().zoomKey : 'alt' ) + 'Key';
|
7
|
+
|
8
|
+
if( event[ modifier ] && isEnabled ) {
|
9
|
+
event.preventDefault();
|
10
|
+
zoom.to({ element: event.target, pan: false });
|
11
|
+
}
|
12
|
+
} );
|
13
|
+
|
14
|
+
Reveal.addEventListener( 'overviewshown', function() { isEnabled = false; } );
|
15
|
+
Reveal.addEventListener( 'overviewhidden', function() { isEnabled = true; } );
|
16
|
+
})();
|
17
|
+
|
18
|
+
/*!
|
19
|
+
* zoom.js 0.2 (modified version for use with reveal.js)
|
20
|
+
* http://lab.hakim.se/zoom-js
|
21
|
+
* MIT licensed
|
22
|
+
*
|
23
|
+
* Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
|
24
|
+
*/
|
25
|
+
var zoom = (function(){
|
26
|
+
|
27
|
+
// The current zoom level (scale)
|
28
|
+
var level = 1;
|
29
|
+
|
30
|
+
// The current mouse position, used for panning
|
31
|
+
var mouseX = 0,
|
32
|
+
mouseY = 0;
|
33
|
+
|
34
|
+
// Timeout before pan is activated
|
35
|
+
var panEngageTimeout = -1,
|
36
|
+
panUpdateInterval = -1;
|
37
|
+
|
38
|
+
var currentOptions = null;
|
39
|
+
|
40
|
+
// Check for transform support so that we can fallback otherwise
|
41
|
+
var supportsTransforms = 'WebkitTransform' in document.body.style ||
|
42
|
+
'MozTransform' in document.body.style ||
|
43
|
+
'msTransform' in document.body.style ||
|
44
|
+
'OTransform' in document.body.style ||
|
45
|
+
'transform' in document.body.style;
|
46
|
+
|
47
|
+
if( supportsTransforms ) {
|
48
|
+
// The easing that will be applied when we zoom in/out
|
49
|
+
document.body.style.transition = 'transform 0.8s ease';
|
50
|
+
document.body.style.OTransition = '-o-transform 0.8s ease';
|
51
|
+
document.body.style.msTransition = '-ms-transform 0.8s ease';
|
52
|
+
document.body.style.MozTransition = '-moz-transform 0.8s ease';
|
53
|
+
document.body.style.WebkitTransition = '-webkit-transform 0.8s ease';
|
54
|
+
}
|
55
|
+
|
56
|
+
// Zoom out if the user hits escape
|
57
|
+
document.addEventListener( 'keyup', function( event ) {
|
58
|
+
if( level !== 1 && event.keyCode === 27 ) {
|
59
|
+
zoom.out();
|
60
|
+
}
|
61
|
+
}, false );
|
62
|
+
|
63
|
+
// Monitor mouse movement for panning
|
64
|
+
document.addEventListener( 'mousemove', function( event ) {
|
65
|
+
if( level !== 1 ) {
|
66
|
+
mouseX = event.clientX;
|
67
|
+
mouseY = event.clientY;
|
68
|
+
}
|
69
|
+
}, false );
|
70
|
+
|
71
|
+
/**
|
72
|
+
* Applies the CSS required to zoom in, prioritizes use of CSS3
|
73
|
+
* transforms but falls back on zoom for IE.
|
74
|
+
*
|
75
|
+
* @param {Number} pageOffsetX
|
76
|
+
* @param {Number} pageOffsetY
|
77
|
+
* @param {Number} elementOffsetX
|
78
|
+
* @param {Number} elementOffsetY
|
79
|
+
* @param {Number} scale
|
80
|
+
*/
|
81
|
+
function magnify( pageOffsetX, pageOffsetY, elementOffsetX, elementOffsetY, scale ) {
|
82
|
+
|
83
|
+
if( supportsTransforms ) {
|
84
|
+
var origin = pageOffsetX +'px '+ pageOffsetY +'px',
|
85
|
+
transform = 'translate('+ -elementOffsetX +'px,'+ -elementOffsetY +'px) scale('+ scale +')';
|
86
|
+
|
87
|
+
document.body.style.transformOrigin = origin;
|
88
|
+
document.body.style.OTransformOrigin = origin;
|
89
|
+
document.body.style.msTransformOrigin = origin;
|
90
|
+
document.body.style.MozTransformOrigin = origin;
|
91
|
+
document.body.style.WebkitTransformOrigin = origin;
|
92
|
+
|
93
|
+
document.body.style.transform = transform;
|
94
|
+
document.body.style.OTransform = transform;
|
95
|
+
document.body.style.msTransform = transform;
|
96
|
+
document.body.style.MozTransform = transform;
|
97
|
+
document.body.style.WebkitTransform = transform;
|
98
|
+
}
|
99
|
+
else {
|
100
|
+
// Reset all values
|
101
|
+
if( scale === 1 ) {
|
102
|
+
document.body.style.position = '';
|
103
|
+
document.body.style.left = '';
|
104
|
+
document.body.style.top = '';
|
105
|
+
document.body.style.width = '';
|
106
|
+
document.body.style.height = '';
|
107
|
+
document.body.style.zoom = '';
|
108
|
+
}
|
109
|
+
// Apply scale
|
110
|
+
else {
|
111
|
+
document.body.style.position = 'relative';
|
112
|
+
document.body.style.left = ( - ( pageOffsetX + elementOffsetX ) / scale ) + 'px';
|
113
|
+
document.body.style.top = ( - ( pageOffsetY + elementOffsetY ) / scale ) + 'px';
|
114
|
+
document.body.style.width = ( scale * 100 ) + '%';
|
115
|
+
document.body.style.height = ( scale * 100 ) + '%';
|
116
|
+
document.body.style.zoom = scale;
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
120
|
+
level = scale;
|
121
|
+
|
122
|
+
if( level !== 1 && document.documentElement.classList ) {
|
123
|
+
document.documentElement.classList.add( 'zoomed' );
|
124
|
+
}
|
125
|
+
else {
|
126
|
+
document.documentElement.classList.remove( 'zoomed' );
|
127
|
+
}
|
128
|
+
}
|
129
|
+
|
130
|
+
/**
|
131
|
+
* Pan the document when the mosue cursor approaches the edges
|
132
|
+
* of the window.
|
133
|
+
*/
|
134
|
+
function pan() {
|
135
|
+
var range = 0.12,
|
136
|
+
rangeX = window.innerWidth * range,
|
137
|
+
rangeY = window.innerHeight * range,
|
138
|
+
scrollOffset = getScrollOffset();
|
139
|
+
|
140
|
+
// Up
|
141
|
+
if( mouseY < rangeY ) {
|
142
|
+
window.scroll( scrollOffset.x, scrollOffset.y - ( 1 - ( mouseY / rangeY ) ) * ( 14 / level ) );
|
143
|
+
}
|
144
|
+
// Down
|
145
|
+
else if( mouseY > window.innerHeight - rangeY ) {
|
146
|
+
window.scroll( scrollOffset.x, scrollOffset.y + ( 1 - ( window.innerHeight - mouseY ) / rangeY ) * ( 14 / level ) );
|
147
|
+
}
|
148
|
+
|
149
|
+
// Left
|
150
|
+
if( mouseX < rangeX ) {
|
151
|
+
window.scroll( scrollOffset.x - ( 1 - ( mouseX / rangeX ) ) * ( 14 / level ), scrollOffset.y );
|
152
|
+
}
|
153
|
+
// Right
|
154
|
+
else if( mouseX > window.innerWidth - rangeX ) {
|
155
|
+
window.scroll( scrollOffset.x + ( 1 - ( window.innerWidth - mouseX ) / rangeX ) * ( 14 / level ), scrollOffset.y );
|
156
|
+
}
|
157
|
+
}
|
158
|
+
|
159
|
+
function getScrollOffset() {
|
160
|
+
return {
|
161
|
+
x: window.scrollX !== undefined ? window.scrollX : window.pageXOffset,
|
162
|
+
y: window.scrollY !== undefined ? window.scrollY : window.pageXYffset
|
163
|
+
}
|
164
|
+
}
|
165
|
+
|
166
|
+
return {
|
167
|
+
/**
|
168
|
+
* Zooms in on either a rectangle or HTML element.
|
169
|
+
*
|
170
|
+
* @param {Object} options
|
171
|
+
* - element: HTML element to zoom in on
|
172
|
+
* OR
|
173
|
+
* - x/y: coordinates in non-transformed space to zoom in on
|
174
|
+
* - width/height: the portion of the screen to zoom in on
|
175
|
+
* - scale: can be used instead of width/height to explicitly set scale
|
176
|
+
*/
|
177
|
+
to: function( options ) {
|
178
|
+
// Due to an implementation limitation we can't zoom in
|
179
|
+
// to another element without zooming out first
|
180
|
+
if( level !== 1 ) {
|
181
|
+
zoom.out();
|
182
|
+
}
|
183
|
+
else {
|
184
|
+
options.x = options.x || 0;
|
185
|
+
options.y = options.y || 0;
|
186
|
+
|
187
|
+
// If an element is set, that takes precedence
|
188
|
+
if( !!options.element ) {
|
189
|
+
// Space around the zoomed in element to leave on screen
|
190
|
+
var padding = 20;
|
191
|
+
|
192
|
+
options.width = options.element.getBoundingClientRect().width + ( padding * 2 );
|
193
|
+
options.height = options.element.getBoundingClientRect().height + ( padding * 2 );
|
194
|
+
options.x = options.element.getBoundingClientRect().left - padding;
|
195
|
+
options.y = options.element.getBoundingClientRect().top - padding;
|
196
|
+
}
|
197
|
+
|
198
|
+
// If width/height values are set, calculate scale from those values
|
199
|
+
if( options.width !== undefined && options.height !== undefined ) {
|
200
|
+
options.scale = Math.max( Math.min( window.innerWidth / options.width, window.innerHeight / options.height ), 1 );
|
201
|
+
}
|
202
|
+
|
203
|
+
if( options.scale > 1 ) {
|
204
|
+
options.x *= options.scale;
|
205
|
+
options.y *= options.scale;
|
206
|
+
|
207
|
+
var scrollOffset = getScrollOffset();
|
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 );
|
214
|
+
|
215
|
+
if( options.pan !== false ) {
|
216
|
+
|
217
|
+
// Wait with engaging panning as it may conflict with the
|
218
|
+
// zoom transition
|
219
|
+
panEngageTimeout = setTimeout( function() {
|
220
|
+
panUpdateInterval = setInterval( pan, 1000 / 60 );
|
221
|
+
}, 800 );
|
222
|
+
|
223
|
+
}
|
224
|
+
}
|
225
|
+
|
226
|
+
currentOptions = options;
|
227
|
+
}
|
228
|
+
},
|
229
|
+
|
230
|
+
/**
|
231
|
+
* Resets the document zoom state to its default.
|
232
|
+
*/
|
233
|
+
out: function() {
|
234
|
+
clearTimeout( panEngageTimeout );
|
235
|
+
clearInterval( panUpdateInterval );
|
236
|
+
|
237
|
+
var scrollOffset = getScrollOffset();
|
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 );
|
244
|
+
|
245
|
+
level = 1;
|
246
|
+
},
|
247
|
+
|
248
|
+
// Alias
|
249
|
+
magnify: function( options ) { this.to( options ) },
|
250
|
+
reset: function() { this.out() },
|
251
|
+
|
252
|
+
zoomLevel: function() {
|
253
|
+
return level;
|
254
|
+
}
|
255
|
+
}
|
256
|
+
|
257
|
+
})();
|
258
|
+
|
@@ -146,3 +146,124 @@ body {
|
|
146
146
|
*********************************************/
|
147
147
|
.reveal .slide-number {
|
148
148
|
color: #13daec; }
|
149
|
+
|
150
|
+
/*******************************************************************
|
151
|
+
* .reveal i must be override in order to be able to use Asciidoctor and
|
152
|
+
* Font Awesome icons for NOTE, WARNING, REMARK, ....
|
153
|
+
*******************************************************************/
|
154
|
+
.reveal i.fa {
|
155
|
+
font-family: 'FontAwesome';
|
156
|
+
font-style: normal;
|
157
|
+
font-size: 100%;
|
158
|
+
}
|
159
|
+
|
160
|
+
/**************************************************************
|
161
|
+
* Admonition Asciidoctor
|
162
|
+
*
|
163
|
+
* Mar 03, CHM: Added
|
164
|
+
**************************************************************/
|
165
|
+
/* line 492, ../gpe.scss */
|
166
|
+
.admonitionblock td.content > .title, .exampleblock > .title, .imageblock > .title, .listingblock > .title, .literalblock > .title, .mathblock > .title, .openblock > .title, .paragraph > .title, .quoteblock > .title, .sidebarblock > .title, .tableblock > .title, .verseblock > .title, .videoblock > .title, .dlist > .title, .olist > .title, .ulist > .title, .qlist > .title, .hdlist > .title {
|
167
|
+
text-align: left;
|
168
|
+
font-weight: bold;
|
169
|
+
}
|
170
|
+
|
171
|
+
/* line 497, ../gpe.scss */
|
172
|
+
.admonitionblock > table {
|
173
|
+
border: 0;
|
174
|
+
background: none;
|
175
|
+
width: 100%;
|
176
|
+
padding: 5px 0px;
|
177
|
+
}
|
178
|
+
|
179
|
+
/* line 504, ../gpe.scss */
|
180
|
+
.admonitionblock > table td.icon {
|
181
|
+
text-align: center;
|
182
|
+
width: 80px;
|
183
|
+
}
|
184
|
+
|
185
|
+
/* line 509, ../gpe.scss */
|
186
|
+
.admonitionblock > table td.icon img {
|
187
|
+
max-width: none;
|
188
|
+
}
|
189
|
+
|
190
|
+
/* line 513, ../gpe.scss */
|
191
|
+
.admonitionblock > table td.icon .title {
|
192
|
+
font-weight: bold;
|
193
|
+
text-transform: uppercase;
|
194
|
+
}
|
195
|
+
|
196
|
+
/* line 518, ../gpe.scss */
|
197
|
+
.admonitionblock > table td.content {
|
198
|
+
padding-left: 1.125em;
|
199
|
+
padding-right: 1.25em;
|
200
|
+
border-left: 1px solid #dddddd;
|
201
|
+
color: #f4f4f4;
|
202
|
+
font-size: 20px;
|
203
|
+
font-style: normal;
|
204
|
+
}
|
205
|
+
|
206
|
+
/* Override the color for the list */
|
207
|
+
/* line 528, ../gpe.scss */
|
208
|
+
.admonitionblock > table td.content ul li, .admonitionblock > table td.content ol li, .admonitionblock > table td.content ol p, .admonitionblock > table td.content ul p {
|
209
|
+
color: #f4f4f4;
|
210
|
+
}
|
211
|
+
|
212
|
+
/* line 532, ../gpe.scss */
|
213
|
+
.admonitionblock > table td.content > :last-child > :last-child {
|
214
|
+
margin-bottom: 0;
|
215
|
+
}
|
216
|
+
|
217
|
+
/* line 536, ../gpe.scss */
|
218
|
+
.admonitionblock > table td.icon {
|
219
|
+
vertical-align: middle;
|
220
|
+
}
|
221
|
+
|
222
|
+
/* line 540, ../gpe.scss */
|
223
|
+
.admonitionblock td.icon [class^="icon-"]:before {
|
224
|
+
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
|
225
|
+
cursor: default;
|
226
|
+
font-style: normal;
|
227
|
+
font-weight: normal;
|
228
|
+
font-family: FontAwesome;
|
229
|
+
text-decoration: inherit;
|
230
|
+
font-size: 46px;
|
231
|
+
padding-right: 0.5em;
|
232
|
+
position: relative;
|
233
|
+
left: 0;
|
234
|
+
top: 5px;
|
235
|
+
}
|
236
|
+
|
237
|
+
/* line 553, ../gpe.scss */
|
238
|
+
.admonitionblock td.icon .icon-note:before {
|
239
|
+
content: "\f05a";
|
240
|
+
color: #005498;
|
241
|
+
color: #003f72;
|
242
|
+
}
|
243
|
+
|
244
|
+
/* line 560, ../gpe.scss */
|
245
|
+
.admonitionblock td.icon .icon-tip:before {
|
246
|
+
content: "\f0eb";
|
247
|
+
text-shadow: 1px 1px 2px rgba(155, 155, 0, 0.8);
|
248
|
+
color: #111;
|
249
|
+
}
|
250
|
+
|
251
|
+
/* Use a more yellow lighter color */
|
252
|
+
/* line 568, ../gpe.scss */
|
253
|
+
.admonitionblock td.icon .icon-warning:before {
|
254
|
+
content: "\f071";
|
255
|
+
color: #bf6900;
|
256
|
+
}
|
257
|
+
|
258
|
+
/* line 574, ../gpe.scss */
|
259
|
+
.admonitionblock td.icon .icon-caution:before {
|
260
|
+
content: "\f06d";
|
261
|
+
color: #bf3400;
|
262
|
+
}
|
263
|
+
|
264
|
+
/* line 580, ../gpe.scss */
|
265
|
+
.admonitionblock td.icon .icon-important:before {
|
266
|
+
content: "\f06a";
|
267
|
+
color: #bf0000;
|
268
|
+
}
|
269
|
+
|