[feat]Add brief version of event partial; fix style

This commit is contained in:
Jimmy 2021-04-09 22:17:33 +08:00 committed by CactusPuppy
parent 7ae94589fa
commit 497818cc45
No known key found for this signature in database
GPG key ID: 4B33B0A3E15E2C82
3 changed files with 37 additions and 36 deletions

View file

@ -2,8 +2,9 @@
- header_color = event.event_type&.color || '#f5f5f5'
.trapezoid{ style: 'color: white; top: 12px; z-index: 100;' }
.panel-heading{ style: "background-color: #{header_color}; color: #{ contrast_color(header_color) }; border-radius: 4px" }
- event.speakers_ordered.each do |speaker|
= image_tag speaker.profile_picture, class: 'img-circle pull-right', alt: speaker.name, style: 'padding: 2px;'
- if !defined?(is_brief) || is_brief == false
- event.speakers_ordered.each do |speaker|
= image_tag speaker.profile_picture, class: 'img-circle pull-right', alt: speaker.name, style: 'padding: 2px;'
%p
= canceled_replacement_event_label(event, event_schedule)
@ -27,20 +28,21 @@
= markdown(truncate(event.abstract, length: 400))
-# TODO: More informative text or aria-label.
= link_to 'more', conference_program_proposal_path(@conference.short_title, event.id) if event.abstract.length > 400
- if event_schedule.present?
= inyourtz(event_schedule.start_time) do
- if !defined?(is_brief) || is_brief == false
- if event_schedule.present?
= inyourtz(event_schedule.start_time) do
%span.track
%span.fa.fa-clock-o
%span.label{ style: 'background-color: grey' }
= event_schedule.start_time.strftime('%l:%M %P')
\-
= event_schedule.end_time.strftime('%l:%M %P')
%span.track
%span.fa.fa-clock-o
%span.fa.fa-map-marker
%span.label{ style: 'background-color: grey' }
= event_schedule.start_time.strftime('%l:%M %P')
\-
= event_schedule.end_time.strftime('%l:%M %P')
%span.track
%span.fa.fa-map-marker
%span.label{ style: 'background-color: grey' }
= event_schedule.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
= event_schedule.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