diff --git a/app/views/static/home.html.erb b/app/views/static/home.html.erb index 82038cbd6..7053536ee 100644 --- a/app/views/static/home.html.erb +++ b/app/views/static/home.html.erb @@ -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') %> diff --git a/app/views/static/home/_featured_trainer.html.erb b/app/views/static/home/_featured_trainer.html.erb index e1bf7344b..b58df8c29 100644 --- a/app/views/static/home/_featured_trainer.html.erb +++ b/app/views/static/home/_featured_trainer.html.erb @@ -1,6 +1,10 @@ <% cache(['home', 'featured_trainer', @featured_trainer]) do %> -<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/static/home/_latest_materials.erb b/app/views/static/home/_latest_materials.erb index 1276ed999..ebd1cc2e9 100644 --- a/app/views/static/home/_latest_materials.erb +++ b/app/views/static/home/_latest_materials.erb @@ -1,7 +1,7 @@ <% cache(['home', 'latest_materials', @materials]) do %>
-

<%= 'Latest materials' %>

+

<%= link_to('Latest materials', materials_path, class: 'home-title-link' ) %>

diff --git a/app/views/static/home/_upcoming_events.html.erb b/app/views/static/home/_upcoming_events.html.erb index d91fab2e1..31d223e67 100644 --- a/app/views/static/home/_upcoming_events.html.erb +++ b/app/views/static/home/_upcoming_events.html.erb @@ -1,7 +1,7 @@ <% cache(['home', 'upcoming_events', @events]) do %>
-

<%= 'Upcoming events' %>

+

<%= link_to('Upcoming events', events_path, class: 'home-title-link' ) %>

    <%= render partial: 'common/masonry_grid', locals: { objects: @events } %>