From ba230826879b8476cf9555c3d28421240f27ba3c Mon Sep 17 00:00:00 2001 From: Kriszta Matyi Date: Wed, 8 Mar 2023 19:12:38 -0800 Subject: [PATCH] Improves layout of event & event invitation page --- app/views/events/show.html.haml | 12 ++++----- app/views/invitations/show.html.haml | 37 ++++++++++++---------------- 2 files changed, 22 insertions(+), 27 deletions(-) diff --git a/app/views/events/show.html.haml b/app/views/events/show.html.haml index d6718954e..acc6123a1 100644 --- a/app/views/events/show.html.haml +++ b/app/views/events/show.html.haml @@ -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' @@ -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 diff --git a/app/views/invitations/show.html.haml b/app/views/invitations/show.html.haml index 2d1a040e8..9f6f20dec 100644 --- a/app/views/invitations/show.html.haml +++ b/app/views/invitations/show.html.haml @@ -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 @@ -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