showoff 0.14.3 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/keymap.rb +2 -1
- data/lib/showoff/version.rb +1 -1
- data/lib/showoff.rb +7 -4
- data/lib/showoff_utils.rb +8 -2
- data/public/css/{TimeCircles.css → TimeCircles-89ac5ae.css} +0 -0
- data/public/css/presenter.css +148 -8
- data/public/css/showoff.css +17 -9
- data/public/js/{TimeCircles.js → TimeCircles-89ac5ae.js} +986 -984
- data/public/js/annotations.js +1 -1
- data/public/js/{coffee-script.js → coffee-script-1.1.3-pre.js} +0 -0
- data/public/js/{highlight.pack.js → highlight.pack-9.2.0.js} +0 -0
- data/public/js/{jTypeWriter.js → jTypeWriter-1.1.js} +0 -0
- data/public/js/jquery-print.js +3 -2
- data/public/js/{jquery.batchImageLoad.js → jquery.batchImageLoad-1.0.0.js} +0 -0
- data/public/js/{jquery.cycle.all.js → jquery.cycle.all-2.8.0.js} +0 -0
- data/public/js/{jquery.doubletap-0.1.js → jquery.doubletap-4ff02c5.js} +3 -2
- data/public/js/{jquery.parsequery.min.js → jquery.parsequery.min-6a20f83.js} +1 -0
- data/public/js/presenter.js +192 -65
- data/public/js/showoff.js +102 -74
- data/views/header.erb +10 -11
- data/views/header_mini.erb +2 -3
- data/views/help.erb +6 -1
- data/views/presenter.erb +18 -7
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93da591c826ee3aca98428a4a9525f86cf3688fa
|
4
|
+
data.tar.gz: 130a86bfccb802aea7d3ba7025ace68b478c5ce1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f8d82b171e6a0e7cf7804da4eb7bbfc443882ad48cc02dd8c0faf8d5bb6f2c7e57cf64be03a34d24b47c5522d2d981a1b4f185dc156011bac8efff637455db3
|
7
|
+
data.tar.gz: aa047b17de3c4f8e75ba004b48e72a4217b45ad3098be48c557a1837fc7437ece2665a780d10df1786a68104eba45f572ddb8b1f936cdb785886e975391f757a
|
data/lib/keymap.rb
CHANGED
data/lib/showoff/version.rb
CHANGED
data/lib/showoff.rb
CHANGED
@@ -1204,8 +1204,10 @@ class ShowOff < Sinatra::Application
|
|
1204
1204
|
|
1205
1205
|
if index == 'all'
|
1206
1206
|
doc.css(classes).collect do |code|
|
1207
|
-
|
1208
|
-
|
1207
|
+
classes = code.attr('class').split rescue []
|
1208
|
+
lang = classes.shift =~ /language-(\S*)/ ? $1 : nil
|
1209
|
+
|
1210
|
+
[lang, code.text, classes]
|
1209
1211
|
end
|
1210
1212
|
else
|
1211
1213
|
doc.css(classes)[index.to_i].text rescue 'Invalid code block index'
|
@@ -1410,6 +1412,7 @@ class ShowOff < Sinatra::Application
|
|
1410
1412
|
if valid_cookie()
|
1411
1413
|
name = control['name']
|
1412
1414
|
slide = control['slide'].to_i
|
1415
|
+
increment = control['increment'].to_i rescue 0
|
1413
1416
|
|
1414
1417
|
# check to see if we need to enable a download link
|
1415
1418
|
if @@downloads.has_key?(slide)
|
@@ -1419,10 +1422,10 @@ class ShowOff < Sinatra::Application
|
|
1419
1422
|
|
1420
1423
|
# update the current slide pointer
|
1421
1424
|
@logger.debug "Updated current slide to #{name}"
|
1422
|
-
@@current = { :name => name, :number => slide }
|
1425
|
+
@@current = { :name => name, :number => slide, :increment => increment }
|
1423
1426
|
|
1424
1427
|
# schedule a notification for all clients
|
1425
|
-
EM.next_tick { settings.sockets.each{|s| s.send({ 'message' => 'current', 'current' => @@current[:number] }.to_json) } }
|
1428
|
+
EM.next_tick { settings.sockets.each{|s| s.send({ 'message' => 'current', 'current' => @@current[:number], 'increment' => @@current[:increment] }.to_json) } }
|
1426
1429
|
end
|
1427
1430
|
|
1428
1431
|
when 'register'
|
data/lib/showoff_utils.rb
CHANGED
@@ -122,9 +122,14 @@ class ShowOffUtils
|
|
122
122
|
if filename.downcase.end_with? '.md'
|
123
123
|
print '.'
|
124
124
|
showoff.get_code_from_slide(filename.sub('.md',''), 'all', false).each_with_index do |block, index|
|
125
|
-
lang, code = block
|
125
|
+
lang, code, classes = block
|
126
126
|
validator = validators[lang]
|
127
|
-
|
127
|
+
|
128
|
+
if classes.include? 'no-validate'
|
129
|
+
print '-'
|
130
|
+
next
|
131
|
+
|
132
|
+
elsif validator
|
128
133
|
# write out a tempfile because many validators require files to with
|
129
134
|
Tempfile.open('showoff-validation') do |f|
|
130
135
|
File.write(f.path, code)
|
@@ -134,6 +139,7 @@ class ShowOffUtils
|
|
134
139
|
end
|
135
140
|
end
|
136
141
|
end
|
142
|
+
|
137
143
|
end
|
138
144
|
end
|
139
145
|
end
|
File without changes
|
data/public/css/presenter.css
CHANGED
@@ -27,12 +27,15 @@
|
|
27
27
|
color: #fff;
|
28
28
|
}
|
29
29
|
|
30
|
-
#topbar a
|
30
|
+
#topbar a,
|
31
|
+
#topbar select {
|
31
32
|
text-decoration: none;
|
32
33
|
color: #fff;
|
34
|
+
background: #222222;
|
33
35
|
}
|
34
36
|
|
35
|
-
#topbar a:hover
|
37
|
+
#topbar a:hover,
|
38
|
+
#topbar select:hover {
|
36
39
|
background-color: #555;
|
37
40
|
}
|
38
41
|
|
@@ -72,7 +75,8 @@
|
|
72
75
|
margin: 0 0.5em;
|
73
76
|
}
|
74
77
|
|
75
|
-
#presenterPopup
|
78
|
+
#presenterPopup,
|
79
|
+
#nextWindowConfirmation {
|
76
80
|
display: none;
|
77
81
|
position: absolute;
|
78
82
|
z-index: 2147483647;
|
@@ -88,10 +92,25 @@
|
|
88
92
|
overflow: auto;
|
89
93
|
}
|
90
94
|
|
91
|
-
#presenterPopup a
|
95
|
+
#presenterPopup a,
|
96
|
+
#nextWindowConfirmation a {
|
92
97
|
color: #ffffff;
|
93
98
|
}
|
94
99
|
|
100
|
+
#nextWindowConfirmation {
|
101
|
+
right: 0.25em;
|
102
|
+
left: auto;
|
103
|
+
width: 14em;
|
104
|
+
}
|
105
|
+
#nextWindowConfirmation p {
|
106
|
+
margin: 0.25em;
|
107
|
+
}
|
108
|
+
#nextWindowConfirmation input {
|
109
|
+
float: right;
|
110
|
+
margin: 0.25em;
|
111
|
+
}
|
112
|
+
|
113
|
+
|
95
114
|
#center {
|
96
115
|
display: -webkit-flex;
|
97
116
|
display: flex;
|
@@ -206,6 +225,24 @@
|
|
206
225
|
overflow-x: hidden;
|
207
226
|
overflow-y: auto;
|
208
227
|
}
|
228
|
+
#navigationHover {
|
229
|
+
display: none;
|
230
|
+
position: absolute;
|
231
|
+
overflow: hidden;
|
232
|
+
z-index: 99999;
|
233
|
+
width: 200px;
|
234
|
+
height: 150px;
|
235
|
+
background-color: white;
|
236
|
+
border: 1px solid #4D4F53;
|
237
|
+
margin: 0px;
|
238
|
+
border-radius: 3px;
|
239
|
+
box-shadow: 3px 3px 5px #ccc;
|
240
|
+
}
|
241
|
+
#navigationHover .content {
|
242
|
+
width: 200%;
|
243
|
+
transform: scale(0.5);
|
244
|
+
transform-origin: 0 0;
|
245
|
+
}
|
209
246
|
|
210
247
|
#presenter {
|
211
248
|
display: -webkit-flex;
|
@@ -226,16 +263,96 @@
|
|
226
263
|
flex-flow: row;
|
227
264
|
-webkit-flex: 10;
|
228
265
|
flex: 10;
|
229
|
-
max-height: 95%; /* dear Firefox; what's the point of flex-box if we still have to do this crap? */
|
230
266
|
}
|
231
267
|
|
268
|
+
|
232
269
|
#preview {
|
270
|
+
position: relative;
|
233
271
|
-webkit-flex: 10;
|
234
272
|
flex: 10;
|
235
|
-
overflow:
|
273
|
+
overflow: hidden;
|
236
274
|
background: #eee;
|
237
275
|
padding: 1em;
|
238
276
|
}
|
277
|
+
|
278
|
+
/* thumbnails layout */
|
279
|
+
#preview.thumbs {
|
280
|
+
padding-top: 100px;
|
281
|
+
}
|
282
|
+
#preview .thumb {
|
283
|
+
display: none;
|
284
|
+
position: absolute;
|
285
|
+
top: 0;
|
286
|
+
}
|
287
|
+
#preview .thumb .label {
|
288
|
+
}
|
289
|
+
#nextSlide.thumb .label {
|
290
|
+
text-align: right;
|
291
|
+
}
|
292
|
+
|
293
|
+
#preview .thumb .container {
|
294
|
+
overflow: hidden;
|
295
|
+
height: 150px;
|
296
|
+
width: 200px;
|
297
|
+
top: 0;
|
298
|
+
background-color: white;
|
299
|
+
border-bottom: 2px solid #ccc;
|
300
|
+
}
|
301
|
+
#preview .thumb .content {
|
302
|
+
transform: scale(.5);
|
303
|
+
transform-origin: 0 0;
|
304
|
+
width: 200%;
|
305
|
+
}
|
306
|
+
#prevSlide.thumb {
|
307
|
+
left: 0;
|
308
|
+
}
|
309
|
+
#prevSlide.thumb .container {
|
310
|
+
border-right: 2px solid #ccc;
|
311
|
+
}
|
312
|
+
#nextSlide.thumb {
|
313
|
+
right: 0;
|
314
|
+
}
|
315
|
+
#nextSlide.thumb .container {
|
316
|
+
border-left: 2px solid #ccc;
|
317
|
+
}
|
318
|
+
|
319
|
+
#preview.thumbs #preso {
|
320
|
+
position: absolute;
|
321
|
+
bottom: 1em;
|
322
|
+
margin-left: auto;
|
323
|
+
margin-right: auto;
|
324
|
+
left: 0;
|
325
|
+
right: 0;
|
326
|
+
}
|
327
|
+
|
328
|
+
/* allow us to actually see images! */
|
329
|
+
#navigationHover img,
|
330
|
+
.thumb img {
|
331
|
+
width: 100%;
|
332
|
+
height: 100%;
|
333
|
+
}
|
334
|
+
|
335
|
+
/* beside layout */
|
336
|
+
#preview.beside .thumb {
|
337
|
+
display: none;
|
338
|
+
position: absolute;
|
339
|
+
overflow: hidden;
|
340
|
+
width: 34%;
|
341
|
+
top: 1em;
|
342
|
+
}
|
343
|
+
#preview.beside .thumb .container {
|
344
|
+
width: auto;
|
345
|
+
}
|
346
|
+
|
347
|
+
#nextSlide.beside {
|
348
|
+
right: 1em;
|
349
|
+
}
|
350
|
+
#preview.beside #preso {
|
351
|
+
position: absolute;
|
352
|
+
left: 1em;
|
353
|
+
}
|
354
|
+
|
355
|
+
|
239
356
|
#preview input[type=button].display {
|
240
357
|
display: inline;
|
241
358
|
}
|
@@ -247,8 +364,12 @@
|
|
247
364
|
font-weight: 900;
|
248
365
|
}
|
249
366
|
|
250
|
-
#disconnected {
|
367
|
+
#preview img#disconnected {
|
251
368
|
margin: 0.5em 1em;
|
369
|
+
float: none;
|
370
|
+
position: absolute;
|
371
|
+
bottom: 0;
|
372
|
+
left: 0;
|
252
373
|
}
|
253
374
|
|
254
375
|
#preview .incremental.hidden {
|
@@ -259,11 +380,29 @@
|
|
259
380
|
color: #404040;
|
260
381
|
}
|
261
382
|
|
383
|
+
/* floating layout */
|
384
|
+
body.floating {
|
385
|
+
margin: 0.5em;
|
386
|
+
width: unset !important;
|
387
|
+
max-width: unset !important;
|
388
|
+
}
|
389
|
+
body.floating.next {
|
390
|
+
transform: scale(.5);
|
391
|
+
transform-origin: 0 0;
|
392
|
+
width: 200% !important;
|
393
|
+
}
|
394
|
+
html > body.floating.notes,
|
395
|
+
body.floating.notes {
|
396
|
+
overflow: auto;
|
397
|
+
height: auto;
|
398
|
+
}
|
399
|
+
|
262
400
|
|
263
401
|
#preso {
|
264
402
|
-webkit-box-shadow:0 0 25px rgba(0,0,0,0.35);
|
265
403
|
-moz-box-shadow:0 0 25px rgba(0,0,0,0.35);
|
266
404
|
box-shadow:0 0 25px rgba(0,0,0,0.35);
|
405
|
+
position: absolute;
|
267
406
|
}
|
268
407
|
|
269
408
|
#statusbar {
|
@@ -545,7 +684,8 @@ a.controls {
|
|
545
684
|
}
|
546
685
|
#links .desktop,
|
547
686
|
#separator,
|
548
|
-
#stylepicker
|
687
|
+
#stylepicker,
|
688
|
+
#layoutSelector {
|
549
689
|
display: none !important;
|
550
690
|
}
|
551
691
|
#links {
|
data/public/css/showoff.css
CHANGED
@@ -52,6 +52,10 @@ pre code {
|
|
52
52
|
overflow: hidden;
|
53
53
|
}
|
54
54
|
|
55
|
+
body.busy {
|
56
|
+
cursor: progress;
|
57
|
+
}
|
58
|
+
|
55
59
|
body#download {
|
56
60
|
overflow: auto;
|
57
61
|
}
|
@@ -67,6 +71,7 @@ pre code {
|
|
67
71
|
background-repeat: no-repeat;
|
68
72
|
background-position: center;
|
69
73
|
background-size: cover;
|
74
|
+
position: relative;
|
70
75
|
}
|
71
76
|
|
72
77
|
.slide {
|
@@ -914,16 +919,18 @@ form .element {
|
|
914
919
|
.callout.question,
|
915
920
|
.callout.exercise,
|
916
921
|
.callout.stop,
|
917
|
-
.callout.thumbsup
|
922
|
+
.callout.thumbsup,
|
923
|
+
.callout.conversation {
|
918
924
|
padding-left: 3em;
|
919
925
|
}
|
920
926
|
|
921
|
-
.callout.info:before
|
922
|
-
.callout.warning:before
|
923
|
-
.callout.question:before
|
924
|
-
.callout.exercise:before
|
925
|
-
.callout.stop:before
|
926
|
-
.callout.thumbsup:before
|
927
|
+
.callout.info:before { content: "\f05a"; } /* fa-info-circle */
|
928
|
+
.callout.warning:before { content: "\f071"; } /* fa-exclamation-triangle */
|
929
|
+
.callout.question:before { content: "\f059"; } /* fa-question-circle */
|
930
|
+
.callout.exercise:before { content: "\f41b"; } /* fa-pencil-square */
|
931
|
+
.callout.stop:before { content: "\f05e"; } /* fa-ban */
|
932
|
+
.callout.thumbsup:before { content: "\f164"; } /* fa-thumbs-up */
|
933
|
+
.callout.conversation:before { content: "\f0e5"; } /* fa-comment */
|
927
934
|
|
928
935
|
/* callouts used on error pages */
|
929
936
|
.error .callout {
|
@@ -971,8 +978,9 @@ h1.section_title {
|
|
971
978
|
padding: 0;
|
972
979
|
}
|
973
980
|
body > #preso {
|
974
|
-
|
975
|
-
|
981
|
+
transform: scale(.32);
|
982
|
+
transform-origin: 0 0;
|
983
|
+
width: 2928px;
|
976
984
|
}
|
977
985
|
#preso .slide {
|
978
986
|
width: 100%;
|