Skip to content

Commit

Permalink
Revert home page changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fbacall committed Sep 5, 2024
1 parent d49d0e0 commit 069db1a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
12 changes: 3 additions & 9 deletions app/views/static/home.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,8 @@
<%= render partial: 'static/home/promo_blocks' if TeSS::Config.site.dig('home_page', 'promo_blocks') %>
<% cache(['home', 'upcoming_events', @events]) do %>
<%= render partial: 'static/home/upcoming_events' %>
<% end if @events.present? %>
<%= render partial: 'static/home/upcoming_events' if @events.present? %>
<% cache(['home', 'latest_materials', @materials]) do %>
<%= render partial: 'static/home/latest_materials' %>
<% end if @materials.present? %>
<%= render partial: 'static/home/latest_materials' if @materials.present? %>
<% cache(['home', 'featured_trainer', @featured_trainer]) do %>
<%= render partial: 'static/home/featured_trainer' %>
<% end if @featured_trainer.present? %>
<%= render partial: 'static/home/featured_trainer' if TeSS::Config.site.dig('home_page', 'featured_trainer') %>
10 changes: 7 additions & 3 deletions app/views/static/home/_featured_trainer.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<% cache(['home', 'featured_trainer', @featured_trainer]) do %>
<section id="featured_trainer">
<h2 class="text-center"><%= link_to('Featured trainer', trainers_path, class: 'home-title-link') %></h2>
<%= render partial: 'common/masonry_grid', locals: { objects: [@featured_trainer] } %>
<div class="tab-content">
<h2 class="text-center"><%= link_to('Featured trainer', trainers_path, class: 'home-title-link' ) %></h2>
<ul class="tab-pane fade in active">
<%= render partial: 'common/masonry_grid', locals: { objects: [@featured_trainer] } %>
</ul>
</div>
</section>
<% end %>
<% end %>
2 changes: 1 addition & 1 deletion app/views/static/home/_latest_materials.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<% cache(['home', 'latest_materials', @materials]) do %>
<section id="latest_materials">
<div class="tab-content">
<h2 class="text-center"><%= 'Latest materials' %></h2>
<h2 class="text-center"><%= link_to('Latest materials', materials_path, class: 'home-title-link' ) %></h2>
<ul class="tab-pane fade in active">
<%= render partial: 'common/masonry_grid', locals: { objects: @materials } %>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion app/views/static/home/_upcoming_events.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<% cache(['home', 'upcoming_events', @events]) do %>
<section id="upcoming_events">
<div class="tab-content">
<h2 class="text-center"><%= 'Upcoming events' %></h2>
<h2 class="text-center"><%= link_to('Upcoming events', events_path, class: 'home-title-link' ) %></h2>
<ul class="tab-pane fade in active">
<%= render partial: 'common/masonry_grid', locals: { objects: @events } %>
</ul>
Expand Down

0 comments on commit 069db1a

Please sign in to comment.