osem-fcy/app/views/conference/_event.html.haml
Ana 818c55df5a Tracks color in all events takes background into account.
It uses https://github.com/openSUSE/osem/pull/1044 to select black or white color for the track text depending on what of them contrast more with the track background.
2016-07-25 11:33:28 +02:00

33 lines
1.3 KiB
Text

%a.unstyled-link{href: url_for(conference_program_proposal_path(@conference.short_title, event.id))}
.panel.panel-default
.panel-body
- if speaker = event.speakers.first
= image_tag speaker.gravatar_url, :class => "img-circle pull-right all-speaker-pic", |
:alt => speaker.name, |
:title => speaker.name |
%span.h3
= event.title
%br
%small
= event.subtitle
%h4
presented by #{event.speaker_names}
%p
= truncate(event.abstract, :length => 400)
= link_to 'more', conference_program_proposal_path(@conference.short_title, event.id) if event.abstract.length > 400
- if event.scheduled?
%span.track
%span.fa.fa-clock-o
%span.label{ style: "background-color: grey" }
= event.start_time.strftime('%H:%M')
\-
= event.end_time.strftime('%H:%M')
%span.track
%span.fa.fa-map-marker
%span.label{ style: "background-color: grey" }
= event.room.name
- if event.track
%span.track
%span.fa.fa-road
%span.label{ style: "background-color: #{event.track.color}; color: #{ contrast_color(event.track.color) }" }
= event.track.name