From 18a13052e94db287cdae0eacf5c64bddc21543c2 Mon Sep 17 00:00:00 2001 From: Morgan Roderick Date: Wed, 18 Feb 2026 23:08:25 +0100 Subject: [PATCH] feat: split how-to-support-us page into separate volunteer, fundraise, and donate pages --- app/controllers/donations_controller.rb | 2 +- app/views/layouts/_footer.html.haml | 11 +++- app/views/layouts/_navigation.html.haml | 13 ++--- app/views/pages/donate.html.haml | 16 ++++++ app/views/pages/fundraise.html.haml | 29 ++++++++++ app/views/pages/volunteer.html.haml | 55 +++++++++++++++++++ .../shared/_donation_platforms.html.haml | 4 +- config/routes.rb | 5 +- 8 files changed, 120 insertions(+), 15 deletions(-) create mode 100644 app/views/pages/donate.html.haml create mode 100644 app/views/pages/fundraise.html.haml create mode 100644 app/views/pages/volunteer.html.haml diff --git a/app/controllers/donations_controller.rb b/app/controllers/donations_controller.rb index 31ef886ff..cfc39c1e3 100644 --- a/app/controllers/donations_controller.rb +++ b/app/controllers/donations_controller.rb @@ -1,5 +1,5 @@ class DonationsController < ApplicationController def new - redirect_to I18n.t('services.donations'), allow_other_host: true + redirect_to donate_path end end diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml index 528db6f5b..3d7233d0b 100644 --- a/app/views/layouts/_footer.html.haml +++ b/app/views/layouts/_footer.html.haml @@ -28,9 +28,14 @@ %li= link_to t("navigation.coaches"), coaches_path %li= link_to t("navigation.sponsors"), sponsors_path %li= link_to t("navigation.events"), events_path - %li= link_to t("navigation.jobs"), "https://jobs.codebar.io/" - %li.active= link_to t("navigation.donate"), new_donation_path - %li= link_to "Buy us a coffee", "https://buymeacoffee.com/codebarhq", target: '_blank', rel: 'noopener noreferrer' + %li= link_to "Job Board", "https://jobs.codebar.io/" + %li= link_to "Volunteer", volunteer_path + %li= link_to "Fundraise", fundraise_path + %li.active= link_to t("navigation.donate"), donate_path + %li + = link_to 'https://buymeacoffee.com/codebarhq', target: '_blank', rel: 'noopener noreferrer' do + %i.fas.fa-coffee.me-2 + Buy us a coffee .col-sm-12.col-md-6.col-lg-3 = render partial: 'shared/social_media' diff --git a/app/views/layouts/_navigation.html.haml b/app/views/layouts/_navigation.html.haml index 8edc2ab52..25f485799 100644 --- a/app/views/layouts/_navigation.html.haml +++ b/app/views/layouts/_navigation.html.haml @@ -25,11 +25,11 @@ %li.dropdown-divider %li= link_to 'Tutorials', 'http://tutorials.codebar.io', class: 'dropdown-item' %li.nav-item - = link_to sponsors_path, class: 'nav-link border-0' do - Sponsors + = link_to volunteer_path, class: 'nav-link border-0' do + Volunteer %li.nav-item - = link_to how_to_support_us_path, class: 'nav-link border-0' do - How to support us + = link_to fundraise_path, class: 'nav-link border-0' do + Fundraise %li.nav-item = link_to "http://jobs.codebar.io/", class: 'nav-link border-0' do Job Board @@ -53,8 +53,5 @@ = render 'layouts/member_menu' %li.nav-item.d-flex.align-items-center %div.nav-link.d-flex.gap-2.py-0 - = link_to new_donation_path, class: 'btn btn-sm fs-6 fw-semibold btn-primary' do + = link_to donate_path, class: 'btn btn-sm fs-6 fw-semibold btn-primary' do Donate - = link_to 'https://buymeacoffee.com/codebarhq', class: 'btn btn-sm fs-6 fw-semibold btn-secondary', target: '_blank', rel: 'noopener noreferrer' do - %i.fas.fa-coffee.me-1 - Buy us a coffee diff --git a/app/views/pages/donate.html.haml b/app/views/pages/donate.html.haml new file mode 100644 index 000000000..6faad770e --- /dev/null +++ b/app/views/pages/donate.html.haml @@ -0,0 +1,16 @@ +.py-4.py-lg-5.bg-primary + .container + .row.align-items-center + .col-12.col-md-6 + %h1.display-2.text-white.lh-1.mb-4 + Donate + %br + to codebar + %p.text-white.lead.mb-4 + Your donation helps us continue running free coding workshops for people from underrepresented groups in tech. + .col-12.col-md-6 + = image_tag 'how-to-support-us/codebar-festival-2023.jpg', alt: '', class: 'mw-100 rounded' + +.py-4.py-lg-5 + .container + = render partial: 'shared/donation_platforms' diff --git a/app/views/pages/fundraise.html.haml b/app/views/pages/fundraise.html.haml new file mode 100644 index 000000000..164e440f5 --- /dev/null +++ b/app/views/pages/fundraise.html.haml @@ -0,0 +1,29 @@ +.py-4.py-lg-5.bg-primary + .container + .row.align-items-center + .col-12.col-md-6 + %h1.display-2.text-white.lh-1.mb-4 + Fundraise + %br + for codebar + %p.text-white.lead.mb-4 + Join our team at a physical challenge event and help keep our workshops running. + .col-12.col-md-6 + = image_tag 'how-to-support-us/hackney-half.jpeg', alt: t('pages.how_to_support_us.fundraise.image_alt'), class: 'mw-100 rounded' + +.py-4.py-lg-5 + .container + .row.mb-5 + .col-12.col-lg-8 + %p.lead + = t('pages.how_to_support_us.fundraise.description_html', email: 'hello@codebar.io') + .row + .col-12.col-lg-4 + .ratio.shadow{style: '--bs-aspect-ratio: 150%;'} + %iframe{title: 'Royal Parks Half Marathon', src: '//runforcharity.com/codebar/royal-parks-half-marathon/registration'} + .col-12.col-lg-4 + .ratio.shadow{style: '--bs-aspect-ratio: 150%;'} + %iframe{title: 'Brighton Marathon April 2026', src: '//runforcharity.com/codebar/the-brighton-marathon/1744707816740.9279'} + .col-12.col-lg-4 + .ratio.shadow{style: '--bs-aspect-ratio: 150%;'} + %iframe{title: 'Hackney Half May 2026', src: '//runforcharity.com/codebar/hackney-half/1747652084027971'} diff --git a/app/views/pages/volunteer.html.haml b/app/views/pages/volunteer.html.haml new file mode 100644 index 000000000..1f288aa63 --- /dev/null +++ b/app/views/pages/volunteer.html.haml @@ -0,0 +1,55 @@ +.py-4.py-lg-5.bg-primary + .container + .row.align-items-center + .col-12.col-md-6 + %h1.display-2.text-white.lh-1.mb-4 + Volunteer + %br + with us + %p.text-white.lead.mb-4 + Use your skills to help people from groups underrepresented in tech break into the industry. + %ul.list-inline + %li.list-inline-item + = link_to t('pages.how_to_support_us.volunteer.become_a_coach.title'), '#become-a-coach', class: 'btn btn-light' + %li.list-inline-item + = link_to t('pages.how_to_support_us.volunteer.become_an_organiser.title'), '#become-an-organiser', class: 'btn btn-light' + .col-12.col-md-6 + = image_tag 'how-to-support-us/become-a-coach.jpg', alt: '', class: 'mw-100 rounded' + +.py-4.py-lg-5#become-a-coach + .container + .row.mb-5 + .col + %h2.h1.text-center= t('pages.how_to_support_us.volunteer.become_a_coach.title') + .row.justify-content-center + .col-12.col-lg-9 + %p.lead.text-center.mb-5 + = t('pages.how_to_support_us.volunteer.become_a_coach.description') + .text-center + = link_to registration_path(member_type: 'coach'), class: 'btn btn-primary btn-lg text-decoration-none' do + = t('members.sign_up_as_coach') + %i.fab.fa-github + +.py-4.py-lg-5.bg-light#become-an-organiser + .container + .row.mb-5 + .col + %h2.h1.text-center= t('pages.how_to_support_us.volunteer.become_an_organiser.title') + .row.justify-content-center + .col-12.col-lg-9 + %p.lead.text-center.mb-5 + = t('pages.how_to_support_us.volunteer.become_an_organiser.description') + .text-center + = mail_to 'hello@codebar.io', t('pages.how_to_support_us.volunteer.become_an_organiser.link'), subject: "I'd like to become a codebar organiser for [city] chapter", class: 'btn btn-primary btn-lg text-decoration-none' + +.py-4.py-lg-5#other-skills + .container + .row.mb-5 + .col + %h2.h1.text-center= t('pages.how_to_support_us.volunteer.volunteer.title') + .row.justify-content-center + .col-12.col-lg-9 + %p.lead.text-center.mb-5 + = t('pages.how_to_support_us.volunteer.volunteer.description') + .text-center + = mail_to 'hello@codebar.io', t('pages.how_to_support_us.volunteer.volunteer.link'), subject: "I'd like to volunteer with codebar", class: 'btn btn-primary btn-lg text-decoration-none' diff --git a/app/views/shared/_donation_platforms.html.haml b/app/views/shared/_donation_platforms.html.haml index 22e30fd16..2f25a8d24 100644 --- a/app/views/shared/_donation_platforms.html.haml +++ b/app/views/shared/_donation_platforms.html.haml @@ -12,7 +12,7 @@ .bg-white.rounded-top.p-3.d-flex.align-items-center = image_tag("logo.png", alt:t("donation_platforms.donation_form.image_alt"), class: "mw-100") .card-body - %h3.h6= link_to(t("donation_platforms.donation_form.title"), new_donation_path) + %h3.h6= link_to(t("donation_platforms.donation_form.title"), "https://codebar.enthuse.com/donate/") %p.card-text= t("donation_platforms.donation_form.text") .d-flex.col-sm-12.col-md-6.col-lg-3 .card.mt-3.mt-lg-0.shadow @@ -41,4 +41,4 @@ - if local_assigns[:with_button] .d-flex.justify-content-center.mt-4 - = link_to t("donation_platforms.link"), how_to_support_us_path, class: "btn btn-primary btn-lg my-4" + = link_to t("donation_platforms.link"), donate_path, class: "btn btn-primary btn-lg my-4" diff --git a/config/routes.rb b/config/routes.rb index fc6dc3893..0acf546ff 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -158,7 +158,10 @@ get 'cookie-policy' => 'pages#show', id: 'cookie-policy' get 'privacy-policy' => 'pages#show', id: 'privacy-policy' get 'breach-code-of-conduct' => 'pages#show', id: 'breach-code-of-conduct' - get 'how-to-support-us' => 'pages#show', id: 'how-to-support-us' + get 'how-to-support-us' => redirect('/volunteer') + get 'volunteer' => 'pages#show', id: 'volunteer' + get 'fundraise' => 'pages#show', id: 'fundraise' + get 'donate' => 'pages#show', id: 'donate' get 'codebar-stories-podcast' => 'pages#show', id: 'codebar-stories-podcast' get ':id' => 'chapter#show', as: :chapter