showoff 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/showoff.rb CHANGED
@@ -46,7 +46,7 @@ class ShowOff < Sinatra::Application
46
46
  end
47
47
 
48
48
  def process_markdown(name, content)
49
- slides = content.split('!SLIDE')
49
+ slides = content.split(/^!SLIDE/)
50
50
  slides.delete('')
51
51
  final = ''
52
52
  if slides.size > 1
@@ -3,6 +3,7 @@ body {
3
3
  padding: 0;
4
4
  margin: 0;
5
5
  border: 0;
6
+ overflow:hidden;
6
7
  }
7
8
 
8
9
  #preso {
@@ -18,8 +19,8 @@ body {
18
19
  background: #eee;
19
20
  margin: 0;
20
21
  padding: 2px;
21
- width: 1018px;
22
- height: 22px;
22
+ width: 1010px;
23
+ height: 20px;
23
24
  margin-left:auto;
24
25
  margin-right:auto;
25
26
  }
data/public/js/showoff.js CHANGED
@@ -99,7 +99,7 @@ function showSlide(back_step) {
99
99
  var mar_top = (0.5 * parseFloat($("#preso").height())) - (0.5 * parseFloat(slide_height))
100
100
  $("#preso > .slide").css('margin-top', mar_top)
101
101
 
102
- percent = Math.ceil(((slidenum + 1) / slideTotal) * 100)
102
+ percent = getSlidePercent()
103
103
  $("#slideInfo").text((slidenum + 1) + '/' + slideTotal + ' - ' + percent + '%')
104
104
 
105
105
  if(!back_step) {
@@ -114,6 +114,11 @@ function showSlide(back_step) {
114
114
  removeResults()
115
115
  }
116
116
 
117
+ function getSlidePercent()
118
+ {
119
+ return Math.ceil(((slidenum + 1) / slideTotal) * 100)
120
+ }
121
+
117
122
  function determineIncremental()
118
123
  {
119
124
  incrCurr = 0
data/views/index.erb CHANGED
@@ -26,7 +26,7 @@
26
26
  <% end %>
27
27
 
28
28
  <% js_files.each do |js_file| %>
29
- <script type="text/javascript" src="/file/<%= js_file %>"></script>
29
+ <script type="text/javascript" src="file/<%= js_file %>"></script>
30
30
  <% end %>
31
31
 
32
32
  <script type="text/javascript">
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: showoff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Chacon
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-26 00:00:00 -08:00
12
+ date: 2010-01-26 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency