hyla 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.adoc +44 -84
- data/bin/hyla +23 -7
- data/data/chm-status-weeks-0601-1001.html +913 -0
- data/documentation/image/access_local_file.png +0 -0
- data/documentation/image/email_send.png +0 -0
- data/{hyla_frog.jpg → documentation/image/hyla_frog.jpg} +0 -0
- data/documentation/introduction.adoc +433 -0
- data/hyla.gemspec +7 -5
- data/lib/hyla.rb +4 -2
- data/lib/hyla/commands/generate.rb +102 -76
- data/lib/hyla/commands/sendmail.rb +97 -0
- data/lib/hyla/commands/watch.rb +6 -4
- data/lib/hyla/configuration.rb +49 -26
- data/lib/hyla/project.rb +1 -1
- data/lib/resources/backends/slim/revealjs/document.html.slim +1 -1
- data/lib/resources/backends/slim/revealjs/section.html.slim +3 -3
- data/lib/resources/revealjs/plugin/notes/notes.html +252 -248
- data/lib/resources/styles/asciidoctor.css +1 -1
- data/lib/resources/styles/colony.css +1 -1
- data/lib/resources/styles/foundation-lime.css +1 -1
- data/lib/resources/styles/foundation-potion.css +1 -1
- data/lib/resources/styles/foundation.css +1 -1
- data/lib/resources/styles/github.css +3 -3
- data/lib/resources/styles/golo.css +3 -3
- data/lib/resources/styles/iconic.css +1 -1
- data/lib/resources/styles/maker.css +2 -2
- data/lib/resources/styles/readthedocs.css +1 -1
- data/lib/resources/styles/redhat.css +1 -654
- data/lib/resources/styles/riak.css +1 -1
- data/lib/resources/styles/rocket-panda.css +1 -1
- data/lib/resources/styles/rubygems.css +1 -1
- data/lib/templates/_config.yml +2 -2
- data/lib/templates/sample/slideshow_revealjs.adoc +240 -6
- metadata +79 -18
- data/Gemfile.lock +0 -77
- data/data/generated/A_Introduction_module/1_Chapter.adoc +0 -42
- data/data/generated/A_Introduction_module/2_Chapter.adoc +0 -31
- data/data/generated/A_Introduction_module/3_Chapter.adoc +0 -23
- data/data/generated/A_Introduction_module/A_Introduction_module_AllSlides.index +0 -9
- data/data/generated/B_Instruction_module/1_Chapter.adoc +0 -27
- data/data/generated/B_Instruction_module/B_Instruction_module_AllSlides.index +0 -7
- data/data/generated/C_Installation_module/1_Chapter.adoc +0 -14
- data/data/generated/C_Installation_module/2_Chapter.adoc +0 -17
- data/data/generated/C_Installation_module/C_Installation_module_AllSlides.index +0 -8
- data/data/generated/camel_AllSlides.index +0 -9
- data/lib/templates/book/GemFile +0 -5
- data/scenario.adoc +0 -152
data/lib/hyla/project.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Hyla
|
2
|
-
VERSION = '1.0.
|
2
|
+
VERSION = '1.0.2'
|
3
3
|
DESCRIPTION = 'Asciidoctor Hyla - Command Line tool to create new project, watch modifications, generate content, publish or consult it live !'
|
4
4
|
SUMMARY = 'Asciidoctor Hyla - builder/generator of HTML5, slideshow. Watch modifications, generate content, publish or consult it live !'
|
5
5
|
end
|
@@ -14,7 +14,7 @@ html lang=(attr :lang, 'en' unless attr? :nolang)
|
|
14
14
|
link href="revealjs/css/reveal.min.css" rel="stylesheet"
|
15
15
|
|
16
16
|
- if attr? :revealjs_theme
|
17
|
-
link rel='stylesheet' href='revealjs/css/theme/#{attr :revealjs_theme}.css' id='
|
17
|
+
link rel='stylesheet' href='revealjs/css/theme/#{attr :revealjs_theme}.css' id='theme'
|
18
18
|
- else
|
19
19
|
link rel='stylesheet' href='revealjs/css/theme/default.css' id='default_theme'
|
20
20
|
|
@@ -1,3 +1,3 @@
|
|
1
|
-
section
|
2
|
-
h2
|
3
|
-
=content.chomp
|
1
|
+
section id=@id data-transition=(attr 'data-transition') data-transition-speed=(attr 'data-transition-speed') data-background=(attr 'data-background') data-background-size=(attr 'data-background-size') data-background-repeat=(attr 'data-background-repeat') data-background-transition=(attr 'data-background-transition')
|
2
|
+
h2=title
|
3
|
+
=content.chomp
|
@@ -1,267 +1,271 @@
|
|
1
1
|
<!doctype html>
|
2
2
|
<html lang="en">
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
|
6
|
+
<title>reveal.js - Slide Notes</title>
|
7
|
+
|
8
|
+
<style>
|
9
|
+
body {
|
10
|
+
font-family: Helvetica;
|
11
|
+
}
|
12
|
+
|
13
|
+
#notes {
|
14
|
+
font-size: 18px;
|
15
|
+
width: 640px;
|
16
|
+
margin-top: 5px;
|
17
|
+
clear: left;
|
18
|
+
color: rgb(139,137,137);
|
19
|
+
}
|
20
|
+
|
21
|
+
#wrap-current-slide {
|
22
|
+
width: 640px;
|
23
|
+
height: 512px;
|
24
|
+
float: left;
|
25
|
+
overflow: hidden;
|
26
|
+
}
|
27
|
+
|
28
|
+
#current-slide {
|
29
|
+
width: 1280px;
|
30
|
+
height: 1024px;
|
31
|
+
border: none;
|
32
|
+
|
33
|
+
-webkit-transform-origin: 0 0;
|
34
|
+
-moz-transform-origin: 0 0;
|
35
|
+
-ms-transform-origin: 0 0;
|
36
|
+
-o-transform-origin: 0 0;
|
37
|
+
transform-origin: 0 0;
|
38
|
+
|
39
|
+
-webkit-transform: scale(0.5);
|
40
|
+
-moz-transform: scale(0.5);
|
41
|
+
-ms-transform: scale(0.5);
|
42
|
+
-o-transform: scale(0.5);
|
43
|
+
transform: scale(0.5);
|
44
|
+
}
|
45
|
+
|
46
|
+
#wrap-next-slide {
|
47
|
+
width: 448px;
|
48
|
+
height: 358px;
|
49
|
+
float: left;
|
50
|
+
margin: 0 0 0 10px;
|
51
|
+
overflow: hidden;
|
52
|
+
}
|
53
|
+
|
54
|
+
#next-slide {
|
55
|
+
width: 1280px;
|
56
|
+
height: 1024px;
|
57
|
+
border: none;
|
58
|
+
|
59
|
+
-webkit-transform-origin: 0 0;
|
60
|
+
-moz-transform-origin: 0 0;
|
61
|
+
-ms-transform-origin: 0 0;
|
62
|
+
-o-transform-origin: 0 0;
|
63
|
+
transform-origin: 0 0;
|
64
|
+
|
65
|
+
-webkit-transform: scale(0.35);
|
66
|
+
-moz-transform: scale(0.35);
|
67
|
+
-ms-transform: scale(0.35);
|
68
|
+
-o-transform: scale(0.35);
|
69
|
+
transform: scale(0.35);
|
70
|
+
}
|
71
|
+
|
72
|
+
.slides {
|
73
|
+
position: relative;
|
74
|
+
margin-bottom: 10px;
|
75
|
+
border: 1px solid black;
|
76
|
+
border-radius: 2px;
|
77
|
+
background: rgb(28, 30, 32);
|
78
|
+
}
|
79
|
+
|
80
|
+
.slides span {
|
81
|
+
position: absolute;
|
82
|
+
top: 3px;
|
83
|
+
left: 3px;
|
84
|
+
font-weight: bold;
|
85
|
+
font-size: 14px;
|
86
|
+
color: rgba( 255, 255, 255, 0.9 );
|
87
|
+
}
|
88
|
+
|
89
|
+
.error {
|
90
|
+
font-weight: bold;
|
91
|
+
color: red;
|
92
|
+
font-size: 1.5em;
|
93
|
+
text-align: center;
|
94
|
+
margin-top: 10%;
|
95
|
+
}
|
96
|
+
|
97
|
+
.error code {
|
98
|
+
font-family: monospace;
|
99
|
+
}
|
100
|
+
|
101
|
+
.time {
|
102
|
+
width: 525px;
|
103
|
+
margin: 3px 0 0 10px;
|
104
|
+
float: left;
|
105
|
+
text-align: center;
|
106
|
+
opacity: 0;
|
107
|
+
|
108
|
+
-webkit-transition: opacity 0.4s;
|
109
|
+
-moz-transition: opacity 0.4s;
|
110
|
+
-o-transition: opacity 0.4s;
|
111
|
+
transition: opacity 0.4s;
|
112
|
+
}
|
113
|
+
|
114
|
+
.elapsed, .clock {
|
115
|
+
color: #333;
|
116
|
+
margin: 3px 0 0 20px;
|
117
|
+
font-size: 2em;
|
118
|
+
text-align: center;
|
119
|
+
display: inline-block;
|
120
|
+
padding: 0.5em;
|
121
|
+
background-color: #eee;
|
122
|
+
border-radius: 10px;
|
123
|
+
}
|
124
|
+
|
125
|
+
.elapsed h2, .clock h2 {
|
126
|
+
font-size: 0.8em;
|
127
|
+
line-height: 100%;
|
128
|
+
margin: 0;
|
129
|
+
color: #aaa;
|
130
|
+
}
|
131
|
+
|
132
|
+
.elapsed .mute {
|
133
|
+
color: #ddd;
|
134
|
+
}
|
135
|
+
|
136
|
+
</style>
|
137
|
+
</head>
|
138
|
+
|
139
|
+
<body>
|
140
|
+
|
141
|
+
<script>
|
142
|
+
function getNotesURL( controls ) {
|
143
|
+
return window.opener.location.protocol + '//' + window.opener.location.host + window.opener.location.pathname + '?receiver&controls='+ ( controls || 'false' ) +'&progress=false&overview=false' + window.opener.location.hash;
|
144
|
+
}
|
145
|
+
var notesCurrentSlideURL = getNotesURL( true );
|
146
|
+
var notesNextSlideURL = getNotesURL( false );
|
147
|
+
</script>
|
148
|
+
|
149
|
+
<div id="wrap-current-slide" class="slides">
|
150
|
+
<script>document.write( '<iframe width="1280" height="1024" id="current-slide" src="'+ notesCurrentSlideURL +'"></iframe>' );</script>
|
151
|
+
<span style="color: rgb(255,218,185);">CURRENT:</span>
|
152
|
+
</div>
|
153
|
+
|
154
|
+
<div class="elapsed">
|
155
|
+
<h2>Elapsed</h2>
|
156
|
+
<span id="hours">00</span><span id="minutes">:00</span><span id="seconds">:00</span>
|
157
|
+
</div>
|
158
|
+
|
159
|
+
<div id="notes"></div>
|
160
|
+
<p></p>
|
161
|
+
<hr style="border-color: rgb(139,119,101);"/>
|
162
|
+
|
163
|
+
<div id="wrap-next-slide" class="slides">
|
164
|
+
<script>document.write( '<iframe width="640" height="512" id="next-slide" src="'+ notesNextSlideURL +'"></iframe>' );</script>
|
165
|
+
<span style="color: rgb(210,105,30);">UPCOMING:</span>
|
166
|
+
</div>
|
167
|
+
|
168
|
+
<div class="time">
|
169
|
+
<div class="clock">
|
170
|
+
<h2>Time</h2>
|
171
|
+
<span id="clock">0:00:00 AM</span>
|
172
|
+
</div>
|
173
|
+
</div>
|
174
|
+
|
175
|
+
<script src="../../plugin/markdown/marked.js"></script>
|
176
|
+
<script>
|
177
|
+
|
178
|
+
window.addEventListener( 'load', function() {
|
179
|
+
|
180
|
+
if( window.opener && window.opener.location && window.opener.location.href ) {
|
181
|
+
|
182
|
+
var notes = document.getElementById( 'notes' ),
|
183
|
+
currentSlide = document.getElementById( 'current-slide' ),
|
184
|
+
nextSlide = document.getElementById( 'next-slide' ),
|
185
|
+
silenced = false;
|
186
|
+
|
187
|
+
window.addEventListener( 'message', function( event ) {
|
188
|
+
var data = JSON.parse( event.data );
|
189
|
+
|
190
|
+
// No need for updating the notes in case of fragment changes
|
191
|
+
if ( data.notes !== undefined) {
|
192
|
+
if( data.markdown ) {
|
193
|
+
notes.innerHTML = marked( data.notes );
|
194
|
+
}
|
195
|
+
else {
|
196
|
+
notes.innerHTML = data.notes;
|
197
|
+
}
|
198
|
+
}
|
199
|
+
|
200
|
+
silenced = true;
|
201
|
+
|
202
|
+
// Update the note slides
|
203
|
+
currentSlide.contentWindow.Reveal.slide( data.indexh, data.indexv, data.indexf );
|
204
|
+
nextSlide.contentWindow.Reveal.slide( data.nextindexh, data.nextindexv );
|
205
|
+
|
206
|
+
silenced = false;
|
207
|
+
|
208
|
+
}, false );
|
209
|
+
|
210
|
+
var start = new Date(),
|
211
|
+
timeEl = document.querySelector( '.time' ),
|
212
|
+
clockEl = document.getElementById( 'clock' ),
|
213
|
+
hoursEl = document.getElementById( 'hours' ),
|
214
|
+
minutesEl = document.getElementById( 'minutes' ),
|
215
|
+
secondsEl = document.getElementById( 'seconds' );
|
212
216
|
|
213
|
-
|
214
|
-
|
215
|
-
timeEl.style.opacity = 1;
|
217
|
+
setInterval( function() {
|
216
218
|
|
217
|
-
|
218
|
-
now = new Date();
|
219
|
+
timeEl.style.opacity = 1;
|
219
220
|
|
220
|
-
|
221
|
-
|
222
|
-
minutes = Math.floor( ( diff / ( 1000 * 60 ) ) % 60 );
|
223
|
-
seconds = Math.floor( ( diff / 1000 ) % 60 );
|
221
|
+
var diff, hours, minutes, seconds,
|
222
|
+
now = new Date();
|
224
223
|
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
minutesEl.className = minutes > 0 ? "" : "mute";
|
230
|
-
secondsEl.innerHTML = ":" + zeroPadInteger( seconds );
|
224
|
+
diff = now.getTime() - start.getTime();
|
225
|
+
hours = Math.floor( diff / ( 1000 * 60 * 60 ) );
|
226
|
+
minutes = Math.floor( ( diff / ( 1000 * 60 ) ) % 60 );
|
227
|
+
seconds = Math.floor( ( diff / 1000 ) % 60 );
|
231
228
|
|
232
|
-
|
229
|
+
clockEl.innerHTML = now.toLocaleTimeString();
|
230
|
+
hoursEl.innerHTML = zeroPadInteger( hours );
|
231
|
+
hoursEl.className = hours > 0 ? "" : "mute";
|
232
|
+
minutesEl.innerHTML = ":" + zeroPadInteger( minutes );
|
233
|
+
minutesEl.className = minutes > 0 ? "" : "mute";
|
234
|
+
secondsEl.innerHTML = ":" + zeroPadInteger( seconds );
|
233
235
|
|
234
|
-
|
235
|
-
// the main window
|
236
|
-
function synchronizeMainWindow() {
|
236
|
+
}, 1000 );
|
237
237
|
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
}
|
238
|
+
// Broadcasts the state of the notes window to synchronize
|
239
|
+
// the main window
|
240
|
+
function synchronizeMainWindow() {
|
242
241
|
|
243
|
-
|
242
|
+
if( !silenced ) {
|
243
|
+
var indices = currentSlide.contentWindow.Reveal.getIndices();
|
244
|
+
window.opener.Reveal.slide( indices.h, indices.v, indices.f );
|
245
|
+
}
|
244
246
|
|
245
|
-
|
246
|
-
currentSlide.contentWindow.Reveal.addEventListener( 'slidechanged', synchronizeMainWindow );
|
247
|
-
currentSlide.contentWindow.Reveal.addEventListener( 'fragmentshown', synchronizeMainWindow );
|
248
|
-
currentSlide.contentWindow.Reveal.addEventListener( 'fragmenthidden', synchronizeMainWindow );
|
247
|
+
}
|
249
248
|
|
250
|
-
|
251
|
-
|
249
|
+
// Navigate the main window when the notes slide changes
|
250
|
+
currentSlide.contentWindow.Reveal.addEventListener( 'slidechanged', synchronizeMainWindow );
|
251
|
+
currentSlide.contentWindow.Reveal.addEventListener( 'fragmentshown', synchronizeMainWindow );
|
252
|
+
currentSlide.contentWindow.Reveal.addEventListener( 'fragmenthidden', synchronizeMainWindow );
|
252
253
|
|
253
|
-
|
254
|
+
}
|
255
|
+
else {
|
254
256
|
|
255
|
-
|
257
|
+
document.body.innerHTML = '<p class="error">Unable to access <code>window.opener.location</code>.<br>Make sure the presentation is running on a web server.</p>';
|
256
258
|
|
259
|
+
}
|
257
260
|
|
258
|
-
}, false );
|
259
261
|
|
260
|
-
|
261
|
-
var str = "00" + parseInt( num );
|
262
|
-
return str.substring( str.length - 2 );
|
263
|
-
}
|
262
|
+
}, false );
|
264
263
|
|
265
|
-
|
266
|
-
|
264
|
+
function zeroPadInteger( num ) {
|
265
|
+
var str = "00" + parseInt( num );
|
266
|
+
return str.substring( str.length - 2 );
|
267
|
+
}
|
268
|
+
|
269
|
+
</script>
|
270
|
+
</body>
|
267
271
|
</html>
|