Skip to content

Commit 18a1305

Browse files
committed
feat: split how-to-support-us page into separate volunteer, fundraise, and donate pages
1 parent dbf5165 commit 18a1305

8 files changed

Lines changed: 120 additions & 15 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class DonationsController < ApplicationController
22
def new
3-
redirect_to I18n.t('services.donations'), allow_other_host: true
3+
redirect_to donate_path
44
end
55
end

app/views/layouts/_footer.html.haml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,14 @@
2828
%li= link_to t("navigation.coaches"), coaches_path
2929
%li= link_to t("navigation.sponsors"), sponsors_path
3030
%li= link_to t("navigation.events"), events_path
31-
%li= link_to t("navigation.jobs"), "https://jobs.codebar.io/"
32-
%li.active= link_to t("navigation.donate"), new_donation_path
33-
%li= link_to "Buy us a coffee", "https://buymeacoffee.com/codebarhq", target: '_blank', rel: 'noopener noreferrer'
31+
%li= link_to "Job Board", "https://jobs.codebar.io/"
32+
%li= link_to "Volunteer", volunteer_path
33+
%li= link_to "Fundraise", fundraise_path
34+
%li.active= link_to t("navigation.donate"), donate_path
35+
%li
36+
= link_to 'https://buymeacoffee.com/codebarhq', target: '_blank', rel: 'noopener noreferrer' do
37+
%i.fas.fa-coffee.me-2
38+
Buy us a coffee
3439

3540
.col-sm-12.col-md-6.col-lg-3
3641
= render partial: 'shared/social_media'

app/views/layouts/_navigation.html.haml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
%li.dropdown-divider
2626
%li= link_to 'Tutorials', 'http://tutorials.codebar.io', class: 'dropdown-item'
2727
%li.nav-item
28-
= link_to sponsors_path, class: 'nav-link border-0' do
29-
Sponsors
28+
= link_to volunteer_path, class: 'nav-link border-0' do
29+
Volunteer
3030
%li.nav-item
31-
= link_to how_to_support_us_path, class: 'nav-link border-0' do
32-
How to support us
31+
= link_to fundraise_path, class: 'nav-link border-0' do
32+
Fundraise
3333
%li.nav-item
3434
= link_to "http://jobs.codebar.io/", class: 'nav-link border-0' do
3535
Job Board
@@ -53,8 +53,5 @@
5353
= render 'layouts/member_menu'
5454
%li.nav-item.d-flex.align-items-center
5555
%div.nav-link.d-flex.gap-2.py-0
56-
= link_to new_donation_path, class: 'btn btn-sm fs-6 fw-semibold btn-primary' do
56+
= link_to donate_path, class: 'btn btn-sm fs-6 fw-semibold btn-primary' do
5757
Donate
58-
= link_to 'https://buymeacoffee.com/codebarhq', class: 'btn btn-sm fs-6 fw-semibold btn-secondary', target: '_blank', rel: 'noopener noreferrer' do
59-
%i.fas.fa-coffee.me-1
60-
Buy us a coffee

app/views/pages/donate.html.haml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.py-4.py-lg-5.bg-primary
2+
.container
3+
.row.align-items-center
4+
.col-12.col-md-6
5+
%h1.display-2.text-white.lh-1.mb-4
6+
Donate
7+
%br
8+
to codebar
9+
%p.text-white.lead.mb-4
10+
Your donation helps us continue running free coding workshops for people from underrepresented groups in tech.
11+
.col-12.col-md-6
12+
= image_tag 'how-to-support-us/codebar-festival-2023.jpg', alt: '', class: 'mw-100 rounded'
13+
14+
.py-4.py-lg-5
15+
.container
16+
= render partial: 'shared/donation_platforms'
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.py-4.py-lg-5.bg-primary
2+
.container
3+
.row.align-items-center
4+
.col-12.col-md-6
5+
%h1.display-2.text-white.lh-1.mb-4
6+
Fundraise
7+
%br
8+
for codebar
9+
%p.text-white.lead.mb-4
10+
Join our team at a physical challenge event and help keep our workshops running.
11+
.col-12.col-md-6
12+
= image_tag 'how-to-support-us/hackney-half.jpeg', alt: t('pages.how_to_support_us.fundraise.image_alt'), class: 'mw-100 rounded'
13+
14+
.py-4.py-lg-5
15+
.container
16+
.row.mb-5
17+
.col-12.col-lg-8
18+
%p.lead
19+
= t('pages.how_to_support_us.fundraise.description_html', email: 'hello@codebar.io')
20+
.row
21+
.col-12.col-lg-4
22+
.ratio.shadow{style: '--bs-aspect-ratio: 150%;'}
23+
%iframe{title: 'Royal Parks Half Marathon', src: '//runforcharity.com/codebar/royal-parks-half-marathon/registration'}
24+
.col-12.col-lg-4
25+
.ratio.shadow{style: '--bs-aspect-ratio: 150%;'}
26+
%iframe{title: 'Brighton Marathon April 2026', src: '//runforcharity.com/codebar/the-brighton-marathon/1744707816740.9279'}
27+
.col-12.col-lg-4
28+
.ratio.shadow{style: '--bs-aspect-ratio: 150%;'}
29+
%iframe{title: 'Hackney Half May 2026', src: '//runforcharity.com/codebar/hackney-half/1747652084027971'}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
.py-4.py-lg-5.bg-primary
2+
.container
3+
.row.align-items-center
4+
.col-12.col-md-6
5+
%h1.display-2.text-white.lh-1.mb-4
6+
Volunteer
7+
%br
8+
with us
9+
%p.text-white.lead.mb-4
10+
Use your skills to help people from groups underrepresented in tech break into the industry.
11+
%ul.list-inline
12+
%li.list-inline-item
13+
= link_to t('pages.how_to_support_us.volunteer.become_a_coach.title'), '#become-a-coach', class: 'btn btn-light'
14+
%li.list-inline-item
15+
= link_to t('pages.how_to_support_us.volunteer.become_an_organiser.title'), '#become-an-organiser', class: 'btn btn-light'
16+
.col-12.col-md-6
17+
= image_tag 'how-to-support-us/become-a-coach.jpg', alt: '', class: 'mw-100 rounded'
18+
19+
.py-4.py-lg-5#become-a-coach
20+
.container
21+
.row.mb-5
22+
.col
23+
%h2.h1.text-center= t('pages.how_to_support_us.volunteer.become_a_coach.title')
24+
.row.justify-content-center
25+
.col-12.col-lg-9
26+
%p.lead.text-center.mb-5
27+
= t('pages.how_to_support_us.volunteer.become_a_coach.description')
28+
.text-center
29+
= link_to registration_path(member_type: 'coach'), class: 'btn btn-primary btn-lg text-decoration-none' do
30+
= t('members.sign_up_as_coach')
31+
%i.fab.fa-github
32+
33+
.py-4.py-lg-5.bg-light#become-an-organiser
34+
.container
35+
.row.mb-5
36+
.col
37+
%h2.h1.text-center= t('pages.how_to_support_us.volunteer.become_an_organiser.title')
38+
.row.justify-content-center
39+
.col-12.col-lg-9
40+
%p.lead.text-center.mb-5
41+
= t('pages.how_to_support_us.volunteer.become_an_organiser.description')
42+
.text-center
43+
= 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'
44+
45+
.py-4.py-lg-5#other-skills
46+
.container
47+
.row.mb-5
48+
.col
49+
%h2.h1.text-center= t('pages.how_to_support_us.volunteer.volunteer.title')
50+
.row.justify-content-center
51+
.col-12.col-lg-9
52+
%p.lead.text-center.mb-5
53+
= t('pages.how_to_support_us.volunteer.volunteer.description')
54+
.text-center
55+
= 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'

app/views/shared/_donation_platforms.html.haml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
.bg-white.rounded-top.p-3.d-flex.align-items-center
1313
= image_tag("logo.png", alt:t("donation_platforms.donation_form.image_alt"), class: "mw-100")
1414
.card-body
15-
%h3.h6= link_to(t("donation_platforms.donation_form.title"), new_donation_path)
15+
%h3.h6= link_to(t("donation_platforms.donation_form.title"), "https://codebar.enthuse.com/donate/")
1616
%p.card-text= t("donation_platforms.donation_form.text")
1717
.d-flex.col-sm-12.col-md-6.col-lg-3
1818
.card.mt-3.mt-lg-0.shadow
@@ -41,4 +41,4 @@
4141

4242
- if local_assigns[:with_button]
4343
.d-flex.justify-content-center.mt-4
44-
= link_to t("donation_platforms.link"), how_to_support_us_path, class: "btn btn-primary btn-lg my-4"
44+
= link_to t("donation_platforms.link"), donate_path, class: "btn btn-primary btn-lg my-4"

config/routes.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,10 @@
158158
get 'cookie-policy' => 'pages#show', id: 'cookie-policy'
159159
get 'privacy-policy' => 'pages#show', id: 'privacy-policy'
160160
get 'breach-code-of-conduct' => 'pages#show', id: 'breach-code-of-conduct'
161-
get 'how-to-support-us' => 'pages#show', id: 'how-to-support-us'
161+
get 'how-to-support-us' => redirect('/volunteer')
162+
get 'volunteer' => 'pages#show', id: 'volunteer'
163+
get 'fundraise' => 'pages#show', id: 'fundraise'
164+
get 'donate' => 'pages#show', id: 'donate'
162165
get 'codebar-stories-podcast' => 'pages#show', id: 'codebar-stories-podcast'
163166

164167
get ':id' => 'chapter#show', as: :chapter

0 commit comments

Comments
 (0)