showoff 0.19.6 → 0.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/lib/showoff.rb +15 -17
  3. data/lib/showoff/version.rb +1 -1
  4. data/lib/showoff_utils.rb +2 -2
  5. data/public/css/font-awesome-5.6.1/css/all.min.css +5 -0
  6. data/public/css/font-awesome-5.6.1/webfonts/fa-brands-400.eot +0 -0
  7. data/public/css/font-awesome-5.6.1/webfonts/fa-brands-400.svg +1260 -0
  8. data/public/css/font-awesome-5.6.1/webfonts/fa-brands-400.ttf +0 -0
  9. data/public/css/font-awesome-5.6.1/webfonts/fa-brands-400.woff +0 -0
  10. data/public/css/font-awesome-5.6.1/webfonts/fa-brands-400.woff2 +0 -0
  11. data/public/css/font-awesome-5.6.1/webfonts/fa-regular-400.eot +0 -0
  12. data/public/css/font-awesome-5.6.1/webfonts/fa-regular-400.svg +471 -0
  13. data/public/css/font-awesome-5.6.1/webfonts/fa-regular-400.ttf +0 -0
  14. data/public/css/font-awesome-5.6.1/webfonts/fa-regular-400.woff +0 -0
  15. data/public/css/font-awesome-5.6.1/webfonts/fa-regular-400.woff2 +0 -0
  16. data/public/css/font-awesome-5.6.1/webfonts/fa-solid-900.eot +0 -0
  17. data/public/css/font-awesome-5.6.1/webfonts/fa-solid-900.svg +2760 -0
  18. data/public/css/font-awesome-5.6.1/webfonts/fa-solid-900.ttf +0 -0
  19. data/public/css/font-awesome-5.6.1/webfonts/fa-solid-900.woff +0 -0
  20. data/public/css/font-awesome-5.6.1/webfonts/fa-solid-900.woff2 +0 -0
  21. data/public/css/showoff.css +22 -3
  22. data/public/js/highlightjs-line-numbers.min.js +1 -0
  23. data/public/js/presenter.js +9 -9
  24. data/public/js/showoff.js +33 -25
  25. data/views/download.erb +2 -2
  26. data/views/header.erb +27 -26
  27. data/views/header_mini.erb +8 -8
  28. data/views/index.erb +2 -2
  29. data/views/onepage.erb +7 -7
  30. data/views/presenter.erb +6 -6
  31. data/views/stats.erb +1 -1
  32. metadata +20 -10
  33. data/public/css/font-awesome-4.4.0/css/font-awesome.min.css +0 -4
  34. data/public/css/font-awesome-4.4.0/fonts/FontAwesome.otf +0 -0
  35. data/public/css/font-awesome-4.4.0/fonts/fontawesome-webfont.eot +0 -0
  36. data/public/css/font-awesome-4.4.0/fonts/fontawesome-webfont.svg +0 -640
  37. data/public/css/font-awesome-4.4.0/fonts/fontawesome-webfont.ttf +0 -0
  38. data/public/css/font-awesome-4.4.0/fonts/fontawesome-webfont.woff +0 -0
  39. data/public/css/font-awesome-4.4.0/fonts/fontawesome-webfont.woff2 +0 -0
@@ -618,6 +618,22 @@ pre.highlight code .highlightedLine {
618
618
  overflow: hidden;
619
619
  }
620
620
 
621
+ /* Fix spaces in line numbered code blocks */
622
+ pre.highlight td.hljs-ln-numbers {
623
+ width: 1.5em;
624
+ text-align: right;
625
+ padding-right: 0.5em;
626
+ }
627
+
628
+ pre.highlight td.hljs-ln-code {
629
+ padding-left: 0.5em;
630
+ }
631
+
632
+ /* Do not add borders to line-numbered lines */
633
+ pre.highlight tr:not(:last-child) {
634
+ border-bottom: none;
635
+ }
636
+
621
637
  /* Diagram styling: overriding mermaid.css as needed */
622
638
  .language-render-diagram,
623
639
  .language-render-diagram .noteText,
@@ -650,8 +666,11 @@ pre.highlight code .highlightedLine {
650
666
  }
651
667
 
652
668
  .executing:hover { cursor: wait; }
653
- /* End code execution */
654
669
 
670
+ .execute.numbers {
671
+ padding-bottom: 1.5em;
672
+ }
673
+ /* End code execution */
655
674
 
656
675
  #tips, #preshow_timer {
657
676
  display:inline;
@@ -1173,7 +1192,7 @@ form .element {
1173
1192
  }
1174
1193
 
1175
1194
  .callout:before {
1176
- font-family: FontAwesome;
1195
+ font-family: "Font Awesome 5 Free";
1177
1196
  font-style: normal;
1178
1197
  font-weight: normal;
1179
1198
  font-size: 2em;
@@ -1182,7 +1201,7 @@ form .element {
1182
1201
  left: 0.3em;
1183
1202
  }
1184
1203
  .callout:after {
1185
- font-family: FontAwesome;
1204
+ font-family: "Font Awesome 5 Free";
1186
1205
  font-style: normal;
1187
1206
  font-weight: normal;
1188
1207
  font-size: 1.5em;
@@ -0,0 +1 @@
1
+ !function(n,e){"use strict";function t(){var n=e.createElement("style");n.type="text/css",n.innerHTML=u(".{0}{border-collapse:collapse}.{0} td{padding:0}.{1}:before{content:attr({2})}",[f,m,j]),e.getElementsByTagName("head")[0].appendChild(n)}function r(t){"interactive"===e.readyState||"complete"===e.readyState?l(t):n.addEventListener("DOMContentLoaded",function(){l(t)})}function l(t){try{var r=e.querySelectorAll("code.hljs");for(var l in r)r.hasOwnProperty(l)&&i(r[l],t)}catch(o){n.console.error("LineNumbers error: ",o)}}function i(n,e){if("object"==typeof n){e=e||{singleLine:!1};var t=e.singleLine?0:1;h(function(){s(n),n.innerHTML=o(n.innerHTML,t)})}}function o(n,e){var t=c(n);if(""===t[t.length-1].trim()&&t.pop(),t.length>e){for(var r="",l=0,i=t.length;l<i;l++)r+=u('<tr><td class="{0}"><div class="{1} {2}" {3}="{5}"></div></td><td class="{4}"><div class="{1}">{6}</div></td></tr>',[p,v,m,j,g,l+1,t[l].length>0?t[l]:" "]);return u('<table class="{0}">{1}</table>',[f,r])}return n}function s(n){var e=n.childNodes;for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];d(r.textContent)>0&&(r.childNodes.length>0?s(r):a(r.parentNode))}}function a(n){var e=n.className;if(/hljs-/.test(e)){for(var t=c(n.innerHTML),r=0,l="";r<t.length;r++){var i=t[r].length>0?t[r]:" ";l+=u('<span class="{0}">{1}</span>\n',[e,i])}n.innerHTML=l.trim()}}function c(n){return 0===n.length?[]:n.split(L)}function d(n){return(n.trim().match(L)||[]).length}function h(e){n.setTimeout(e,0)}function u(n,e){return n.replace(/\{(\d+)\}/g,function(n,t){return e[t]?e[t]:n})}var f="hljs-ln",v="hljs-ln-line",g="hljs-ln-code",p="hljs-ln-numbers",m="hljs-ln-n",j="data-line-number",L=/\r\n|\r|\n/g;n.hljs?(n.hljs.initLineNumbersOnLoad=r,n.hljs.lineNumbersBlock=i,t()):n.console.error("highlight.js not detected!")}(window,document);
@@ -43,8 +43,8 @@ $(document).ready(function(){
43
43
  notesFontSize('increase');
44
44
  });
45
45
 
46
- $('#statslink').click(function(e) { presenterPopupToggle('/stats', e); });
47
- $('#downloadslink').click(function(e) { presenterPopupToggle('/download', e); });
46
+ $('#statslink').click(function(e) { presenterPopupToggle('stats', e); });
47
+ $('#downloadslink').click(function(e) { presenterPopupToggle('download', e); });
48
48
 
49
49
  $('#layoutSelector').change(function(e) { chooseLayout(e.target.value); });
50
50
  chooseLayout(null);
@@ -82,7 +82,7 @@ $(document).ready(function(){
82
82
 
83
83
  $('#topbar #update').click( function(e) {
84
84
  e.preventDefault();
85
- $.get("/getpage", function(data) {
85
+ $.get("getpage", function(data) {
86
86
  gotoSlide(data);
87
87
  });
88
88
  });
@@ -154,7 +154,7 @@ $(document).ready(function(){
154
154
  setInterval(function() { updatePace() }, 1000);
155
155
 
156
156
  setInterval(function() {
157
- $.getJSON("/stats_data", function( json ) {
157
+ $.getJSON("stats_data", function( json ) {
158
158
  var percent = json['stray_p'];
159
159
  if(percent > 25) {
160
160
  $('#topbar #statslink').addClass('warning');
@@ -250,7 +250,7 @@ function editSlide() {
250
250
  // call the edit endpoint to open up a local file editor
251
251
  function openEditor() {
252
252
  var slide = $("span#slideFile").text().replace(/:\d+$/, '');
253
- var link = '/edit/' + slide + ".md";
253
+ var link = 'edit/' + slide + ".md";
254
254
  $.get(link);
255
255
  }
256
256
 
@@ -277,11 +277,11 @@ function openSlave()
277
277
  {
278
278
  try {
279
279
  if(windowIsClosed(slaveWindow)){
280
- slaveWindow = window.open('/' + window.location.hash, 'toolbar');
280
+ slaveWindow = window.open('./' + window.location.hash, 'toolbar');
281
281
  }
282
282
  else if(slaveWindow.location.hash != window.location.hash) {
283
283
  // maybe we need to reset content?
284
- slaveWindow.location.href = '/' + window.location.hash;
284
+ slaveWindow.location.href = './' + window.location.hash;
285
285
  }
286
286
 
287
287
  // give the window time to load before poking at it
@@ -451,7 +451,7 @@ function blankStyledWindow(title, dimensions, classes, resizable) {
451
451
  // them into elements again in the context of the other document.
452
452
  // Because IE.
453
453
 
454
- $(newWindow.document.head).append('<base href="' + window.location.origin + '"/>');
454
+ $(newWindow.document.head).append('<base href="' + location.origin + location.root + '"/>');
455
455
  $('link[rel="stylesheet"]').each(function() {
456
456
  var href = $(this).attr('href');
457
457
  var style = '<link rel="stylesheet" type="text/css" href="' + href + '">'
@@ -508,7 +508,7 @@ function printDialog() {
508
508
  function printSlides(section)
509
509
  {
510
510
  try {
511
- var printWindow = window.open('/print/'+section);
511
+ var printWindow = window.open('print/'+section);
512
512
  printWindow.window.print();
513
513
  }
514
514
  catch(e) {
@@ -4,7 +4,7 @@ var ShowOff = {};
4
4
 
5
5
  var preso_started = false
6
6
  var slidenum = 0
7
- var presenterSlideNum = 0
7
+ var presenterSlideNum = null
8
8
  var slideTotal = 0
9
9
  var slides
10
10
  var currentSlide
@@ -22,11 +22,13 @@ var section = 'handouts'; // default to showing handout notes for display view
22
22
  var slideStartTime = new Date().getTime()
23
23
  var activityIncomplete = false; // slides won't advance when this is on
24
24
 
25
- var loadSlidesBool
26
- var loadSlidesPrefix
25
+ var loadSlidesBool;
27
26
 
28
27
  var mode = { track: true, follow: true };
29
28
 
29
+ // Make sure we have a sane value here
30
+ location.root = location.root || location.pathname;
31
+
30
32
  // global variable to register tours with
31
33
  var tours = {};
32
34
  var menuTourRunning = false;
@@ -52,7 +54,7 @@ document.cookie.split(';').forEach( function(item) {
52
54
 
53
55
  $(document).on('click', 'code.execute', executeCode);
54
56
 
55
- function setupPreso(load_slides, prefix) {
57
+ function setupPreso(load_slides) {
56
58
  if (preso_started) {
57
59
  alert("already started");
58
60
  return;
@@ -73,8 +75,7 @@ function setupPreso(load_slides, prefix) {
73
75
 
74
76
  // Load slides fetches images
75
77
  loadSlidesBool = load_slides;
76
- loadSlidesPrefix = prefix || '/';
77
- loadSlides(loadSlidesBool, loadSlidesPrefix);
78
+ loadSlides(loadSlidesBool);
78
79
 
79
80
  setupSideMenu();
80
81
 
@@ -177,8 +178,8 @@ function setupPreso(load_slides, prefix) {
177
178
 
178
179
  }
179
180
 
180
- function loadSlides(load_slides, prefix, reload, hard) {
181
- var url = loadSlidesPrefix + "slides";
181
+ function loadSlides(load_slides, reload, hard) {
182
+ var url = "slides";
182
183
  if (reload) {
183
184
  url += "?cache=clear";
184
185
  }
@@ -192,18 +193,18 @@ function loadSlides(load_slides, prefix, reload, hard) {
192
193
  }
193
194
  else {
194
195
  $("#slides img").batchImageLoad({
195
- loadingCompleteCallback: initializePresentation(prefix)
196
+ loadingCompleteCallback: initializePresentation()
196
197
  });
197
198
  }
198
199
  })
199
200
  } else {
200
201
  $("#slides img").batchImageLoad({
201
- loadingCompleteCallback: initializePresentation(prefix)
202
+ loadingCompleteCallback: initializePresentation()
202
203
  })
203
204
  }
204
205
  }
205
206
 
206
- function initializePresentation(prefix) {
207
+ function initializePresentation() {
207
208
  // unhide for height to work in static mode
208
209
  $("#slides").show();
209
210
 
@@ -241,6 +242,10 @@ function initializePresentation(prefix) {
241
242
  // then add focus on any lines marked
242
243
  highlightLines(block);
243
244
 
245
+ if($(block).hasClass('numbers')) {
246
+ hljs.lineNumbersBlock(block);
247
+ }
248
+
244
249
  } catch(e) {
245
250
  console.log('Syntax highlighting failed on ' + $(this).closest('div.slide').attr('id'));
246
251
  console.log('Syntax highlighting failed for ' + $(this).attr('class'));
@@ -399,7 +404,7 @@ function setupSideMenu() {
399
404
 
400
405
  $('#fileDownloads').click(function() {
401
406
  closeMenu();
402
- window.open('/download');
407
+ window.open('download');
403
408
  })
404
409
 
405
410
  $("#paceSlower").click(function() {
@@ -670,12 +675,12 @@ function showTour(name, record) {
670
675
  if(record) {
671
676
  clientTours.push(name);
672
677
  document.cookieHash['tours'] = clientTours;
673
- document.cookie = "tours="+JSON.stringify(clientTours);
678
+ document.cookie = "tours="+JSON.stringify(clientTours)+"; max-age=31536000; path=/;";
674
679
  }
675
680
 
676
681
  // this keeps track of the version of the presenter tour we've seen
677
682
  if(name == 'showoff:presenter:auto') {
678
- document.cookie = "tourVersion="+tourVersion;
683
+ document.cookie = "tourVersion="+tourVersion+"; max-age=31536000; path=/;";
679
684
  document.cookieHash['tourVersion'] = tourVersion;
680
685
 
681
686
  // we don't need this anymore; let's save a byte or three
@@ -721,11 +726,13 @@ function showTour(name, record) {
721
726
  // get the value of an option=value class applied to a slide
722
727
  function getSlideOption(option) {
723
728
  var classes = currentSlide.attr('class').split(' ');
724
- var match = classes.find(function(item){
725
- return (item.indexOf(option+'=') == 0);
726
- });
727
729
 
728
- return (match ? match.split('=')[1] : null);
730
+ for (var i=0; i < classes.length; i++) {
731
+ var item = classes[i].split('=');
732
+ if(item.length == 2 && item[0] == option) {
733
+ return item[1]
734
+ }
735
+ }
729
736
  }
730
737
 
731
738
  function checkSlideParameter() {
@@ -1257,7 +1264,8 @@ function renderForm(form) {
1257
1264
  function connectControlChannel() {
1258
1265
  if (interactive) {
1259
1266
  protocol = (location.protocol === 'https:') ? 'wss://' : 'ws://';
1260
- ws = new WebSocket(protocol + location.host + '/control');
1267
+ path = (location.root + '/control').replace('//', '/').replace('/presenter','');;
1268
+ ws = new WebSocket(protocol + location.host + path);
1261
1269
  ws.onopen = function() { connected(); };
1262
1270
  ws.onclose = function() { disconnected(); }
1263
1271
  ws.onmessage = function(m) { parseMessage(m.data); };
@@ -1792,7 +1800,7 @@ function reloadSlides (hard) {
1792
1800
  }
1793
1801
 
1794
1802
  if (confirm(message)) {
1795
- loadSlides(loadSlidesBool, loadSlidesPrefix, true, hard);
1803
+ loadSlides(loadSlidesBool, true, hard);
1796
1804
  }
1797
1805
  }
1798
1806
 
@@ -1912,7 +1920,7 @@ function executeRemoteCode(lang, codeDiv) {
1912
1920
  var path = slide.attr('ref');
1913
1921
 
1914
1922
  setExecutionSignal(true, codeDiv);
1915
- $.get('/execute/'+lang, {path: path, index: index}, function(result) {
1923
+ $.get('execute/'+lang, {path: path, index: index}, function(result) {
1916
1924
  if (result != null) print(result);
1917
1925
  setExecutionSignal(false, codeDiv);
1918
1926
  });
@@ -1990,11 +1998,11 @@ function setupPreShow(seconds) {
1990
1998
  $.each(data, function(i, n) {
1991
1999
  if(n == "preshow.json") {
1992
2000
  // has a descriptions file
1993
- $.getJSON("/file/_preshow/preshow.json", false, function(data) {
2001
+ $.getJSON("file/_preshow/preshow.json", false, function(data) {
1994
2002
  preshow_des = data;
1995
2003
  })
1996
2004
  } else {
1997
- $('#preshow').append('<img ref="' + n + '" src="/file/_preshow/' + n + '"/>');
2005
+ $('#preshow').append('<img ref="' + n + '" src="file/_preshow/' + n + '"/>');
1998
2006
  }
1999
2007
  })
2000
2008
  preshow_images = $('#preshow > img');
@@ -2059,7 +2067,7 @@ function stopPreShow() {
2059
2067
  $('#tips').remove();
2060
2068
  $('#preshow_timer').remove();
2061
2069
 
2062
- loadSlides(loadSlidesBool, loadSlidesPrefix);
2070
+ loadSlides(loadSlidesBool);
2063
2071
  }
2064
2072
 
2065
2073
  function nextPreShowImage() {
@@ -2112,7 +2120,7 @@ function setupStats(data)
2112
2120
  }
2113
2121
  });
2114
2122
 
2115
- var location = window.location.pathname == '/presenter' ? '#' : '/#';
2123
+ var location = window.location.pathname == 'presenter' ? '#' : '/#';
2116
2124
  var viewers = data['viewers'];
2117
2125
  if (viewers) {
2118
2126
  if (viewers.length == 1 && viewers[0][3] == 'current') {
@@ -14,10 +14,10 @@
14
14
  <% enabled, title, files = value %>
15
15
  <% if enabled %>
16
16
  <%if key != -999 %>
17
- <% path = '/file/_files' %>
17
+ <% path = 'file/_files' %>
18
18
  <h4>Slide <%= key %> <small>(<%= title %>)</small></h4>
19
19
  <% else %>
20
- <% path = '/file/_files/share' %>
20
+ <% path = 'file/_files/share' %>
21
21
  <% end %>
22
22
  <ul>
23
23
  <% files.each do |file| %>
@@ -7,47 +7,48 @@
7
7
  <link rel="icon" href="<%= @favicon %>"/>
8
8
  <% end %>
9
9
 
10
- <link rel="stylesheet" type="text/css" href="<%= @asset_path %>/css/highlight/<%= @highlightStyle %>.css" />
11
- <link rel="stylesheet" type="text/css" href="<%= @asset_path %>/css/mermaid-6.0.0.css" />
12
- <link rel="stylesheet" type="text/css" href="<%= @asset_path %>/css/font-awesome-4.4.0/css/font-awesome.min.css">
13
- <link rel="stylesheet" type="text/css" href="<%= @asset_path %>/css/introjs-2.5.local.css">
14
- <link rel="stylesheet" type="text/css" href="<%= @asset_path %>/css/jquery-ui-1.12.1.css">
15
- <link rel="stylesheet" type="text/css" href="<%= @asset_path %>/css/showoff.css?v=<%= SHOWOFF_VERSION %>" />
16
- <link rel="stylesheet" type="text/css" href="<%= @asset_path %>/css/zoomline-0.0.1.css">
10
+ <link rel="stylesheet" type="text/css" href="css/highlight/<%= @highlightStyle %>.css" />
11
+ <link rel="stylesheet" type="text/css" href="css/mermaid-6.0.0.css" />
12
+ <link rel="stylesheet" type="text/css" href="css/font-awesome-5.6.1/css/all.min.css">
13
+ <link rel="stylesheet" type="text/css" href="css/introjs-2.5.local.css">
14
+ <link rel="stylesheet" type="text/css" href="css/jquery-ui-1.12.1.css">
15
+ <link rel="stylesheet" type="text/css" href="css/showoff.css?v=<%= SHOWOFF_VERSION %>" />
16
+ <link rel="stylesheet" type="text/css" href="css/zoomline-0.0.1.css">
17
17
 
18
- <script type="text/javascript" src="<%= @asset_path %>/js/jquery-2.1.4.min.js"></script>
19
- <script type="text/javascript" src="<%= @asset_path %>/js/jquery-ui-1.12.1.js"></script>
18
+ <script type="text/javascript" src="js/jquery-2.1.4.min.js"></script>
19
+ <script type="text/javascript" src="js/jquery-ui-1.12.1.js"></script>
20
20
 
21
- <script type="text/javascript" src="<%= @asset_path %>/js/jquery.cycle.all-2.8.0.js"></script>
22
- <script type="text/javascript" src="<%= @asset_path %>/js/jquery.batchImageLoad-1.0.0.js"></script>
23
- <script type="text/javascript" src="<%= @asset_path %>/js/jquery.parsequery.min-6a20f83.js"></script>
24
- <script type="text/javascript" src="<%= @asset_path %>/js/jquery.doubletap-4ff02c5.js"></script>
25
- <script type="text/javascript" src="<%= @asset_path %>/js/highlight.pack-9.2.0.js"></script>
26
- <script type="text/javascript" src="<%= @asset_path %>/js/jTypeWriter-1.1.js"></script>
27
- <script type="text/javascript" src="<%= @asset_path %>/js/bigtext-0.1.8.js"></script>
28
- <script type="text/javascript" src="<%= @asset_path %>/js/zoomline-0.0.1.js"></script>
29
- <script type="text/javascript" src="<%= @asset_path %>/js/simpleStrings-0.0.1.js"></script>
30
- <script type="text/javascript" src="<%= @asset_path %>/js/mermaid-6.0.0-min.js"></script>
21
+ <script type="text/javascript" src="js/jquery.cycle.all-2.8.0.js"></script>
22
+ <script type="text/javascript" src="js/jquery.batchImageLoad-1.0.0.js"></script>
23
+ <script type="text/javascript" src="js/jquery.parsequery.min-6a20f83.js"></script>
24
+ <script type="text/javascript" src="js/jquery.doubletap-4ff02c5.js"></script>
25
+ <script type="text/javascript" src="js/highlight.pack-9.2.0.js"></script>
26
+ <script type="text/javascript" src="js/highlightjs-line-numbers.min.js"></script>
27
+ <script type="text/javascript" src="js/jTypeWriter-1.1.js"></script>
28
+ <script type="text/javascript" src="js/bigtext-0.1.8.js"></script>
29
+ <script type="text/javascript" src="js/zoomline-0.0.1.js"></script>
30
+ <script type="text/javascript" src="js/simpleStrings-0.0.1.js"></script>
31
+ <script type="text/javascript" src="js/mermaid-6.0.0-min.js"></script>
31
32
 
32
33
  <!-- waiting on https://github.com/usablica/intro.js/pull/727 -->
33
- <script type="text/javascript" src="<%= @asset_path %>/js/intro-2.5.local.js"></script>
34
+ <script type="text/javascript" src="js/intro-2.5.local.js"></script>
34
35
 
35
- <script type="text/javascript" src="<%= @asset_path %>/js/coffee-script-1.1.3-pre.js"></script>
36
+ <script type="text/javascript" src="js/coffee-script-1.1.3-pre.js"></script>
36
37
 
37
- <script type="text/javascript" src="<%= @asset_path %>/js/annotations.js?v=<%= SHOWOFF_VERSION %>"></script>
38
- <script type="text/javascript" src="<%= @asset_path %>/js/showoff.js?v=<%= SHOWOFF_VERSION %>"></script>
38
+ <script type="text/javascript" src="js/annotations.js?v=<%= SHOWOFF_VERSION %>"></script>
39
+ <script type="text/javascript" src="js/showoff.js?v=<%= SHOWOFF_VERSION %>"></script>
39
40
 
40
41
  <% css_files.each do |css_file| %>
41
- <link rel="stylesheet" href="<%= @asset_path %>/file/<%= css_file %>" type="text/css"/>
42
+ <link rel="stylesheet" type="text/css" href="file/<%= css_file %>" />
42
43
  <% end %>
43
44
 
44
45
  <% js_files.each do |js_file| %>
45
- <script type="text/javascript" src="<%= @asset_path %>/file/<%= js_file %>"></script>
46
+ <script type="text/javascript" src="file/<%= js_file %>"></script>
46
47
  <% end %>
47
48
 
48
49
  <script type="text/javascript">
49
50
  $(function(){
50
- setupPreso(<%= @slides.nil? ? "true" : "false"%>, '<%= @asset_path %>');
51
+ setupPreso(<%= @slides.nil? ? "true" : "false"%>);
51
52
  });
52
53
 
53
54
  editUrl = "<%= @edit %>";
@@ -7,19 +7,19 @@
7
7
  <link rel="icon" href="<%= @favicon %>"/>
8
8
  <% end %>
9
9
 
10
- <link rel="stylesheet" type="text/css" href="<%= @asset_path %>/css/showoff.css?v=<%= SHOWOFF_VERSION %>" />
11
- <link rel="stylesheet" type="text/css" href="<%= @asset_path %>/css/font-awesome-4.4.0/css/font-awesome.min.css">
12
- <link rel="stylesheet" type="text/css" href="<%= @asset_path %>/css/zoomline-0.0.1.css">
10
+ <link rel="stylesheet" type="text/css" href="css/showoff.css?v=<%= SHOWOFF_VERSION %>" />
11
+ <link rel="stylesheet" type="text/css" href="css/font-awesome-4.4.0/css/font-awesome.min.css">
12
+ <link rel="stylesheet" type="text/css" href="css/zoomline-0.0.1.css">
13
13
 
14
- <script type="text/javascript" src="<%= @asset_path %>/js/jquery-2.1.4.min.js"></script>
15
- <script type="text/javascript" src="<%= @asset_path %>/js/zoomline-0.0.1.js"></script>
14
+ <script type="text/javascript" src="js/jquery-2.1.4.min.js"></script>
15
+ <script type="text/javascript" src="js/zoomline-0.0.1.js"></script>
16
16
 
17
- <script type="text/javascript" src="<%= @asset_path %>/js/showoff.js?v=<%= SHOWOFF_VERSION %>"></script>
17
+ <script type="text/javascript" src="js/showoff.js?v=<%= SHOWOFF_VERSION %>"></script>
18
18
 
19
19
  <% css_files.each do |css_file| %>
20
- <link rel="stylesheet" href="<%= @asset_path %>/file/<%= css_file %>" type="text/css"/>
20
+ <link rel="stylesheet" type="text/css" href="file/<%= css_file %>" />
21
21
  <% end %>
22
22
 
23
23
  <% js_files.each do |js_file| %>
24
- <script type="text/javascript" src="<%= @asset_path %>/file/<%= js_file %>"></script>
24
+ <script type="text/javascript" src="file/<%= js_file %>"></script>
25
25
  <% end %>
@@ -12,7 +12,7 @@
12
12
  <div id="sidebarWrapper">
13
13
  <div id="navigationHover"></div>
14
14
  <div id="feedbackSidebar" class="sideMenu">
15
- <img id="disconnected" src="<%= @asset_path %>/css/disconnected.png">
15
+ <img id="disconnected" src="css/disconnected.png">
16
16
  <h3><%= I18n.t('menu.title') %></h3>
17
17
  <div id="navToggle" class="buttonWrapper"><i class=" fa fa-bookmark"></i> <%= I18n.t('menu.table_of_contents') %></div>
18
18
  <div id="navigation" class="submenu"></div>
@@ -108,7 +108,7 @@
108
108
  <span id="debugInfo" class="container"></span>
109
109
  <span id="notesInfo" class="container"></span>
110
110
  <span id="slideFilename" class="container"></span>
111
- <img id="disconnected" src="<%= @asset_path %>/css/disconnected.png" />
111
+ <img id="disconnected" src="css/disconnected.png" />
112
112
  </footer>
113
113
 
114
114
  <div id="slides" class="offscreen" <%= 'style="display:none;"' if @slides %>>
@@ -15,7 +15,7 @@
15
15
  <%= inline_css(['showoff.css', 'onepage.css'], 'public/css') %>
16
16
  <%= inline_css(css_files) %>
17
17
 
18
- <%= inline_js(['jquery-2.1.4.min.js', 'showoff.js', 'highlight.pack-9.2.0.js'], 'public/js') %>
18
+ <%= inline_js(['jquery-2.1.4.min.js', 'showoff.js', 'highlight.pack-9.2.0.js', 'highlightjs-line-numbers.min.js'], 'public/js') %>
19
19
  <%= inline_js(['bigtext-0.1.8.js', 'simpleStrings-0.0.1.js', 'mermaid-6.0.0-min.js'], 'public/js') %>
20
20
 
21
21
  <%= inline_js(@languages, 'public/js') if @languages %>
@@ -24,23 +24,23 @@
24
24
  <% else %>
25
25
  <% ['font-awesome-4.4.0/css/font-awesome.min.css', 'mermaid-6.0.0.css', "highlight/#{@highlightStyle}.css",
26
26
  'showoff.css', 'onepage.css'].each do |css_file| %>
27
- <link rel="stylesheet" href="<%= @asset_path %>/css/<%= css_file %>" type="text/css"/>
27
+ <link rel="stylesheet" href="css/<%= css_file %>" type="text/css"/>
28
28
  <% end %>
29
29
 
30
30
  <% css_files.each do |css_file| %>
31
- <link rel="stylesheet" href="<%= @asset_path %>/file/<%= css_file %>" type="text/css"/>
31
+ <link rel="stylesheet" href="file/<%= css_file %>" type="text/css"/>
32
32
  <% end %>
33
33
 
34
34
  <% ['jquery-2.1.4.min.js', 'showoff.js', 'highlight.pack-9.2.0.js',
35
- 'bigtext-0.1.8.js', 'simpleStrings-0.0.1.js', 'mermaid-6.0.0-min.js'].each do |js_file| %>
36
- <script type="text/javascript" src="<%= @asset_path %>/js/<%= js_file %>"></script>
35
+ 'highlightjs-line-numbers.min.js', 'bigtext-0.1.8.js', 'simpleStrings-0.0.1.js', 'mermaid-6.0.0-min.js'].each do |js_file| %>
36
+ <script type="text/javascript" src="js/<%= js_file %>"></script>
37
37
  <% end %>
38
38
  <% js_files.each do |js_file| %>
39
- <script type="text/javascript" src="<%= @asset_path %>/file/<%= js_file %>"></script>
39
+ <script type="text/javascript" src="file/<%= js_file %>"></script>
40
40
  <% end %>
41
41
  <% if @languages %>
42
42
  <% @languages.each do |l| %>
43
- <script type="text/javascript" src="<%= @asset_path %>/js<%= l %>"></script>
43
+ <script type="text/javascript" src="js<%= l %>"></script>
44
44
  <% end %>
45
45
  <% end %>
46
46