showoff 0.9.9.1 → 0.9.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0080fe47746b9d7e62a7f292bf49d8555b2bad00
4
- data.tar.gz: 5a8e9351d58e105ac6d24ccdc033d552c21f514d
3
+ metadata.gz: addc994cfd5492d9ca208490be1263930272cccd
4
+ data.tar.gz: a615f934502ee5ba58767aabd025e0a8f4d9075d
5
5
  SHA512:
6
- metadata.gz: 468a5f201d88440a9bb8feb3a63b5a0f6d0d35fb0d203860f5803b9a201ab725d1eac8ef5b133329c6e7ecd55893ea15eec134967152be08e369255325602af8
7
- data.tar.gz: e8a6976a15134dd25d1934a7363397d7f63a2050c43b17e5ef5536a5b71a91aa616c51ca986df071debe0fe79956932d651f978bfd9186a286b88d8518e55084
6
+ metadata.gz: 667f49e11f8fb6bebc5576446874556e85e81abcf041ab94f7d4731dfd0ea9bc4db7ae203d756b24087326fd048b0d61a2d98fe9c0a13a3836a1c7dc22e6f285
7
+ data.tar.gz: 1b30d26ad6cfa760e6fcb80e722bbc2422c3337027ca4bbe6893ad733dc599c059b7a9278705c4fb0a4b2cf57896131d160e73dc1089df662e204af79beb58bb
@@ -1,3 +1,3 @@
1
1
  # No namespace here since ShowOff is a class and I'd have to inherit from
2
2
  # Sinatra::Application (which we don't want to load here)
3
- SHOWOFF_VERSION = '0.9.9.1'
3
+ SHOWOFF_VERSION = '0.9.10'
data/lib/showoff_utils.rb CHANGED
@@ -323,7 +323,7 @@ class ShowOffUtils
323
323
  get_config_option(dir, "markdown", "redcarpet")
324
324
  end
325
325
 
326
- def self.showoff_renderer_options(dir = '.', default_options = {})
326
+ def self.showoff_renderer_options(dir = '.', default_options = MarkdownConfig::defaults(dir))
327
327
  opts = get_config_option(dir, showoff_markdown(dir), default_options)
328
328
  Hash[opts.map {|k, v| [k.to_sym, v]}] if opts # keys must be symbols
329
329
  end
@@ -447,4 +447,34 @@ module MarkdownConfig
447
447
 
448
448
  end
449
449
  end
450
+
451
+ def self.defaults(dir_name)
452
+ case ShowOffUtils.showoff_markdown(dir_name)
453
+ when 'rdiscount'
454
+ {
455
+ :autolink => true,
456
+ }
457
+ when 'maruku'
458
+ {}
459
+ when 'bluecloth'
460
+ {
461
+ :auto_links => true,
462
+ :definition_lists => true,
463
+ :strikethrough => true,
464
+ :superscript => true,
465
+ :tables => true,
466
+ }
467
+ when 'kramdown'
468
+ {}
469
+ else
470
+ {
471
+ :autolink => true,
472
+ :no_intra_emphasis => true,
473
+ :strikethrough => true,
474
+ :superscript => true,
475
+ :tables => true,
476
+ :underline => true,
477
+ }
478
+ end
479
+ end
450
480
  end
Binary file
Binary file
@@ -1,6 +1,11 @@
1
1
  /* Sizes must be defined for child elements to use them in fluid calculations. */
2
2
  #main {
3
3
  height: 100%;
4
+ height: 100vh;
5
+ display: -webkit-flex;
6
+ display: flex;
7
+ -webkit-flex-flow: column;
8
+ flex-flow: column;
4
9
  min-width: 630px;
5
10
  }
6
11
 
@@ -10,10 +15,7 @@ div.zoomed {
10
15
  -moz-transform-origin: 0 0;
11
16
  }
12
17
 
13
- #preso { margin: 2% auto; }
14
-
15
18
  #topbar {
16
- height: 5%;
17
19
  min-height: 24px;
18
20
  background: #cfcfcf;
19
21
  vertical-align: middle;
@@ -53,24 +55,41 @@ div.zoomed {
53
55
  display: none;
54
56
  }
55
57
 
56
-
57
58
  #center {
58
- height: 75%;
59
+ display: -webkit-flex;
60
+ display: flex;
61
+ -webkit-flex-flow: row;
62
+ flex-flow: row;
63
+ -webkit-flex: 5;
64
+ flex: 5;
59
65
  background-color: #fff;
60
66
  }
61
67
  #sidebar {
62
- width: 25%;
68
+ display: -webkit-flex;
69
+ display: flex;
70
+ -webkit-flex-flow: column;
71
+ flex-flow: column;
72
+ -webkit-flex: 1;
73
+ flex: 1;
74
+ -webkit-order: 0;
75
+ order: 0;
63
76
  min-width: 210px;
64
- height: 100%;
65
- float: left;
66
77
  padding: 0;
67
78
  margin: 0;
68
- border-right: 2px solid #ccc;
79
+ background-color: #fff;
80
+ border-right: 1px solid #ccc;
69
81
  }
70
82
  #timerSection {
71
- height: 5%;
72
- margin-left: 0.5em;
73
- min-height: 25px;
83
+ margin-bottom: 0.25em;
84
+ padding-left: 0.5em;
85
+ height: 2.15em;
86
+ line-height: 2.15em;
87
+ vertical-align: middle;
88
+ }
89
+
90
+ #timerSection #timerInfo {
91
+ margin-left: 25px;
92
+ font-weight: bold;
74
93
  }
75
94
 
76
95
  #timerSection input[type='button'] {
@@ -82,38 +101,39 @@ div.zoomed {
82
101
  .tRed { background: #d99; }
83
102
  .tYellow { background: #dd9; }
84
103
 
85
- #sidebar #feedbackPace {
86
- height: 10%;
87
- position: relative;
88
- background: transparent url(pace.png) no-repeat center bottom;
89
- }
90
- #sidebar #feedbackPace #paceFast,
91
- #sidebar #feedbackPace #paceSlow {
92
- font-size: 1.5em;
93
- font-weight: bold;
94
- display: none;
95
- }
96
- #sidebar #feedbackPace #paceFast {
97
- float: left;
98
- margin-left: 1em;
99
- }
100
- #sidebar #feedbackPace #paceSlow {
101
- float: right;
102
- margin-right: 1em;
103
- }
104
- #sidebar #feedbackPace #paceMarker {
105
- left: 50%;
106
- position: absolute;
107
- transform: translate(-50%, -50%);
108
- -webkit-transform: translate(-50%, 0);
109
- -moz-transform: translate(-50%, 0);
110
- -ms-transform: translate(-50%, 0);
111
- -o-transform: translate(-50%, 0);
104
+ #sidebar #feedbackPace {
105
+ height: 40px;
106
+ position: relative;
107
+ background: transparent url(pace.png) no-repeat center bottom;
108
+ }
109
+ #sidebar #feedbackPace #paceFast,
110
+ #sidebar #feedbackPace #paceSlow {
111
+ font-size: 1.5em;
112
+ font-weight: bold;
113
+ display: none;
114
+ }
115
+ #sidebar #feedbackPace #paceFast {
116
+ float: left;
117
+ margin-left: 1em;
118
+ }
119
+ #sidebar #feedbackPace #paceSlow {
120
+ float: right;
121
+ margin-right: 1em;
122
+ }
123
+ #sidebar #feedbackPace #paceMarker {
124
+ left: 50%;
125
+ position: absolute;
126
+ transform: translate(-50%, -50%);
127
+ -webkit-transform: translate(-50%, 0);
128
+ -moz-transform: translate(-50%, 0);
129
+ -ms-transform: translate(-50%, 0);
130
+ -o-transform: translate(-50%, 0);
112
131
 
113
- }
132
+ }
114
133
 
115
134
  #slidemenu {
116
- height: 85%;
135
+ -webkit-flex: 1;
136
+ flex: 1;
117
137
  background-color: #fff;
118
138
  }
119
139
  #slidemenu ul li {
@@ -121,9 +141,14 @@ div.zoomed {
121
141
  }
122
142
 
123
143
  .menu {
124
- height: 100%;
125
- max-height: 100%;
144
+ -webkit-flex: 1;
145
+ flex: 1;
126
146
  overflow:auto;
147
+ background-color: #fff;
148
+ font-family: helvetica;
149
+ }
150
+ .menu ul li {
151
+ padding: 5px;
127
152
  }
128
153
 
129
154
  .menu a {
@@ -135,7 +160,9 @@ div.zoomed {
135
160
  -webkit-border-radius: 0.25em;
136
161
  -khtml-border-radius: 0.25em;
137
162
  border-radius: 0.25em;
163
+ text-decoration: none;
138
164
  }
165
+ .menu li.highlighted a,
139
166
  .menu a:hover {
140
167
  margin: 0;
141
168
  border: 1px solid #ccc;
@@ -143,78 +170,93 @@ div.zoomed {
143
170
  }
144
171
  .menu > ul > li > ul {
145
172
  padding-left: 20px;
146
- font-size: 80%;
173
+ font-size: 120%;
174
+ font-weight: 100;
147
175
  }
148
176
  .menu > ul > li > a {
149
177
  padding: 10px;
150
178
  background: #eee;
179
+ font-size: 140%;
151
180
  }
152
181
 
153
-
154
- #preview {
155
- height: 95%;
156
- overflow: auto;
157
- background: #eee;
182
+ #presenter {
183
+ display: -webkit-flex;
184
+ display: flex;
185
+ -webkit-flex-flow: column;
186
+ flex-flow: column;
187
+ -webkit-flex: 4;
188
+ flex: 4;
189
+ -webkit-order: 1;
190
+ order: 1;
158
191
  }
159
192
 
160
- #preview .content form div.tools input[type=button].display {
161
- display: inline;
162
- }
163
- #preview .content form div.tools input[type=submit] {
164
- display: none;
165
- }
193
+ #preview {
194
+ -webkit-flex: 1;
195
+ flex: 1;
196
+ overflow: auto;
197
+ background: #eee;
198
+ padding: 1em;
199
+ }
166
200
 
167
- img#disconnected {
168
- margin: 0.5em 1em;
169
- }
201
+ #preview .content form div.tools input[type=button].display {
202
+ display: inline;
203
+ }
204
+ #preview .content form div.tools input[type=submit] {
205
+ display: none;
206
+ }
170
207
 
171
- #statusbar {
172
- height: 5%;
173
- vertical-align: middle;
174
- }
175
- #progress {
176
- margin-left: 1em;
177
- }
178
- #debugInfo {
179
- display: inline;
180
- }
181
- #enableFollower,
182
- #enableRemote {
183
- float: right;
184
- border: 1px solid #ccc;
185
- margin: 1px;
186
- padding: 0.1em;
187
- -moz-border-radius: 0.25em;
188
- -webkit-border-radius: 0.25em;
189
- -khtml-border-radius: 0.25em;
190
- border-radius: 0.25em;
191
- }
192
- #enableRemote.active {
193
- background-color: #fff8bf;
194
- -webkit-box-shadow: 0px 0px 15px 5px rgba(255, 255, 190, .75);
195
- -moz-box-shadow: 0px 0px 15px 5px rgba(255, 255, 190, .75);
196
- box-shadow: 0px 0px 15px 5px rgba(255, 255, 190, .75);
197
- }
198
- #zoomer {
199
- float: right;
200
- }
208
+ img#disconnected {
209
+ margin: 0.5em 1em;
210
+ }
201
211
 
202
- #separator {
203
- clear: both;
204
- border-bottom: 2px solid #ccc;
205
- }
212
+ #statusbar {
213
+ height: 22px;
214
+ line-height: 22px;
215
+ text-transform: uppercase;
216
+ vertical-align: middle;
217
+ background: #fff;
218
+ }
219
+ #progress {
220
+ margin-left: 1em;
221
+ position: relative;
222
+ }
223
+ #debugInfo {
224
+ display: inline;
225
+ }
226
+ #enableFollower,
227
+ #enableRemote {
228
+ float: right;
229
+ margin: 1px;
230
+ padding: 0.1em;
231
+ }
232
+ #enableRemote.active {
233
+ background-color: #fff8bf;
234
+ -webkit-box-shadow: 0px 0px 15px 5px rgba(255, 255, 190, .75);
235
+ -moz-box-shadow: 0px 0px 15px 5px rgba(255, 255, 190, .75);
236
+ box-shadow: 0px 0px 15px 5px rgba(255, 255, 190, .75);
237
+ }
238
+ #zoomer {
239
+ float: right;
240
+ }
206
241
 
207
242
  #bottom {
208
- height: 20%;
209
- background: #ff9;
243
+ display: -webkit-flex;
244
+ display: flex;
245
+ -webkit-flex-flow: row;
246
+ flex-flow: row;
247
+ height: 150px;
248
+ background: #F5ED9B;
249
+ border-top: 1px solid #ccc;
210
250
  }
211
251
 
212
252
  #questions {
213
- float: left;
214
- width: 25%;
253
+ -webkit-flex: 1;
254
+ flex: 1;
255
+ -webkit-order: 0;
256
+ order: 0;
215
257
  min-width: 210px;
216
- border-right: 2px solid #ccc;
217
- font-size: 1.5em;
258
+ border-right: 1px solid #ccc;
259
+ font-size: 1.2em;
218
260
  overflow: auto;
219
261
  height: 100%;
220
262
  }
@@ -223,17 +265,31 @@ img#disconnected {
223
265
  }
224
266
  #questions ul {
225
267
  margin-left: 1.5em;
268
+ margin-right: 0.25em;
226
269
  }
227
270
  #questions ul li {
228
271
  list-style-type: disc;
229
272
  }
273
+ #questions ul li:hover {
274
+ background: #dedede url(close.png) no-repeat center center;
275
+ color: transparent;
276
+ -moz-border-radius: 1em;
277
+ -webkit-border-radius: 1em;
278
+ -khtml-border-radius: 1em;
279
+ border-radius: 1em;
280
+ }
230
281
 
231
282
  #notes {
232
- float: right;
233
- width: 74%;
283
+ -webkit-flex: 4;
284
+ flex: 4;
285
+ -webkit-order: 1;
286
+ order: 1;
234
287
  font-size: 1.5em;
235
288
  overflow: auto;
236
289
  height: 100%;
290
+ font-family: helvetica;
291
+ font-weight: 100;
292
+ padding: 0 0.25em;
237
293
  }
238
294
  #notes p,
239
295
  #notes h1,
@@ -250,6 +306,7 @@ img#disconnected {
250
306
  }
251
307
  #notes ol, #notes ul {
252
308
  padding-left: 2em;
309
+ margin-bottom: 0.5em;
253
310
  }
254
311
  #notes ol {
255
312
  list-style-type: decimal;
@@ -285,18 +342,42 @@ a.controls {
285
342
 
286
343
  /* iPhone */
287
344
  /* Portrait */
288
- @media screen and (max-width: 320px)
345
+ @media screen and (max-width: 480px)
289
346
  {
347
+ #main {
348
+ min-width: 0;
349
+ }
350
+
351
+ #center {
352
+ -webkit-flex-flow: column;
353
+ flex-flow: column;
354
+ -webkit-flex: 1;
355
+ flex: 1;
356
+ }
357
+ #bottom {
358
+ -webkit-flex-flow: column;
359
+ flex-flow: column;
360
+ -webkit-flex: 1;
361
+ flex: 1;
362
+ }
363
+ #bottom #questions {
364
+ border-bottom: 1px solid #ccc;
365
+ -webkit-flex: 1;
366
+ flex: 1;
367
+ }
368
+ #bottom #notes {
369
+ -webkit-flex: 2;
370
+ flex: 2;
371
+ }
290
372
  #topbar,#main,#center,#preview,#bottom,#sidebar {
291
- min-width: 320px !important;
292
- max-width: 320px !important;
293
- width: 320px !important;
294
373
  margin: 0;
295
374
  padding: 0;
296
375
  }
297
376
  #topbar #slideSource {
298
377
  max-width: 256px;
299
378
  overflow: hidden;
379
+ height: 16px;
380
+ padding-left: 16px;
300
381
  }
301
382
  #topbar #slideSource #slideFile {
302
383
  display: inline-block;
@@ -319,15 +400,30 @@ a.controls {
319
400
  #topbar #links .mobile {
320
401
  display: inline;
321
402
  }
322
- #center {
323
- height: 267px;
403
+
404
+ #topbar {
405
+ background-image: url(menu.png);
406
+ background-position: left center;
407
+ background-repeat: no-repeat;
324
408
  }
325
- #statusbar {
326
- vertical-align: top;
327
- font-size: 0.75em;
409
+ #sidebar {
410
+ display: block;
411
+ position: absolute;
412
+ top: 25px;
413
+ z-index: 99999;
414
+ height: 100%;
415
+ overflow: scroll;
416
+ display: none;
328
417
  }
329
- #statusbar * {
330
- vertical-align: top;
418
+ #sidebar #timerSection,
419
+ #sidebar #feedbackPace {
420
+ display: none;
421
+ }
422
+
423
+
424
+ #statusbar {
425
+ height: auto;
426
+ line-height: inherit;
331
427
  }
332
428
  #statusbar #enableRemote,
333
429
  #statusbar #enableFollower {
@@ -346,12 +442,6 @@ a.controls {
346
442
  height: 245px;
347
443
  overflow: auto;
348
444
  }
349
- #sidebar {
350
- position: absolute;
351
- top: 534px;
352
- float: none;
353
- height: auto;
354
- }
355
445
  #preso {
356
446
  width: 976px;
357
447
  margin: 0;
@@ -234,6 +234,52 @@ img#disconnected {
234
234
  font-weight: bold;
235
235
  }
236
236
 
237
+ /**********************************
238
+ *** Table styling ***
239
+ **********************************/
240
+
241
+ .content table {
242
+ margin-left: auto;
243
+ margin-right: auto;
244
+ border-collapse:collapse;
245
+ width: 80%;
246
+ font-size: 1.7em;
247
+ }
248
+
249
+ .content.small table {
250
+ font-size: 1.6em;
251
+ width: 90%;
252
+ }
253
+ .content.smaller table {
254
+ font-size: 1.5em;
255
+ width: 95%;
256
+ }
257
+
258
+ .content table th {
259
+ border-bottom: 2px solid #ccc;
260
+ padding: 0.5em;
261
+ font-weight: bold;
262
+ }
263
+
264
+ .content table tr td {
265
+ border-right: 1px solid #eee;
266
+ border-bottom: 1px solid #efefef;
267
+ text-align: center;
268
+ padding: 0.5em;
269
+ }
270
+
271
+ .content table tr td:last-child {
272
+ border-right: none;
273
+ }
274
+
275
+ .content table li {
276
+ list-style-type: disc;
277
+ }
278
+
279
+
280
+ /**********************************
281
+ *** Sidebar styling ***
282
+ **********************************/
237
283
 
238
284
  #feedbackWrapper {
239
285
  float: left;
@@ -6,7 +6,7 @@ var paceData = [];
6
6
 
7
7
  $(document).ready(function(){
8
8
  // set up the presenter modes
9
- mode = { track: false, follow: true, update: true, slave: false, next: false};
9
+ mode = { track: true, follow: true, update: true, slave: false, next: false};
10
10
 
11
11
  // attempt to open another window for the presentation if the mode defaults
12
12
  // to enabling this. It does not by default, so this is likely a no-op.
@@ -56,22 +56,28 @@ $(document).ready(function(){
56
56
  $('#zoomer').tipsy({ gravity: 'ne' });
57
57
 
58
58
  // Bind events for mobile viewing
59
- $('#preso').unbind('tap').unbind('swipeleft').unbind('swiperight');
59
+ if( mobile() ) {
60
+ $('#preso').unbind('tap').unbind('swipeleft').unbind('swiperight');
60
61
 
61
- $('#preso').addSwipeEvents().
62
- bind('tap', presNextStep). // next
63
- bind('swipeleft', presNextStep). // next
64
- bind('swiperight', presPrevStep); // prev
62
+ $('#preso').addSwipeEvents().
63
+ bind('tap', presNextStep). // next
64
+ bind('swipeleft', presNextStep). // next
65
+ bind('swiperight', presPrevStep); // prev
65
66
 
66
- $('#remoteToggle').change( toggleFollower );
67
- $('#followerToggle').change( toggleUpdater );
67
+ $('#topbar #slideSource').click( function(e) {
68
+ $('#sidebar').toggle();
69
+ });
68
70
 
69
- $('#topbar #update').click( function(e) {
70
- e.preventDefault();
71
- $.get("/getpage", function(data) {
72
- gotoSlide(data);
71
+ $('#topbar #update').click( function(e) {
72
+ e.preventDefault();
73
+ $.get("/getpage", function(data) {
74
+ gotoSlide(data);
75
+ });
73
76
  });
74
- });
77
+ }
78
+
79
+ $('#remoteToggle').change( toggleFollower );
80
+ $('#followerToggle').change( toggleUpdater );
75
81
 
76
82
  setInterval(function() { updatePace() }, 1000);
77
83
 
@@ -110,7 +116,7 @@ function reportIssue() {
110
116
  }
111
117
 
112
118
  function editSlide() {
113
- var slide = $("span#slideFile").text();
119
+ var slide = $("span#slideFile").text().replace(/\/\d+$/, '');
114
120
  var link = editUrl + slide + ".md";
115
121
  window.open(link);
116
122
  }
@@ -212,6 +218,10 @@ function openNext()
212
218
 
213
219
  function askQuestion(question) {
214
220
  $("#questions ul").prepend($('<li/>').text(question));
221
+
222
+ $('#questions ul li:first-child').click( function(e) {
223
+ $(this).remove();
224
+ });
215
225
  }
216
226
 
217
227
  function paceFeedback(pace) {
@@ -494,6 +504,7 @@ function toggleTimer()
494
504
  seconds = 0
495
505
  timerRunning = false
496
506
  totalMinutes = 0
507
+ setProgressColor(false)
497
508
  $("#timerInfo").text('')
498
509
  $("#minStart").show()
499
510
  $("#minStop").hide()
@@ -515,6 +526,9 @@ function setProgressColor(progress) {
515
526
  ts.removeClass('tGreen')
516
527
  ts.removeClass('tYellow')
517
528
  ts.removeClass('tRed')
529
+
530
+ if(progress === false) return;
531
+
518
532
  if(progress > 10) {
519
533
  ts.addClass('tBlue')
520
534
  } else if (progress > 0) {
@@ -532,17 +546,6 @@ var setCurrentStyle = function(style, prop) {
532
546
  try { slaveWindow.setCurrentStyle(style, false); } catch (e) {}
533
547
  }
534
548
 
535
- function mobile() {
536
- return ( navigator.userAgent.match(/Android/i)
537
- || navigator.userAgent.match(/webOS/i)
538
- || navigator.userAgent.match(/iPhone/i)
539
- || navigator.userAgent.match(/iPad/i)
540
- || navigator.userAgent.match(/iPod/i)
541
- || navigator.userAgent.match(/BlackBerry/i)
542
- || navigator.userAgent.match(/Windows Phone/i)
543
- );
544
- }
545
-
546
549
  /********************
547
550
  Follower Code
548
551
  ********************/
data/public/js/showoff.js CHANGED
@@ -27,6 +27,7 @@ var loadSlidesPrefix
27
27
 
28
28
  var mode = { track: true, follow: false };
29
29
 
30
+
30
31
  function setupPreso(load_slides, prefix) {
31
32
  if (preso_started)
32
33
  {
@@ -346,8 +347,23 @@ function showSlide(back_step, updatepv) {
346
347
  pv.postSlide();
347
348
 
348
349
  pv.update();
350
+
349
351
  }
350
352
 
353
+ // Update presenter view nav for current slide
354
+ $( ".menu > ul > li > ul > li" ).each(function() {
355
+ if ($(this).text().split(". ")[0] == slidenum+1) {
356
+ $(".menu > ul > li > ul ").hide(); //Collapse nav
357
+ $(".menu > ul > li > ul > li").removeClass('highlighted');
358
+ $(this).addClass('highlighted'); //Highlight current menu item
359
+ $(this).parent().show(); //Show nav block containing current slide
360
+
361
+ if( ! mobile() ) {
362
+ $(this).get(0).scrollIntoView(); //Scroll so current item is at the top of the view
363
+ }
364
+ }
365
+ });
366
+
351
367
  return ret;
352
368
  }
353
369
 
@@ -666,7 +682,7 @@ function track() {
666
682
 
667
683
  // Open a new tab with an online code editor, if so configured
668
684
  function editSlide() {
669
- var slide = $("span#slideFilename").text();
685
+ var slide = $("span#slideFilename").text().replace(/\/\d+$/, '');
670
686
  var link = editUrl + slide + ".md";
671
687
  window.open(link);
672
688
  }
@@ -1236,3 +1252,19 @@ function setupStats()
1236
1252
  $(this).find("div.detail").slideToggle("fast");
1237
1253
  });
1238
1254
  }
1255
+
1256
+ /* Is this a mobile device? */
1257
+ function mobile() {
1258
+ /*
1259
+ return ( navigator.userAgent.match(/Android/i)
1260
+ || navigator.userAgent.match(/webOS/i)
1261
+ || navigator.userAgent.match(/iPhone/i)
1262
+ || navigator.userAgent.match(/iPad/i)
1263
+ || navigator.userAgent.match(/iPod/i)
1264
+ || navigator.userAgent.match(/BlackBerry/i)
1265
+ || navigator.userAgent.match(/Windows Phone/i)
1266
+ );
1267
+ */
1268
+
1269
+ return ( $(window).width() <= 480 )
1270
+ }
data/views/presenter.erb CHANGED
@@ -1,5 +1,4 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
1
+ <!DOCTYPE html>
3
2
 
4
3
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
4
  <head>
@@ -29,8 +28,8 @@
29
28
  </table>
30
29
  </div>
31
30
 
32
- <div id="main" class="container_12">
33
- <div id="topbar" class="grid_12">
31
+ <div id="main">
32
+ <div id="topbar">
34
33
  <div id="slideSource">
35
34
  Source: <span id="slideFile"></span>
36
35
  </div>
@@ -56,7 +55,7 @@
56
55
  </div>
57
56
 
58
57
  <div id="center">
59
- <div id="sidebar" class="grid_4">
58
+ <div id="sidebar">
60
59
  <div id="timerSection">
61
60
  Timer:
62
61
  <span id="minStart">
@@ -71,32 +70,30 @@
71
70
  <span id="paceFast">Slow Down!</span>
72
71
  <img id="paceMarker" src="<%= @asset_path %>/css/paceMarker.png" />
73
72
  </div>
74
- <div id="slidemenu">
75
- <div id="navigation" class="menu"></div>
76
- </div>
77
- </div>
78
- <div id="preview" class="grid_8">
79
- <img id="disconnected" src="<%= @asset_path %>/css/disconnected-large.png" />
80
- <div id="preso" class="zoomed">loading presentation...</div>
73
+ <div id="navigation" class="menu"></div>
81
74
  </div>
82
- <div id="statusbar">
83
- <span id="progress">
84
- Slide: <span id="slideInfo"></span>
85
- </span>
86
- <div id="debugInfo"></div>
87
- <input id="zoomer" type="range" min="0.5" max="1.5" step="0.01" onchange="javascript:zoom();" title="Alter the zoom level of the slide preview." />
88
- <span id="enableRemote" title="Enables tracking of other presenters.">
89
- <label for="remoteToggle">Enable Remote</label><input type="checkbox" id="remoteToggle" checked />
90
- </span>
91
- <span id="enableFollower" title="Send slide change notifications.">
92
- <label for="followerToggle">Update Follower</label><input type="checkbox" id="followerToggle" checked />
93
- </span>
75
+ <div id="presenter">
76
+ <div id="preview">
77
+ <img id="disconnected" src="<%= @asset_path %>/css/disconnected-large.png" />
78
+ <div id="preso" class="zoomed">loading presentation...</div>
79
+ </div>
80
+ <div id="statusbar">
81
+ <span id="progress">
82
+ Slide: <span id="slideInfo"></span>
83
+ </span>
84
+ <div id="debugInfo"></div>
85
+ <input id="zoomer" type="range" min="0.5" max="1.5" step="0.01" onchange="javascript:zoom();" title="Alter the zoom level of the slide preview." />
86
+ <span id="enableRemote" title="Enables tracking of other presenters.">
87
+ <label for="remoteToggle">Enable Remote</label><input type="checkbox" id="remoteToggle" checked />
88
+ </span>
89
+ <span id="enableFollower" title="Send slide change notifications.">
90
+ <label for="followerToggle">Update Follower</label><input type="checkbox" id="followerToggle" checked />
91
+ </span>
92
+ </div>
94
93
  </div>
95
94
  </div>
96
95
 
97
- <div id="separator"></div>
98
-
99
- <div id="bottom" class="grid_12">
96
+ <div id="bottom">
100
97
  <div id="questions">
101
98
  <h3>Audience Questions</h3>
102
99
  <ul></ul>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: showoff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.9.1
4
+ version: 0.9.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Chacon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-15 00:00:00.000000000 Z
11
+ date: 2014-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra
@@ -182,12 +182,14 @@ files:
182
182
  - views/onepage.erb
183
183
  - views/presenter.erb
184
184
  - views/stats.erb
185
+ - public/css/close.png
185
186
  - public/css/disconnected-large.png
186
187
  - public/css/disconnected.png
187
188
  - public/css/fast.png
188
189
  - public/css/fg.menu.css
189
190
  - public/css/grippy-close.png
190
191
  - public/css/grippy.png
192
+ - public/css/menu.png
191
193
  - public/css/onepage.css
192
194
  - public/css/pace.png
193
195
  - public/css/paceMarker.png