hyla 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +8 -8
  2. data/README.adoc +44 -84
  3. data/bin/hyla +23 -7
  4. data/data/chm-status-weeks-0601-1001.html +913 -0
  5. data/documentation/image/access_local_file.png +0 -0
  6. data/documentation/image/email_send.png +0 -0
  7. data/{hyla_frog.jpg → documentation/image/hyla_frog.jpg} +0 -0
  8. data/documentation/introduction.adoc +433 -0
  9. data/hyla.gemspec +7 -5
  10. data/lib/hyla.rb +4 -2
  11. data/lib/hyla/commands/generate.rb +102 -76
  12. data/lib/hyla/commands/sendmail.rb +97 -0
  13. data/lib/hyla/commands/watch.rb +6 -4
  14. data/lib/hyla/configuration.rb +49 -26
  15. data/lib/hyla/project.rb +1 -1
  16. data/lib/resources/backends/slim/revealjs/document.html.slim +1 -1
  17. data/lib/resources/backends/slim/revealjs/section.html.slim +3 -3
  18. data/lib/resources/revealjs/plugin/notes/notes.html +252 -248
  19. data/lib/resources/styles/asciidoctor.css +1 -1
  20. data/lib/resources/styles/colony.css +1 -1
  21. data/lib/resources/styles/foundation-lime.css +1 -1
  22. data/lib/resources/styles/foundation-potion.css +1 -1
  23. data/lib/resources/styles/foundation.css +1 -1
  24. data/lib/resources/styles/github.css +3 -3
  25. data/lib/resources/styles/golo.css +3 -3
  26. data/lib/resources/styles/iconic.css +1 -1
  27. data/lib/resources/styles/maker.css +2 -2
  28. data/lib/resources/styles/readthedocs.css +1 -1
  29. data/lib/resources/styles/redhat.css +1 -654
  30. data/lib/resources/styles/riak.css +1 -1
  31. data/lib/resources/styles/rocket-panda.css +1 -1
  32. data/lib/resources/styles/rubygems.css +1 -1
  33. data/lib/templates/_config.yml +2 -2
  34. data/lib/templates/sample/slideshow_revealjs.adoc +240 -6
  35. metadata +79 -18
  36. data/Gemfile.lock +0 -77
  37. data/data/generated/A_Introduction_module/1_Chapter.adoc +0 -42
  38. data/data/generated/A_Introduction_module/2_Chapter.adoc +0 -31
  39. data/data/generated/A_Introduction_module/3_Chapter.adoc +0 -23
  40. data/data/generated/A_Introduction_module/A_Introduction_module_AllSlides.index +0 -9
  41. data/data/generated/B_Instruction_module/1_Chapter.adoc +0 -27
  42. data/data/generated/B_Instruction_module/B_Instruction_module_AllSlides.index +0 -7
  43. data/data/generated/C_Installation_module/1_Chapter.adoc +0 -14
  44. data/data/generated/C_Installation_module/2_Chapter.adoc +0 -17
  45. data/data/generated/C_Installation_module/C_Installation_module_AllSlides.index +0 -8
  46. data/data/generated/camel_AllSlides.index +0 -9
  47. data/lib/templates/book/GemFile +0 -5
  48. data/scenario.adoc +0 -152
data/lib/hyla/project.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Hyla
2
- VERSION = '1.0.1'
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='custom_theme'
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 =title
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
- <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: 24px;
15
- width: 640px;
16
- margin-top: 5px;
17
- clear: left;
18
- }
19
-
20
- #wrap-current-slide {
21
- width: 640px;
22
- height: 512px;
23
- float: left;
24
- overflow: hidden;
25
- }
26
-
27
- #current-slide {
28
- width: 1280px;
29
- height: 1024px;
30
- border: none;
31
-
32
- -webkit-transform-origin: 0 0;
33
- -moz-transform-origin: 0 0;
34
- -ms-transform-origin: 0 0;
35
- -o-transform-origin: 0 0;
36
- transform-origin: 0 0;
37
-
38
- -webkit-transform: scale(0.5);
39
- -moz-transform: scale(0.5);
40
- -ms-transform: scale(0.5);
41
- -o-transform: scale(0.5);
42
- transform: scale(0.5);
43
- }
44
-
45
- #wrap-next-slide {
46
- width: 448px;
47
- height: 358px;
48
- float: left;
49
- margin: 0 0 0 10px;
50
- overflow: hidden;
51
- }
52
-
53
- #next-slide {
54
- width: 1280px;
55
- height: 1024px;
56
- border: none;
57
-
58
- -webkit-transform-origin: 0 0;
59
- -moz-transform-origin: 0 0;
60
- -ms-transform-origin: 0 0;
61
- -o-transform-origin: 0 0;
62
- transform-origin: 0 0;
63
-
64
- -webkit-transform: scale(0.35);
65
- -moz-transform: scale(0.35);
66
- -ms-transform: scale(0.35);
67
- -o-transform: scale(0.35);
68
- transform: scale(0.35);
69
- }
70
-
71
- .slides {
72
- position: relative;
73
- margin-bottom: 10px;
74
- border: 1px solid black;
75
- border-radius: 2px;
76
- background: rgb(28, 30, 32);
77
- }
78
-
79
- .slides span {
80
- position: absolute;
81
- top: 3px;
82
- left: 3px;
83
- font-weight: bold;
84
- font-size: 14px;
85
- color: rgba( 255, 255, 255, 0.9 );
86
- }
87
-
88
- .error {
89
- font-weight: bold;
90
- color: red;
91
- font-size: 1.5em;
92
- text-align: center;
93
- margin-top: 10%;
94
- }
95
-
96
- .error code {
97
- font-family: monospace;
98
- }
99
-
100
- .time {
101
- width: 448px;
102
- margin: 30px 0 0 10px;
103
- float: left;
104
- text-align: center;
105
- opacity: 0;
106
-
107
- -webkit-transition: opacity 0.4s;
108
- -moz-transition: opacity 0.4s;
109
- -o-transition: opacity 0.4s;
110
- transition: opacity 0.4s;
111
- }
112
-
113
- .elapsed,
114
- .clock {
115
- color: #333;
116
- font-size: 2em;
117
- text-align: center;
118
- display: inline-block;
119
- padding: 0.5em;
120
- background-color: #eee;
121
- border-radius: 10px;
122
- }
123
-
124
- .elapsed h2,
125
- .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
- </div>
152
-
153
- <div id="wrap-next-slide" class="slides">
154
- <script>document.write( '<iframe width="640" height="512" id="next-slide" src="'+ notesNextSlideURL +'"></iframe>' );</script>
155
- <span>UPCOMING:</span>
156
- </div>
157
-
158
- <div class="time">
159
- <div class="clock">
160
- <h2>Time</h2>
161
- <span id="clock">0:00:00 AM</span>
162
- </div>
163
- <div class="elapsed">
164
- <h2>Elapsed</h2>
165
- <span id="hours">00</span><span id="minutes">:00</span><span id="seconds">:00</span>
166
- </div>
167
- </div>
168
-
169
- <div id="notes"></div>
170
-
171
- <script src="../../plugin/markdown/marked.js"></script>
172
- <script>
173
-
174
- window.addEventListener( 'load', function() {
175
-
176
- if( window.opener && window.opener.location && window.opener.location.href ) {
177
-
178
- var notes = document.getElementById( 'notes' ),
179
- currentSlide = document.getElementById( 'current-slide' ),
180
- nextSlide = document.getElementById( 'next-slide' ),
181
- silenced = false;
182
-
183
- window.addEventListener( 'message', function( event ) {
184
- var data = JSON.parse( event.data );
185
-
186
- // No need for updating the notes in case of fragment changes
187
- if ( data.notes !== undefined) {
188
- if( data.markdown ) {
189
- notes.innerHTML = marked( data.notes );
190
- }
191
- else {
192
- notes.innerHTML = data.notes;
193
- }
194
- }
195
-
196
- silenced = true;
197
-
198
- // Update the note slides
199
- currentSlide.contentWindow.Reveal.slide( data.indexh, data.indexv, data.indexf );
200
- nextSlide.contentWindow.Reveal.slide( data.nextindexh, data.nextindexv );
201
-
202
- silenced = false;
203
-
204
- }, false );
205
-
206
- var start = new Date(),
207
- timeEl = document.querySelector( '.time' ),
208
- clockEl = document.getElementById( 'clock' ),
209
- hoursEl = document.getElementById( 'hours' ),
210
- minutesEl = document.getElementById( 'minutes' ),
211
- secondsEl = document.getElementById( 'seconds' );
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
- setInterval( function() {
214
-
215
- timeEl.style.opacity = 1;
217
+ setInterval( function() {
216
218
 
217
- var diff, hours, minutes, seconds,
218
- now = new Date();
219
+ timeEl.style.opacity = 1;
219
220
 
220
- diff = now.getTime() - start.getTime();
221
- hours = Math.floor( diff / ( 1000 * 60 * 60 ) );
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
- clockEl.innerHTML = now.toLocaleTimeString();
226
- hoursEl.innerHTML = zeroPadInteger( hours );
227
- hoursEl.className = hours > 0 ? "" : "mute";
228
- minutesEl.innerHTML = ":" + zeroPadInteger( minutes );
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
- }, 1000 );
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
- // Broadcasts the state of the notes window to synchronize
235
- // the main window
236
- function synchronizeMainWindow() {
236
+ }, 1000 );
237
237
 
238
- if( !silenced ) {
239
- var indices = currentSlide.contentWindow.Reveal.getIndices();
240
- window.opener.Reveal.slide( indices.h, indices.v, indices.f );
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
- // Navigate the main window when the notes slide changes
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
- else {
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
- 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>';
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
- function zeroPadInteger( num ) {
261
- var str = "00" + parseInt( num );
262
- return str.substring( str.length - 2 );
263
- }
262
+ }, false );
264
263
 
265
- </script>
266
- </body>
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>