From c11d5f3b05cd4591d9b56b318ee235a8f276c4f8 Mon Sep 17 00:00:00 2001 From: Kriszta Matyi Date: Fri, 23 Apr 2021 16:42:47 -0700 Subject: [PATCH 1/5] Fixes small layout and spacing issues on bstrp homepage --- app/views/dashboard/show.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/dashboard/show.html.haml b/app/views/dashboard/show.html.haml index 805cfe0c0..34cfeacd7 100644 --- a/app/views/dashboard/show.html.haml +++ b/app/views/dashboard/show.html.haml @@ -1,14 +1,14 @@ - title t('homepage.title') %div.homepage-hero.d-flex.align-items-center - %row.container.d-flex + .container.d-flex %div.col-md-4.offset-md-1.p-3.text %p= raw t('homepage.intro') .container-fluid.stripe.reverse - %row + .row %div.col-md-7.mx-auto - %p.lead= raw t('homepage.explanation') + %p.lead.mb-0= raw t('homepage.explanation') .container-fluid.stripe.reverse .row @@ -66,7 +66,7 @@ = date = render workshops - .col-lg-4.pl-5 + .col-lg-4.pl-lg-5 %h3 = t('homepage.chapters.title') %ul.list-unstyled.ml-0 From 4e58db46e8737f3ee7c1250313dd68877d76f1ec Mon Sep 17 00:00:00 2001 From: Kriszta Matyi Date: Fri, 23 Apr 2021 17:35:56 -0700 Subject: [PATCH 2/5] Convert newsletter form partial to Bootstrap --- app/views/shared/_newsletter.html.haml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/views/shared/_newsletter.html.haml b/app/views/shared/_newsletter.html.haml index 647dbb090..6381d71af 100644 --- a/app/views/shared/_newsletter.html.haml +++ b/app/views/shared/_newsletter.html.haml @@ -1,5 +1,5 @@ -.row - .medium-10.medium-offset-1.columns +.row.justify-content-md-center + .col-md-8 %h2= t('homepage.newsletter.title') %p= t('homepage.newsletter.description') @@ -29,7 +29,6 @@ -# real people should not fill this in and expect good things - do not remove this or risk form bot signups %div{ style: 'position: absolute; left: -5000px;', 'aria-hidden': 'true' } %input{ type: 'text', name: 'b_b4652d85b385945c79f2ffa2e_3798974cb3', tabindex: '-1', value: '' } - .clear - %input.button.small#mc-embedded-subscribe{ type: 'submit', value: 'Subscribe', name: 'subscribe' } - - %a{ href: 'https://us8.campaign-archive.com/home/?u=b4652d85b385945c79f2ffa2e&id=3798974cb3' } View previous newsletters. + .d-flex.justify-content-between.align-items-center + %input.btn.btn-primary#mc-embedded-subscribe{ type: 'submit', value: 'Subscribe', name: 'subscribe' } + %a{ href: 'https://us8.campaign-archive.com/home/?u=b4652d85b385945c79f2ffa2e&id=3798974cb3' } View previous newsletters. From 0eba4559cf50169e3e0d76642baee0b96244df47 Mon Sep 17 00:00:00 2001 From: Kriszta Matyi Date: Fri, 23 Apr 2021 17:36:44 -0700 Subject: [PATCH 3/5] Improve consistency of layout on homepage --- app/views/dashboard/show.html.haml | 68 +++++++++++++++--------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/app/views/dashboard/show.html.haml b/app/views/dashboard/show.html.haml index 34cfeacd7..1917810e3 100644 --- a/app/views/dashboard/show.html.haml +++ b/app/views/dashboard/show.html.haml @@ -1,49 +1,49 @@ - title t('homepage.title') -%div.homepage-hero.d-flex.align-items-center +.homepage-hero.d-flex.align-items-center .container.d-flex - %div.col-md-4.offset-md-1.p-3.text + .col-md-4.offset-md-1.p-3.text %p= raw t('homepage.intro') .container-fluid.stripe.reverse - .row - %div.col-md-7.mx-auto + .row.justify-content-md-center + .col-md-8 %p.lead.mb-0= raw t('homepage.explanation') .container-fluid.stripe.reverse .row .col-md-4 - .text-center - %h4 - = t('homepage.participate.students_title') - %p - = t('homepage.participate.students_explanation_p1') - %p - = t('homepage.participate.students_explanation_p2') - .text-center.mt-5.mb-5.mb-md-0 - = link_to t('homepage.participate.students_button'), new_member_path, class: 'btn btn-primary' + .card.h-100.text-md-center.border-0 + .card-body + %h3.h4.card-title= t('homepage.participate.students_title') + %p.card-text + = t('homepage.participate.students_explanation_p1') + %p.card-text + = t('homepage.participate.students_explanation_p2') + .card-footer.border-0.bg-transparent + = link_to t('homepage.participate.students_button'), new_member_path, class: 'btn btn-primary' .col-md-4 - .text-center - %h4 - = t('homepage.participate.coaches_title') - %p - = raw t('homepage.participate.coaches_explanation_p1') - %p - = t('homepage.participate.coaches_explanation_p2') - .text-center.mt-5.mb-5.mb-md-0 - = link_to t('homepage.participate.coaches_button'), new_member_path, class: 'btn btn-primary' + .card.h-100.text-md-center.border-0 + .card-body + %h3.h4.card-title= t('homepage.participate.coaches_title') + %p + = raw t('homepage.participate.coaches_explanation_p1') + %p + = t('homepage.participate.coaches_explanation_p2') + .card-footer.border-0.bg-transparent + = link_to t('homepage.participate.coaches_button'), new_member_path, class: 'btn btn-primary' .col-md-4 - .text-center - %h4 - = t('homepage.participate.workshop_title') - %p - = t('homepage.participate.workshop_explanation_p1') - %p - = t('homepage.participate.workshop_explanation_p2') - .text-center.mt-5.mb-5.mb-md-0 - = mail_to "hello@codebar.io", t('homepage.participate.workshop_button'), subject: t('homepage.participate.workshop_email_subject'), class: 'btn btn-primary' + .card.h-100.text-md-center.border-0 + .card-body + %h3.h4.card-title= t('homepage.participate.workshop_title') + %p + = t('homepage.participate.workshop_explanation_p1') + %p + = t('homepage.participate.workshop_explanation_p2') + .card-footer.border-0.bg-transparent + = mail_to "hello@codebar.io", t('homepage.participate.workshop_button'), subject: t('homepage.participate.workshop_email_subject'), class: 'btn btn-primary' .container-fluid.stripe.reverse = render partial: 'shared/donation_platforms' @@ -76,9 +76,9 @@ - if @testimonials.any? .container-fluid.stripe.reverse - .row - .offset-md-1.col-md-10 + .row.justify-content-md-center + .col-md-8 = render partial: 'members/testimonials' -%section.stripe.reverse +%section.container-fluid.stripe.reverse = render partial: 'shared/newsletter' From 610cc7d7c1ca8dfa108fd2126e8663714b188ad9 Mon Sep 17 00:00:00 2001 From: Kriszta Matyi Date: Fri, 23 Apr 2021 19:00:09 -0700 Subject: [PATCH 4/5] Fix event card broken layout on mobile --- app/views/dashboard/show.html.haml | 5 +-- app/views/events/_event.html.haml | 67 +++++++++++++++--------------- 2 files changed, 34 insertions(+), 38 deletions(-) diff --git a/app/views/dashboard/show.html.haml b/app/views/dashboard/show.html.haml index 1917810e3..3d1a93bb5 100644 --- a/app/views/dashboard/show.html.haml +++ b/app/views/dashboard/show.html.haml @@ -60,10 +60,7 @@ - if @upcoming_workshops.any? %h2.h3.mb-4= t('homepage.events.upcoming') - @upcoming_workshops.each do |date, workshops| - %row.ml-0 - .col - %h3.h5.mb-3 - = date + %h3.h5.mb-3= date = render workshops .col-lg-4.pl-lg-5 diff --git a/app/views/events/_event.html.haml b/app/views/events/_event.html.haml index 9f3735050..1ea128492 100644 --- a/app/views/events/_event.html.haml +++ b/app/views/events/_event.html.haml @@ -1,44 +1,43 @@ -.container - .row.event.border.p-4.mb-4 - .col-9 - %div +.card.event.mb-4 + .card-body + .d-md-flex.justify-content-md-between + .order-md-2 + - if event.chapter + %span.badge.bg-primary + = event.chapter.name + - if @user + - if @user.attending?(event.__getobj__) + %span.badge.bg-success.ml-2 + = link_to "Attending", event.path, class: "text-light border-0" + - if @user.event_organiser?(event) + %span.badge.bg-secondary.ml-2 + = link_to "Manage", event.admin_path, class: "text-light border-0" + .order-md-1 %h3.event__header = link_to event.to_s, event.path - if event.venue.present? at = link_to event.venue.name, event.venue.website - %div.mt-3 - %p.date.mb-0 - %i.material-icons - calendar_today - = event.date - %p.time - %i.material-icons - access_time - = event.time + .mt-3 + %p.date.mb-0 + %i.material-icons + calendar_today + = event.date + %p.time + %i.material-icons + access_time + = event.time + - if event.organisers.any? || event.sponsors.any? + .d-md-flex.justify-content-md-between.align-items-md-center - if event.organisers.any? - %div.mt-3 + %div - event.organisers.each do |organiser| - = link_to twitter_url_for(organiser.twitter), class: 'border-0' do - = image_tag(organiser.avatar(26), class: 'rounded-circle', title: organiser.full_name, alt: organiser.full_name) + = link_to twitter_url_for(organiser.twitter), class: "border-0 d-inline-block" do + = image_tag(organiser.avatar(26), class: "rounded-circle", title: organiser.full_name, alt: organiser.full_name) - .col-3.d-flex.flex-column.align-items-end.justify-content-between - .mb-3.d-flex - - if event.chapter - %span.badge.bg-primary.text-light - = event.chapter.name - - if @user - - if @user.attending?(event.__getobj__) - %span.badge.bg-success.ml-2 - = link_to event.path, class: "text-light border-0" do - Attending - - if @user.event_organiser?(event) - %span.badge.bg-secondary.ml-2 - = link_to event.admin_path, class: "text-light border-0" do - Manage - .d-flex - if event.sponsors.any? - - event.sponsors.each do |sponsor| - = link_to sponsor.website, class: "border-0" do - = image_tag(sponsor.avatar.thumb, class: 'sponsor-sm', alt: sponsor.name) + %div + - event.sponsors.each do |sponsor| + = link_to sponsor.website, class: "border-0 d-inline-block" do + = image_tag(sponsor.avatar.thumb, class: "sponsor-sm", alt: sponsor.name) \ No newline at end of file From 1dc73bc155a466a62f4c92b368e80f997cca269d Mon Sep 17 00:00:00 2001 From: Kriszta Matyi Date: Fri, 23 Apr 2021 19:20:15 -0700 Subject: [PATCH 5/5] Derp - belongs to 0eba455 --- app/views/dashboard/show.html.haml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/app/views/dashboard/show.html.haml b/app/views/dashboard/show.html.haml index 3d1a93bb5..09ef9eb3f 100644 --- a/app/views/dashboard/show.html.haml +++ b/app/views/dashboard/show.html.haml @@ -12,10 +12,11 @@ .container-fluid.stripe.reverse .row - .col-md-4 + .col-md-4.mb-4.mb-md-0 .card.h-100.text-md-center.border-0 .card-body - %h3.h4.card-title= t('homepage.participate.students_title') + %h3.h4.card-title + = t('homepage.participate.students_title') %p.card-text = t('homepage.participate.students_explanation_p1') %p.card-text @@ -23,13 +24,14 @@ .card-footer.border-0.bg-transparent = link_to t('homepage.participate.students_button'), new_member_path, class: 'btn btn-primary' - .col-md-4 + .col-md-4.mb-4.mb-md-0 .card.h-100.text-md-center.border-0 .card-body - %h3.h4.card-title= t('homepage.participate.coaches_title') - %p + %h3.h4.card-title + = t('homepage.participate.coaches_title') + %p.card-text = raw t('homepage.participate.coaches_explanation_p1') - %p + %p.card-text = t('homepage.participate.coaches_explanation_p2') .card-footer.border-0.bg-transparent = link_to t('homepage.participate.coaches_button'), new_member_path, class: 'btn btn-primary' @@ -37,13 +39,14 @@ .col-md-4 .card.h-100.text-md-center.border-0 .card-body - %h3.h4.card-title= t('homepage.participate.workshop_title') - %p + %h3.h4.card-title + = t('homepage.participate.workshop_title') + %p.card-text = t('homepage.participate.workshop_explanation_p1') - %p + %p.card-text = t('homepage.participate.workshop_explanation_p2') .card-footer.border-0.bg-transparent - = mail_to "hello@codebar.io", t('homepage.participate.workshop_button'), subject: t('homepage.participate.workshop_email_subject'), class: 'btn btn-primary' + = mail_to 'hello@codebar.io', t('homepage.participate.workshop_button'), subject: t('homepage.participate.workshop_email_subject'), class: 'btn btn-primary' .container-fluid.stripe.reverse = render partial: 'shared/donation_platforms'