diff options
-rw-r--r-- | index.html.erb | 2 | ||||
-rwxr-xr-x | ramaskrik-program.rb | 6 | ||||
-rw-r--r-- | styles.css | 1 |
3 files changed, 5 insertions, 4 deletions
diff --git a/index.html.erb b/index.html.erb index 62f31d2..2949dc8 100644 --- a/index.html.erb +++ b/index.html.erb @@ -36,7 +36,7 @@ <h3>Kl.</h3> <div class="time-column-inner"> <% (start_time..end_time).step(3600 / 4) do |time| %> - <div class="timestamp" style="top: <%= (time - start_time).to_i / 50 - 5 %>px; height: 10px;"> + <div class="timestamp" style="top: <%= (time - start_time).to_i / 50 %>px; height: 10px;"> <%= Time.at(time).strftime('%H:%M') %> </div> <% end %> diff --git a/ramaskrik-program.rb b/ramaskrik-program.rb index cd22839..f2b308b 100755 --- a/ramaskrik-program.rb +++ b/ramaskrik-program.rb @@ -33,8 +33,8 @@ class EventDecorator < SimpleDelegator attr_reader :height def calc_offsets(time_offset) - @offset = 5 + (start_time - time_offset).to_i / 50 - @height = 5 + duration / 50; + @offset = 5 + (start_time - time_offset).to_f / 50 + @height = 5 + duration.to_f / 50; start_time + duration end end @@ -52,7 +52,7 @@ class SortedEventList .sort{ |a,b| a.start_time - b.start_time } .map{ |e| EventDecorator.new(e) } - @start_time = @events.first.start_time - (@events.first.start_time.min * 60) + @start_time = @events.first.start_time # - (@events.first.start_time.min * 60) @events.group_by{|e| e.venue}.each do |venue, events| time_offset = start_time @@ -43,6 +43,7 @@ a:hover { } .timestamp { position: absolute; + font-family: Helvetica, Arial, "Sans Serif"; font-size: 10px; } .event-item { |