Skip to content

Commit

Permalink
Sponsors
Browse files Browse the repository at this point in the history
  • Loading branch information
spikex committed Sep 20, 2023
1 parent 8bf2d35 commit 2e5aff9
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 381 deletions.
4 changes: 3 additions & 1 deletion src/_data/site_metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ main_page:
label: FAQ
navbar: true
enabled: true
- name: testimonials # sponsors and/or in the footer?
- name: sponsors
label: Sponsors
enabled: true
navbar: true
- name: contact # tickets
enabled: false
- name: back_to_top
Expand Down
6 changes: 6 additions & 0 deletions src/_data/sponsors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@
level: sapphire
url: https://gusto.com/
enabled: true
footer: true
- name: FusionAuth
logo: fusionauth.png
level: community
url: https://fusionauth.io
enabled: true
2 changes: 1 addition & 1 deletion src/_partials/_footer.erb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</div>
</div>
<div class="w-full px-4 md:w-2/3 lg:w-2/3 xl:w-2/3">
<% sponsors = site.data.sponsors.select {|sponsor| sponsor.enabled } %>
<% sponsors = site.data.sponsors.select {|sponsor| sponsor.enabled && sponsor.footer } %>
<% unless sponsors.empty? %>
<div class="mb-10 w-full">
<h4 class="mb-9 text-lg font-semibold text-white">Sponsored by</h4>
Expand Down
86 changes: 86 additions & 0 deletions src/_partials/_sponsors.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<% sponsor_levels = site.data.sponsors.group_by {|sponsor| sponsor.level } %>
<section id="sponsors" class="pt-20 md:pt-[120px]">
<div class="container px-4">
<div class="flex flex-wrap">
<div class="mx-4 w-full">
<div class="mx-auto mb-[60px] text-center lg:mb-10">
<span class="mb-2 block text-lg font-semibold text-primary">
Sponsors
</span>
<p
class="text-lg leading-relaxed text-body-color sm:text-xl sm:leading-relaxed"
>
Rocky Mountain Ruby wouldn't be possible without the support of our generous sponsors.
</p>
</div>
</div>
</div>

<!-- I should be a component -->
<% if sponsor_levels['sapphire'] %>
<div class="flex flex-wrap">
<div class="mx-4 w-full">
<div class="wow fadeInUp" data-wow-delay=".2s">
<div class="ud-title mb-8">
<h4 class="text-center font-medium text-lg text-[#2672B5] mb-8">Sapphire Sponsors</h4>
</div>
<div class="ud-brands-logo flex flex-wrap items-center justify-center">
<% sponsor_levels['sapphire'].each do |sponsor| %>
<div class="ud-single-logo mr-10 mb-5 max-w-[300px]">
<a
href="<%= sponsor.url %>"
target="_blank"
rel="nofollow noopner"
>
<img
src="/images/sponsors/<%= sponsor.logo %>"
alt="<%= sponsor.name %>"
class="grayscale duration-300 hover:filter-none"
/>
</a>
</div>
<% end %>
</div>
</div>
</div>
<% end %>
<% if sponsor_levels['community'] %>
<div class="mx-4 w-full">
<div class="wow fadeInUp" data-wow-delay=".2s">
<div class="ud-title mb-8">
<h4 class="text-center font-medium text-lg text-primary mb-8">Community Sponsors</h4>
</div>
<div class="ud-brands-logo flex flex-wrap items-center justify-center">
<% sponsor_levels['community'].each do |sponsor| %>
<div class="ud-single-logo mr-10 mb-5 max-w-[200px]">
<a
href="<%= sponsor.url %>"
target="_blank"
rel="nofollow noopner"
>
<img
src="/images/sponsors/<%= sponsor.logo %>"
alt="<%= sponsor.name %>"
class="grayscale duration-300 hover:filter-none"
/>
</a>
</div>
<% end %>
</div>
</div>
</div>
<% end %>
</div>
</div>
<div class="flex flex-wrap">
<div class="mx-4 w-full">
<div class="mx-auto mb-[60px] text-center lg:mb-10">
<p
class="text-lg leading-relaxed text-body-color sm:text-xl sm:leading-relaxed"
>
Interested in supporting Rocky Mountain Ruby? Find out about <a href="/sponsorship" class="text-dark hover:text-primary" target="_blank">sponsorship</a>.
</p>
</div>
</div>
</div>
</section>
Loading

0 comments on commit 2e5aff9

Please sign in to comment.