Skip to content

Commit

Permalink
Improves layout of event & event invitation page
Browse files Browse the repository at this point in the history
  • Loading branch information
matyikriszta committed Jan 2, 2024
1 parent 83add19 commit ba23082
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 27 deletions.
12 changes: 6 additions & 6 deletions app/views/events/show.html.haml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
.container.py-4.py-lg-5
.row
.col-12
%h1
.col-12.col-lg-9
%h1.mb-4
= @event.name
%br
%small #{humanize_date(@event.date_and_time, @event.ends_at, with_time: true)}
.col-12.col-md-9
%p.lead= sanitize(@event.description)
.col-12.col-lg-9
.lead= sanitize(@event.description)

.row
.row.mt-4
.col
= render partial: 'event_actions'

Expand Down Expand Up @@ -44,7 +44,7 @@
.container
= render partial: 'event_sponsors', locals: { event: @event }

- if @event.verified_coaches.any?
- if @event.verified_coaches.any? && @event.display_coaches
.py-4.py-lg-5.section
.container
.row
Expand Down
37 changes: 16 additions & 21 deletions app/views/invitations/show.html.haml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
.container.py-4.py-lg-5
.row
.col-12
%h1
.col-12.col-lg-9
%h1.mb-4
= @event.name
- if @invitation.attending
%span.badge.bg-success Attending
%br
%small #{humanize_date(@event.date_and_time, @event.ends_at, with_time: true)}
.col-12.col-md-9
%p.lead= @event.description.html_safe
.col-12.col-lg-9
.lead= sanitize(@event.description)

.row
.row.mt-4
.col-12.col-md-9
- if @invitation.for_student?
- if !@invitation.attending
Expand Down Expand Up @@ -63,23 +63,18 @@
.py-4.py-lg-5.bg-light
.container
.row
.col-12.col-lg-6
%h3 Schedule
- if @event.venue.present?
= render partial: 'shared/venue', locals: { venue: @event.venue, address: @host_address}
- else
%p= "#{t('events.virtual')}."

.row.mt-4
.col
- if @event.announce_only
%h3 Information
- else
%h3= t('events.schedule')
= dot_markdown(@event.schedule)
.col-12.col-lg-6
%h3 Location
- if @event.venue.present?
.row
.col-12.col-md-8
%address= @host_address.to_html
.col-12.col-md-4
= image_tag(@event.venue.avatar.url, class: 'small-image mw-100 mb-4', alt: @event.venue.name)
.row
.col
%iframe{ width: '100%', height: '250', frameborder: '0', scrolling: 'no', marginheight: '0', marginwidth: '0', src: %{https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=#{@host_address.for_map}&ie=UTF8&t=m&z=15&output=embed} }
= link_to 'View larger map', %{https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=#{@host_address.for_map}&ie=UTF8&hq=&t=m&z=15}, style: "color:#0000FF;text-align:left"
- elsif @event.virtual?
%p= "#{t('events.virtual')}."

- if @event.show_faq
.py-4.py-lg-5.section
Expand Down

0 comments on commit ba23082

Please sign in to comment.