Add cards to SDG homepage
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
<div class="sdg-goals-index">
|
||||
<%= link_list(*goal_links, class: "sdg-goal-list") %>
|
||||
|
||||
<% phases.each do |phase| %>
|
||||
<section class="sdg-phase" id="sdg_phase_<%= phase.kind %>">
|
||||
<header>
|
||||
<h2 class="title"><%= phase.title %></h2>
|
||||
</header>
|
||||
|
||||
<%= render "shared/cards", cards: phase.cards %>
|
||||
</section>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
class SDG::Goals::IndexComponent < ApplicationComponent
|
||||
attr_reader :goals
|
||||
attr_reader :goals, :phases
|
||||
delegate :link_list, to: :helpers
|
||||
|
||||
def initialize(goals)
|
||||
def initialize(goals, phases)
|
||||
@goals = goals
|
||||
@phases = phases
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user