diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index 88aef02..a165bd5 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -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]}" diff --git a/app/views/pages/welcome.html.erb b/app/views/pages/welcome.html.erb index eb709c9..e3afd0f 100644 --- a/app/views/pages/welcome.html.erb +++ b/app/views/pages/welcome.html.erb @@ -40,7 +40,7 @@ About Us -
 
+
 

Meeting in Person

@@ -62,7 +62,7 @@
-
 
+
 

Connecting Online

@@ -76,6 +76,29 @@

+
 
+ +
+

Sponsors

+
+ <% sponsors.each do |sponsor| %> + <% if sponsor['key'] == 'up' %> +
+ <%= link_to "/sponsors/#{sponsor['key']}" do %> + <%= image_tag "sponsors/#{sponsor['images'].first}", alt: sponsor['name'], style: "width: 190px" %> + <% end %> +
+ <% else %> +
+ <%= link_to "/sponsors/#{sponsor['key']}" do %> + <%= image_tag "sponsors/#{sponsor['images'].first}", alt: sponsor['name'], style: "width: 150px" %> + <% end %> +
+ <% end %> + <% end %> +
+
+