Skip to content

Commit

Permalink
tweak sponsor logos displayed on welcome page (#214)
Browse files Browse the repository at this point in the history
* sponsor logo links now display on welcome page

* boosted UP logo and centered all logos

---------

Co-authored-by: Claire Fernandes <[email protected]>
  • Loading branch information
cnandes and Claire Fernandes authored Dec 11, 2023
1 parent 1c6242b commit 09386bb
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/controllers/pages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ class PagesController < ApplicationController

expose(:complex_view?) { COMPLEX_VIEWS.include? params[:id] }

expose(:sponsors) do
YAML.load_file Rails.root.join('config/data/sponsors.yml')
end

rescue_from ActionView::MissingTemplate do |exception|
if exception.message.match?(/Missing template pages#{request.path}/)
raise ActionController::RoutingError, "No such page: #{params[:id]}"
Expand Down
27 changes: 25 additions & 2 deletions app/views/pages/welcome.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<a href="#about" class="cta">About Us</a>
</article>

<div class="divider-2" style="background-image: url(<%= asset_url('roro-pattern.png') %>)">&nbsp;</div>
<div class="divider-1" style="background-image: url(<%= asset_url('roro-pattern.png') %>)">&nbsp;</div>

<article id="in-person" class="welcome md:ml-10">
<h2>Meeting in Person</h2>
Expand All @@ -62,7 +62,7 @@
</ul>
</article>

<div class="divider-3" style="background-image: url(<%= asset_url('roro-pattern.png') %>)">&nbsp;</div>
<div class="divider-2" style="background-image: url(<%= asset_url('roro-pattern.png') %>)">&nbsp;</div>

<article id="online" class="welcome md:ml-10">
<h2>Connecting Online</h2>
Expand All @@ -76,6 +76,29 @@
</p>
</article>

<div class="divider-3" style="background-image: url(<%= asset_url('roro-pattern.png') %>)">&nbsp;</div>

<article id="sponsors" class="welcome md:ml-10">
<h2>Sponsors</h2>
<div class="flex flex-wrap justify-center">
<% sponsors.each do |sponsor| %>
<% if sponsor['key'] == 'up' %>
<div class="m-1">
<%= link_to "/sponsors/#{sponsor['key']}" do %>
<%= image_tag "sponsors/#{sponsor['images'].first}", alt: sponsor['name'], style: "width: 190px" %>
<% end %>
</div>
<% else %>
<div class="m-6">
<%= link_to "/sponsors/#{sponsor['key']}" do %>
<%= image_tag "sponsors/#{sponsor['images'].first}", alt: sponsor['name'], style: "width: 150px" %>
<% end %>
</div>
<% end %>
<% end %>
</div>
</article>

<div class="divider-4" style="background-image: url(<%= asset_url('roro-pattern.png') %>)">&nbsp;</div>

<article id="about" class="welcome md:ml-10">
Expand Down

0 comments on commit 09386bb

Please sign in to comment.