slideshow-service 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/Manifest.txt +71 -0
  3. data/lib/slideshow/service/public/slideshow-csss/classList.js +116 -0
  4. data/lib/slideshow/service/public/slideshow-csss/logo.svg +52 -0
  5. data/lib/slideshow/service/public/slideshow-csss/plugins/code-highlight.js +114 -0
  6. data/lib/slideshow/service/public/slideshow-csss/plugins/css-controls.js +40 -0
  7. data/lib/slideshow/service/public/slideshow-csss/plugins/css-edit.js +132 -0
  8. data/lib/slideshow/service/public/slideshow-csss/plugins/css-snippets.js +89 -0
  9. data/lib/slideshow/service/public/slideshow-csss/plugins/incrementable.js +94 -0
  10. data/lib/slideshow/service/public/slideshow-csss/prefixfree.min.js +10 -0
  11. data/lib/slideshow/service/public/slideshow-csss/reusable.css +118 -0
  12. data/lib/slideshow/service/public/slideshow-csss/slides.html +90 -0
  13. data/lib/slideshow/service/public/slideshow-csss/slideshow.css +282 -0
  14. data/lib/slideshow/service/public/slideshow-csss/slideshow.js +508 -0
  15. data/lib/slideshow/service/public/slideshow-csss/style.css +45 -0
  16. data/lib/slideshow/service/public/slideshow-csss/theme.css +247 -0
  17. data/lib/slideshow/service/public/slideshow-slidy/graphics/bullet-fold-dim.gif +0 -0
  18. data/lib/slideshow/service/public/slideshow-slidy/graphics/bullet-fold-dim.png +0 -0
  19. data/lib/slideshow/service/public/slideshow-slidy/graphics/bullet-fold.gif +0 -0
  20. data/lib/slideshow/service/public/slideshow-slidy/graphics/bullet-fold.png +0 -0
  21. data/lib/slideshow/service/public/slideshow-slidy/graphics/bullet-nofold-dim.gif +0 -0
  22. data/lib/slideshow/service/public/slideshow-slidy/graphics/bullet-nofold-dim.png +0 -0
  23. data/lib/slideshow/service/public/slideshow-slidy/graphics/bullet-nofold.gif +0 -0
  24. data/lib/slideshow/service/public/slideshow-slidy/graphics/bullet-nofold.png +0 -0
  25. data/lib/slideshow/service/public/slideshow-slidy/graphics/bullet-unfold-dim.gif +0 -0
  26. data/lib/slideshow/service/public/slideshow-slidy/graphics/bullet-unfold-dim.png +0 -0
  27. data/lib/slideshow/service/public/slideshow-slidy/graphics/bullet-unfold.gif +0 -0
  28. data/lib/slideshow/service/public/slideshow-slidy/graphics/bullet-unfold.png +0 -0
  29. data/lib/slideshow/service/public/slideshow-slidy/graphics/bullet.png +0 -0
  30. data/lib/slideshow/service/public/slideshow-slidy/graphics/example.png +0 -0
  31. data/lib/slideshow/service/public/slideshow-slidy/graphics/example.svg +223 -0
  32. data/lib/slideshow/service/public/slideshow-slidy/graphics/face1.gif +0 -0
  33. data/lib/slideshow/service/public/slideshow-slidy/graphics/face2.gif +0 -0
  34. data/lib/slideshow/service/public/slideshow-slidy/graphics/face3.gif +0 -0
  35. data/lib/slideshow/service/public/slideshow-slidy/graphics/face4.gif +0 -0
  36. data/lib/slideshow/service/public/slideshow-slidy/graphics/fold-bright.gif +0 -0
  37. data/lib/slideshow/service/public/slideshow-slidy/graphics/fold-dim.bmp +0 -0
  38. data/lib/slideshow/service/public/slideshow-slidy/graphics/fold-dim.gif +0 -0
  39. data/lib/slideshow/service/public/slideshow-slidy/graphics/fold.bmp +0 -0
  40. data/lib/slideshow/service/public/slideshow-slidy/graphics/fold.gif +0 -0
  41. data/lib/slideshow/service/public/slideshow-slidy/graphics/icon-blue.png +0 -0
  42. data/lib/slideshow/service/public/slideshow-slidy/graphics/keys2.jpg +0 -0
  43. data/lib/slideshow/service/public/slideshow-slidy/graphics/nofold-dim.bmp +0 -0
  44. data/lib/slideshow/service/public/slideshow-slidy/graphics/nofold-dim.gif +0 -0
  45. data/lib/slideshow/service/public/slideshow-slidy/graphics/nofold.bmp +0 -0
  46. data/lib/slideshow/service/public/slideshow-slidy/graphics/unfold-bright.gif +0 -0
  47. data/lib/slideshow/service/public/slideshow-slidy/graphics/unfold-dim.bmp +0 -0
  48. data/lib/slideshow/service/public/slideshow-slidy/graphics/unfold-dim.gif +0 -0
  49. data/lib/slideshow/service/public/slideshow-slidy/graphics/unfold.bmp +0 -0
  50. data/lib/slideshow/service/public/slideshow-slidy/graphics/unfold.gif +0 -0
  51. data/lib/slideshow/service/public/slideshow-slidy/graphics/w3c-logo-blue.gif +0 -0
  52. data/lib/slideshow/service/public/slideshow-slidy/graphics/w3c-logo-blue.svg +14 -0
  53. data/lib/slideshow/service/public/slideshow-slidy/graphics/w3c-logo-slanted.jpg +0 -0
  54. data/lib/slideshow/service/public/slideshow-slidy/graphics/w3c-logo-white.gif +0 -0
  55. data/lib/slideshow/service/public/slideshow-slidy/graphics/w3c-logo-white.svg +14 -0
  56. data/lib/slideshow/service/public/slideshow-slidy/help/help.html +80 -0
  57. data/lib/slideshow/service/public/slideshow-slidy/help/help.html.ca +52 -0
  58. data/lib/slideshow/service/public/slideshow-slidy/help/help.html.de +96 -0
  59. data/lib/slideshow/service/public/slideshow-slidy/help/help.html.en +81 -0
  60. data/lib/slideshow/service/public/slideshow-slidy/help/help.html.es +52 -0
  61. data/lib/slideshow/service/public/slideshow-slidy/help/help.html.fr +118 -0
  62. data/lib/slideshow/service/public/slideshow-slidy/help/help.html.hu +98 -0
  63. data/lib/slideshow/service/public/slideshow-slidy/help/help.html.nl +82 -0
  64. data/lib/slideshow/service/public/slideshow-slidy/help/help.html.pl +76 -0
  65. data/lib/slideshow/service/public/slideshow-slidy/help/help.html.pt-br +95 -0
  66. data/lib/slideshow/service/public/slideshow-slidy/help/help.html.pt_br +95 -0
  67. data/lib/slideshow/service/public/slideshow-slidy/help/help.html.sv +75 -0
  68. data/lib/slideshow/service/public/slideshow-slidy/help/help.pt-br.html +95 -0
  69. data/lib/slideshow/service/public/slideshow-slidy/scripts/slidy.js +2952 -0
  70. data/lib/slideshow/service/public/slideshow-slidy/slides.blank.html +26 -0
  71. data/lib/slideshow/service/public/slideshow-slidy/slides.w3c.html +62 -0
  72. data/lib/slideshow/service/public/slideshow-slidy/styles/slidy.css +401 -0
  73. data/lib/slideshow/service/public/slideshow-slidy/styles/w3c-blue.css +493 -0
  74. data/lib/slideshow/service/version.rb +1 -2
  75. data/lib/slideshow/service/views/_editor.erb +7 -4
  76. data/lib/slideshow/service.rb +47 -19
  77. metadata +73 -2
@@ -0,0 +1,493 @@
1
+ /* w3c-blue.css
2
+
3
+ Copyright (c) 2005-2010 W3C (MIT, ERCIM, Keio), All Rights Reserved.
4
+ W3C liability, trademark, document use and software licensing
5
+ rules apply, see:
6
+
7
+ http://www.w3.org/Consortium/Legal/copyright-documents
8
+ http://www.w3.org/Consortium/Legal/copyright-software
9
+ */
10
+ body
11
+ {
12
+ margin: 0 0 0 0;
13
+ padding: 0 0 0 0;
14
+ width: 100%;
15
+ height: 100%;
16
+ color: black;
17
+ background-color: white;
18
+ font-family: "Gill Sans MT", "Gill Sans", GillSans, sans-serif;
19
+ font-size: 14pt;
20
+ }
21
+
22
+ div.slide.titlepage {
23
+ text-align: center;
24
+ }
25
+
26
+ div.slide.titlepage h1 {
27
+ padding-top: 40%;
28
+ }
29
+
30
+ div.slide {
31
+ z-index: 20;
32
+ margin: 0 0 0 0;
33
+ padding: 0;
34
+ border-width: 0;
35
+ top: 0;
36
+ bottom: 0;
37
+ left: 0;
38
+ right: 0;
39
+ line-height: 120%;
40
+ background-color: transparent;
41
+ }
42
+
43
+ div.background {
44
+ z-index: 1;
45
+ position: absolute;
46
+ vertical-align: bottom;
47
+ left: 0;
48
+ right: 0;
49
+ top: 0;
50
+ bottom: auto;
51
+ height: 4.1em;
52
+ padding: 0 0 0 0.2em;
53
+ margin: 0 0 0 0;
54
+ border-width: 0;
55
+ background-color: #728ec2;
56
+ }
57
+
58
+ div.background img {
59
+ height: 4em;
60
+ }
61
+
62
+ /* this rule is hidden from IE which doesn't support + selector */
63
+ div.slide + div[class].slide { page-break-before: always;}
64
+
65
+ div.slide h1 {
66
+ padding-left: 3em;
67
+ padding-right: 3em;
68
+ padding-top: 0.1em;
69
+ margin-bottom: 0.8em;
70
+ margin-top: -0.05em;
71
+ margin-left: 0;
72
+ margin-right: 0;
73
+ min-height: 2.3em;
74
+ color: white;
75
+ height: 2.2em;
76
+ font-size: 160%;
77
+ line-height: 1.1em;
78
+ }
79
+
80
+ div.slide h1 a {
81
+ color: white;
82
+ text-decoration: none;
83
+ }
84
+
85
+ div.slide h1 a:link {
86
+ color: white;
87
+ text-decoration: none;
88
+ }
89
+
90
+ div.slide h1 a:visited {
91
+ color: white;
92
+ text-decoration: none;
93
+ }
94
+
95
+ div.slide h1 a:hover {
96
+ color: white;
97
+ text-decoration: underline;
98
+ }
99
+
100
+ div.slide h1 a:active {
101
+ color: red;
102
+ text-decoration: underline;
103
+ }
104
+
105
+ #head-icon {
106
+ margin-top: 0.5em;
107
+ margin-bottom: 0;
108
+ margin-left: 0;
109
+ margin-right: 1em;
110
+ background: #728ec2;
111
+ border-width: 0;
112
+ height: 3em;
113
+ max-width: 3em;
114
+ z-index: 2;
115
+ float: left;
116
+ }
117
+
118
+ #head-logo {
119
+ margin: 0;
120
+ margin-top: 0.25em;
121
+ padding-top: 0.25em;
122
+ padding-bottom: 0.2em;
123
+ padding-left: 0;
124
+ padding-right: 0;
125
+ height: 3.2em;
126
+ width: 4.8em;
127
+ float: right;
128
+ z-index: 2;
129
+ background: #728ec2;
130
+ }
131
+
132
+ #head-logo-fallback {
133
+ margin: 0;
134
+ padding: 0;
135
+ margin-top: -0.8em;
136
+ width: 4.8em;
137
+ float: right;
138
+ z-index: 2;
139
+ }
140
+
141
+ /* the next two classes support vertical and horizontal centering */
142
+ div.vbox {
143
+ float: left;
144
+ height: 40%;
145
+ width: 50%;
146
+ margin-top: -240px;
147
+ }
148
+ div.hbox {
149
+ width:60%;
150
+ margin-top: 0;
151
+ margin-left:auto;
152
+ margin-right:auto;
153
+ height: 60%;
154
+ border:1px solid silver;
155
+ background:#F0F0F0;
156
+ overflow:auto;
157
+ text-align:left;
158
+ clear:both;
159
+ }
160
+
161
+ /* styling for named background */
162
+ div.background.slanty {
163
+ z-index: 2;
164
+ bottom: 0;
165
+ height: 100%;
166
+ background: transparent;
167
+ }
168
+
169
+ div.background.slanty img { margin-top: 4em; width: 100%; height: 80% }
170
+
171
+ /* the following makes the pre background translucent */
172
+ /* opacity is a CSS3 property but supported by Mozilla family */
173
+ /* filter is an IE specific feature that also requires width */
174
+ div.slide.slanty pre {
175
+ width: 93%; /* needed for IE filter to work */
176
+ opacity: .8;
177
+ filter: alpha(opacity=80);
178
+ }
179
+
180
+ img.withBorder {
181
+ border: 2px solid #c60;
182
+ padding: 4px;
183
+ }
184
+
185
+ li pre { margin-left: 0; }
186
+
187
+ @media print { pre { font-size: 60% } }
188
+
189
+ blockquote { font-style: italic }
190
+
191
+ img { background-color: transparent }
192
+
193
+ p.copyright { font-size: smaller }
194
+
195
+ .center { text-align: center }
196
+ .footnote { font-size: smaller; margin-left: 2em; }
197
+
198
+ a img { border-width: 0; border-style: none }
199
+
200
+ a:visited { color: navy }
201
+ a:link { color: navy }
202
+ a:hover { color: red; text-decoration: underline }
203
+ a:active { color: red; text-decoration: underline }
204
+
205
+ a {text-decoration: none}
206
+ .navbar a:link {color: white}
207
+ .navbar a:visited {color: yellow}
208
+ .navbar a:active {color: red}
209
+ .navbar a:hover {color: red}
210
+
211
+ ul { list-style-type: square; }
212
+ ul ul { list-style-type: disc; }
213
+ ul ul ul { list-style-type: circle; }
214
+ ul ul ul ul { list-style-type: disc; }
215
+ li { margin-left: 0.5em; margin-top: 0.5em; }
216
+ li li { font-size: 85%; font-style: italic }
217
+ li li li { font-size: 85%; font-style: normal }
218
+
219
+ div dt
220
+ {
221
+ margin-left: 0;
222
+ margin-top: 1em;
223
+ margin-bottom: 0.5em;
224
+ font-weight: bold;
225
+ }
226
+ div dd
227
+ {
228
+ margin-left: 2em;
229
+ margin-bottom: 0.5em;
230
+ }
231
+
232
+
233
+ p,pre,ul,ol,blockquote,h2,h3,h4,h5,h6,dl,table {
234
+ margin-left: 1em;
235
+ margin-right: 1em;
236
+ }
237
+
238
+ p.subhead { font-weight: bold; margin-top: 2em; }
239
+
240
+ div.cover p.explanation {
241
+ font-style: italic;
242
+ margin-top: 3em;
243
+ }
244
+
245
+
246
+ .smaller { font-size: smaller }
247
+
248
+ td,th { padding: 0.2em }
249
+
250
+ ul {
251
+ margin: 0.5em 1.5em 0.5em 1.5em;
252
+ padding: 0;
253
+ }
254
+
255
+ ol {
256
+ margin: 0.5em 1.5em 0.5em 1.5em;
257
+ padding: 0;
258
+ }
259
+
260
+ ul { list-style-type: square; }
261
+ ul ul { list-style-type: disc; }
262
+ ul ul ul { list-style-type: circle; }
263
+ ul ul ul ul { list-style-type: disc; }
264
+ li { margin-left: 0.5em; margin-top: 0.5em; }
265
+ li li { font-size: 85%; font-style: italic }
266
+ li li li { font-size: 85%; font-style: normal }
267
+
268
+
269
+ ul li {
270
+ list-style: none;
271
+ margin: 0.1em 0em 0.6em 0;
272
+ padding: 0 0 0 40px;
273
+ background: transparent url(../graphics/bullet.png) no-repeat 5px 0.3em;
274
+ line-height: 140%;
275
+ }
276
+
277
+ /* workaround IE's failure to support background on li for print media */
278
+ @media print { ul li { list-style: disc; padding-left: 0; background: none; } }
279
+
280
+ ol li {
281
+ margin: 0.1em 0em 0.6em 1.5em;
282
+ padding: 0 0 0 0px;
283
+ line-height: 140%;
284
+ }
285
+
286
+ li li {
287
+ font-size: 85%;
288
+ font-style: italic;
289
+ list-style-type: disc;
290
+ background: transparent;
291
+ padding: 0 0 0 0;
292
+ }
293
+ li li li {
294
+ font-size: 85%;
295
+ font-style: normal;
296
+ list-style-type: circle;
297
+ background: transparent;
298
+ padding: 0 0 0 0;
299
+ }
300
+ li li li li {
301
+ list-style-type: disc;
302
+ background: transparent;
303
+ padding: 0 0 0 0;
304
+ }
305
+
306
+ /* rectangular blue bullet + unfold/nofold/fold widget */
307
+
308
+ /*
309
+ setting class="outline on ol or ul makes it behave as an
310
+ ouline list where blocklevel content in li elements is
311
+ hidden by default and can be expanded or collapsed with
312
+ mouse click. Set class="expand" on li to override default
313
+ */
314
+
315
+ ol.outline li:hover { cursor: pointer }
316
+ ol.outline li.nofold:hover { cursor: default }
317
+
318
+ ul.outline li:hover { cursor: pointer }
319
+ ul.outline li.nofold:hover { cursor: default }
320
+
321
+ ol.outline { list-style:decimal; }
322
+ ol.outline ol { list-style-type:lower-alpha }
323
+
324
+ ol.outline li.nofold {
325
+ padding: 0 0 0 20px;
326
+ background: transparent url(../graphics/nofold-dim.gif) no-repeat 0px 0.3em;
327
+ }
328
+ ol.outline li.unfolded {
329
+ padding: 0 0 0 20px;
330
+ background: transparent url(../graphics/fold-dim.gif) no-repeat 0px 0.3em;
331
+ }
332
+ ol.outline li.folded {
333
+ padding: 0 0 0 20px;
334
+ background: transparent url(../graphics/unfold-dim.gif) no-repeat 0px 0.3em;
335
+ }
336
+ ol.outline li.unfolded:hover {
337
+ padding: 0 0 0 20px;
338
+ background: transparent url(../graphics/fold.gif) no-repeat 0px 0.3em;
339
+ }
340
+ ol.outline li.folded:hover {
341
+ padding: 0 0 0 20px;
342
+ background: transparent url(../graphics/unfold.gif) no-repeat 0px 0.3em;
343
+ }
344
+
345
+ ul.outline li.nofold {
346
+ padding: 0 0 0 52px;
347
+ background: transparent url(../graphics/bullet-nofold-dim.gif) no-repeat 5px 0.3em;
348
+ }
349
+ ul.outline li.unfolded {
350
+ padding: 0 0 0 52px;
351
+ background: transparent url(../graphics/bullet-fold-dim.gif) no-repeat 5px 0.3em;
352
+ }
353
+ ul.outline li.folded {
354
+ padding: 0 0 0 52px;
355
+ background: transparent url(../graphics/bullet-unfold-dim.gif) no-repeat 5px 0.3em;
356
+ }
357
+ ul.outline li.unfolded:hover {
358
+ padding: 0 0 0 52px;
359
+ background: transparent url(../graphics/bullet-fold.gif) no-repeat 5px 0.3em;
360
+ }
361
+ ul.outline li.folded:hover {
362
+ padding: 0 0 0 52px;
363
+ background: transparent url(../graphics/bullet-unfold.gif) no-repeat 5px 0.3em;
364
+ }
365
+
366
+ li ul.outline li.nofold {
367
+ padding: 0 0 0 21px;
368
+ background: transparent url(../graphics/nofold-dim.gif) no-repeat 5px 0.3em;
369
+ }
370
+ li ul.outline li.unfolded {
371
+ padding: 0 0 0 21px;
372
+ background: transparent url(../graphics/fold-dim.gif) no-repeat 5px 0.3em;
373
+ }
374
+ li ul.outline li.folded {
375
+ padding: 0 0 0 21px;
376
+ background: transparent url(../graphics/unfold-dim.gif) no-repeat 5px 0.3em;
377
+ }
378
+ li ul.outline li.unfolded:hover {
379
+ padding: 0 0 0 21px;
380
+ background: transparent url(../graphics/fold.gif) no-repeat 5px 0.3em;
381
+ }
382
+ li ul.outline li.folded:hover {
383
+ padding: 0 0 0 21px;
384
+ background: transparent url(../graphics/unfold.gif) no-repeat 5px 0.3em;
385
+ }
386
+
387
+ img.withBorder {
388
+ border: 2px solid #c60;
389
+ padding: 4px;
390
+ }
391
+
392
+ div.header {
393
+ position: absolute;
394
+ z-index: 2;
395
+ left: 0;
396
+ right: 0;
397
+ top: 0;
398
+ bottom: auto;
399
+ height: 2.95em;
400
+ width: 100%;
401
+ padding: 0 0 0 0;
402
+ margin: 0 0 0 0;
403
+ border-width: 0;
404
+ border-style: solid;
405
+ background-color: #005A9C;
406
+ border-bottom-width: thick;
407
+ border-bottom-color: #95ABD0;
408
+ }
409
+
410
+ div.footer {
411
+ position: absolute;
412
+ z-index: 80;
413
+ left: 0;
414
+ right: 0;
415
+ top: auto;
416
+ bottom: 0;
417
+ height: 3.5em;
418
+ margin: 0;
419
+ font-size: 80%;
420
+ font-weight: bold;
421
+ padding-left: 1em;
422
+ padding-right: 0;
423
+ padding-top: 0.3em;
424
+ padding-bottom: 0;
425
+ color: #003366;
426
+ background-color: #95ABD0;
427
+ }
428
+
429
+ /* this is a hack to hide property from IE6 and below */
430
+ div[class="footer"] {
431
+ position: fixed;
432
+ }
433
+
434
+ #hidden-bullet {
435
+ visibility: hidden;
436
+ display: none;
437
+ }
438
+
439
+ div.slide.cover {
440
+ color: white;
441
+ background-color: #728ec2;
442
+ padding-top: 0;
443
+ padding-right: 0;
444
+ padding-left: 3em;
445
+ height: 100%;
446
+ }
447
+
448
+ div.slide.cover h1 {
449
+ margin: 0;
450
+ padding: 0.5em;
451
+ color: white;
452
+ height: auto;
453
+ }
454
+
455
+ div.slide.cover h2 {
456
+ color: white;
457
+ }
458
+
459
+ div.slide.cover a {
460
+ color: white;
461
+ }
462
+
463
+ div.slide.cover a:visited { color: white }
464
+ div.slide.cover a:link { color: white }
465
+ div.slide.cover a:hover { color: yellow; text-decoration: underline }
466
+ div.slide.cover a:active { color: yellow; text-decoration: underline }
467
+
468
+ div.slide.cover a:hover, div.slide.cover a:active {
469
+ color: yellow; text-decoration: underline;
470
+ }
471
+
472
+ div.slide.cover img.cover {
473
+ margin: 0 0 0 0;
474
+ float: right;
475
+ padding-bottom: 4em;
476
+ width: 50%;
477
+ overflow: hidden;
478
+ }
479
+
480
+ div.slide.cover a:hover, div.slide.cover a:active {
481
+ color: yellow; text-decoration: underline;
482
+ }
483
+
484
+ /* for Bert as an ardent user of the old W3C slidemaker tool */
485
+
486
+ div.comment { display: none; visibility: hidden }
487
+
488
+ @media print {
489
+ div.slide h1 { background: transparent; color: black }
490
+ div.slide.cover { background: transparent; color: black }
491
+ div.slide.cover h1 { background: transparent; color: black }
492
+ div.comment { display: block; visibility: visible }
493
+ }
@@ -3,7 +3,7 @@
3
3
  module SlideshowService
4
4
 
5
5
  MAJOR = 0
6
- MINOR = 2
6
+ MINOR = 3
7
7
  PATCH = 0
8
8
  VERSION = [MAJOR,MINOR,PATCH].join('.')
9
9
 
@@ -22,4 +22,3 @@ module SlideshowService
22
22
  end
23
23
 
24
24
  end # module SlideshowService
25
-
@@ -3,14 +3,17 @@
3
3
 
4
4
 
5
5
  <form id='noteform' action="#">
6
- <button type="submit" formtarget="slideshow_s6" formaction="slideshow-s6-blank/slides">Show S6 Blank</button>
7
- <button type="submit" formtarget="slideshow_s6_pdf" formaction="slideshow-s6-blank/slides.pdf">Show S6 Blank (PDF)</button>
8
- <button type="submit" formtarget="slideshow_deckjs" formaction="slideshow-deck.js/slides">Show Deck.js</button>
6
+ <button type="submit" formtarget="slideshow_s6" formaction="slideshow-s6-blank/slides">Show S6 Blank</button>
7
+ <button type="submit" formtarget="slideshow_s6_pdf" formaction="slideshow-s6-blank/slides.pdf">Show S6 Blank (PDF)</button>
8
+ <button type="submit" formtarget="slideshow_deckjs" formaction="slideshow-deck.js/slides">Show Deck.js</button>
9
+ <button type="submit" formtarget="slideshow_csss" formaction="slideshow-csss/slides">Show CSSS</button>
10
+ <button type="submit" formtarget="slideshow_slidy_blank" formaction="slideshow-slidy/slides.blank">Show Slidy (Blank)</button>
11
+ <button type="submit" formtarget="slideshow_slidy_w3c" formaction="slideshow-slidy/slides.w3c">Show Slidy (W3C)</button>
9
12
  </form>
10
13
 
11
14
 
12
15
  <table width="100%">
13
- <tr>
16
+ <tr>
14
17
  <td>
15
18
  <div style="font-size: 80%;">
16
19
  Options: <br>
@@ -28,7 +28,7 @@ require 'slideshow/service/version' # let version always go first
28
28
 
29
29
 
30
30
  module Slideshow
31
-
31
+
32
32
  class Service < Sinatra::Base
33
33
 
34
34
 
@@ -38,7 +38,7 @@ class Service < Sinatra::Base
38
38
  puts "[boot] slideshow-service - setting public folder to: #{PUBLIC_FOLDER}"
39
39
  puts "[boot] slideshow-service - setting views folder to: #{VIEWS_FOLDER}"
40
40
 
41
- set :public_folder, PUBLIC_FOLDER # set up the static dir (with images/js/css inside)
41
+ set :public_folder, PUBLIC_FOLDER # set up the static dir (with images/js/css inside)
42
42
  set :views, VIEWS_FOLDER # set up the views dir
43
43
 
44
44
  set :static, true # set up static file routing
@@ -50,7 +50,7 @@ class Service < Sinatra::Base
50
50
 
51
51
  get '/s6' do
52
52
  ## todo/check: works with .html too (e.g. gets hit before public file ?? check why? why not??)
53
- redirect to('/slideshow-s6-blank/slides')
53
+ redirect to('/slideshow-s6-blank/slides')
54
54
  end
55
55
 
56
56
  ###
@@ -60,7 +60,7 @@ class Service < Sinatra::Base
60
60
 
61
61
 
62
62
  get '/slideshow-s6-blank/slides' do
63
-
63
+
64
64
  text = params.delete('text') || welcome_sample
65
65
  ## todo - check if ascii-7bit encoding ??
66
66
  ## use (always) utf8 for now
@@ -70,7 +70,7 @@ class Service < Sinatra::Base
70
70
 
71
71
 
72
72
  get '/slideshow-s6-blank/slides.pdf' do
73
-
73
+
74
74
  text = params.delete('text') || welcome_sample
75
75
  ## todo - check if ascii-7bit encoding ??
76
76
  ## use (always) utf8 for now
@@ -80,14 +80,43 @@ class Service < Sinatra::Base
80
80
 
81
81
 
82
82
  get '/slideshow-deck.js/slides' do
83
-
83
+
84
84
  text = params.delete('text') || welcome_sample
85
85
  ## todo - check if ascii-7bit encoding ??
86
86
  ## use (always) utf8 for now
87
87
 
88
88
  render_slideshow( text, 'slideshow-deck.js/slides.html' )
89
89
  end
90
-
90
+
91
+ get '/slideshow-csss/slides' do
92
+
93
+ text = params.delete('text') || welcome_sample
94
+ ## todo - check if ascii-7bit encoding ??
95
+ ## use (always) utf8 for now
96
+
97
+ render_slideshow( text, 'slideshow-csss/slides.html' )
98
+ end
99
+
100
+
101
+ get '/slideshow-slidy/slides.blank' do
102
+
103
+ text = params.delete('text') || welcome_sample
104
+ ## todo - check if ascii-7bit encoding ??
105
+ ## use (always) utf8 for now
106
+
107
+ render_slideshow( text, 'slideshow-slidy/slides.blank.html' )
108
+ end
109
+
110
+
111
+ get '/slideshow-slidy/slides.w3c' do
112
+
113
+ text = params.delete('text') || welcome_sample
114
+ ## todo - check if ascii-7bit encoding ??
115
+ ## use (always) utf8 for now
116
+
117
+ render_slideshow( text, 'slideshow-slidy/slides.w3c.html' )
118
+ end
119
+
91
120
 
92
121
  get '/' do
93
122
  # note: allow optional params e.g. text and opts
@@ -119,44 +148,44 @@ private
119
148
  def render_slideshow( text, template_path )
120
149
 
121
150
  opts = Slideshow::Opts.new
122
-
151
+
123
152
  ## opts.verbose = true # turn on (verbose) debug output
124
153
  ## opts.output_path = "#{Slideshow.root}/tmp/#{Time.now.to_i}"
125
154
 
126
155
  config = Slideshow::Config.new( opts )
127
156
  config.load
128
157
  config.dump
129
-
158
+
130
159
  b = Slideshow::Build.new( config )
131
160
  deck = b.create_deck_from_string( text )
132
161
 
133
162
  pp deck
134
-
163
+
135
164
  puts "content:"
136
165
  pp deck.content
137
-
166
+
138
167
  ###########################################
139
168
  ## setup hash for binding
140
169
  assigns = { 'name' => 'test', ## todo/check: what name to use???
141
- 'headers' => HeadersDrop.new( b.headers ),
170
+ 'headers' => HeadersDrop.new( b.headers ),
142
171
  'content' => deck.content,
143
172
  'slides' => deck.slides.map { |slide| SlideDrop.new(slide) }, # strutured content - use LiquidDrop - why? why not?
144
173
  }
145
-
174
+
146
175
  #
147
176
  # html = "<p>hello from s6</p>"
148
177
  # html
149
-
178
+
150
179
  ## e.g. :s6 == s6.liquid file/template
151
-
180
+
152
181
  tpl = LiquidTemplate.from_public( template_path )
153
- tpl.render( assigns )
182
+ tpl.render( assigns )
154
183
  end
155
184
 
156
185
 
157
186
  ## use our own litter liquid template handler
158
187
  ## works like "original" in pakman template manager used by slideshow
159
-
188
+
160
189
  class LiquidTemplate
161
190
 
162
191
  def self.from_file( path )
@@ -170,7 +199,7 @@ class LiquidTemplate
170
199
  puts " Loading template (from builtin public) >#{path}<..."
171
200
  self.from_file( path ) ## note: pass along path as an option
172
201
  end
173
-
202
+
174
203
  def initialize( text, opts={} )
175
204
  @template = Liquid::Template.parse( text ) # parses and compiles the template
176
205
  end
@@ -192,4 +221,3 @@ end # module Slideshow
192
221
 
193
222
  # say hello
194
223
  puts SlideshowService.banner
195
-