You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

101 lines
3.0 KiB

<%- content_for :title, node_title(@node) %>
<div class="results-header">
<h1><%= result_headline(current_player) %></h1>
<%= button_to start_path(skip_facts: true) do %>
<span class="arrow"></span>
<%= tag.span(t("game.save_another_tomato")) %>
<% end %>
</div>
<div class="results-tagline">
<div>
<div><%= result_description(current_player) %></div>
</div>
<%= svg "ico-wave" %>
</div>
<div class="impact food-waste">
<div class="icon"><%= svg "ico-last-save" %></div>
<h3><%= impact_label(:food_waste) %></h3>
<p><%= impact_message(current_player, :food_waste) %></p>
<details class="impact-learn-more">
<summary>
<h4><%= t("game.results.what_many_dont_know") %></h4>
<span class="details-icon"></span>
</summary>
<% impact_learn_more(:food_waste).each do |paragraph| %>
<p><%= paragraph %></p>
<% end %>
</details>
</div>
<div class="impact emissions">
<div class="icon"><%= svg "ico-fuel" %></div>
<h3><%= impact_label(:emissions) %></h3>
<p><%= impact_message(current_player, :emissions) %></p>
<details class="impact-learn-more">
<summary>
<h4><%= t("game.results.what_many_dont_know") %></h4>
<span class="details-icon"></span>
</summary>
<% impact_learn_more(:emissions).each do |paragraph| %>
<p><%= paragraph %></p>
<% end %>
</details>
</div>
<div class="impact income">
<div class="icon"><%= svg "ico-coins" %></div>
<h3><%= impact_label(:income) %></h3>
<p><%= impact_message(current_player, :income) %></p>
<details class="impact-learn-more">
<summary>
<h4><%= t("game.results.what_many_dont_know") %></h4>
<span class="details-icon"></span>
</summary>
<% impact_learn_more(:income).each do |paragraph| %>
<p><%= paragraph %></p>
<% end %>
</details>
</div>
<div class="like-container" data-controller="rating" data-rating-url-value="<%= rate_path %>">
<%= tag.h3 t("game.did_you_like_this_game") %>
<div>
<% { up: "thumbs-up", down: "thumbs-down" }.each do |direction, css_class| %>
<button class="<%= class_names(css_class, "is-selected" => current_player.rating_direction == direction) %>"
type="button"
aria-label="<%= direction %>"
data-direction="<%= direction %>"
data-rating-target="button"
data-action="rating#rate"><%= svg "ico-thumb" %></button>
<% end %>
</div>
</div>
<div class="newsletter-container">
<%= tag.h3 t("game.join_our_newsletter") %>
<%= tag.p t("game.join_our_newsletter_desc") %>
</div>
<div class="cta-container">
<%= link_to tag.span(t("game.subscribe_to_newsletter")), "https://ikeafoundation.com/newsletter", class: "cta cta-link" %>
<%= button_to start_path(skip_facts: true), class: "cta" do %>
<%= tag.span(t("game.save_another_tomato")) %>
<% end %>
</div>
<div class="hero-container">
<%= render_responsive_picture(@node.icon, alt: "Hero", fetchpriority: "high") if @node.icon %>
<%= svg "inter-ikea-systems" %>
<%= svg "ico-wave" %>
</div>