| @ -0,0 +1 @@ | |||
| <svg xmlns="http://www.w3.org/2000/svg" width="22" height="19" viewBox="0 0 22 19"><path d="M10.88,2.25c-1.34,0-2.01,0-2.64.26-.37.15-.7.38-.99.64-.49-1.16-1.39-2.06-2.55-2.54-.87-.36-1.86-.36-3.82-.36H.12v.75C.12,2.96.12,3.94.49,4.82c.49,1.17,1.4,2.08,2.57,2.57.75.31,1.59.35,3.07.36h0v3.5H.88v1.5h10v-1.5h-3.25v-3.5h0c.86-.01,1.39-.05,1.89-.26.84-.35,1.5-1.01,1.85-1.85.26-.63.26-1.3.26-2.64v-.75h-.75ZM3.63,6c-.79-.33-1.43-.97-1.76-1.76-.21-.51-.24-1.22-.25-2.49,1.28,0,1.99.04,2.49.25.79.33,1.43.97,1.76,1.76.21.51.24,1.22.25,2.49-1.28,0-1.99-.04-2.49-.25ZM9.98,5.07c-.2.47-.56.84-1.04,1.04-.26.11-.67.14-1.31.14,0-.65.03-1.05.14-1.31.2-.47.56-.84,1.04-1.04.26-.11.67-.14,1.31-.14,0,.65-.03,1.05-.14,1.31ZM21.88,15.75H.88v-1.5h21v1.5ZM21.88,18.75H.88v-1.5h21v1.5Z"/></svg> | |||
| @ -0,0 +1,17 @@ | |||
| import { Controller } from "@hotwired/stimulus" | |||
| export default class extends Controller { | |||
| static targets = ["video", "link"] | |||
| connect() { | |||
| this.videoTarget.addEventListener("ended", this.followLink) | |||
| } | |||
| disconnect() { | |||
| this.videoTarget.removeEventListener("ended", this.followLink) | |||
| } | |||
| followLink = () => { | |||
| this.linkTarget.click() | |||
| } | |||
| } | |||
| @ -0,0 +1,21 @@ | |||
| <%- content_for :title, node_title(@node) %> | |||
| <% video_attachment = @node.attachments.select { |a| a.asset&.file&.video? }[0] %> | |||
| <div class="hero-container" data-controller="intro"> | |||
| <% if video_attachment %> | |||
| <%= video_tag rails_storage_proxy_path(video_attachment.asset.file), | |||
| autoplay: true, | |||
| muted: true, | |||
| loop: false, | |||
| playsinline: true, | |||
| preload: "auto", | |||
| data: { intro_target: "video" } %> | |||
| <article> | |||
| <%= video_attachment.body.html_safe %> | |||
| </article> | |||
| <% end %> | |||
| <%= link_to url_for(action: "stage", id: 1), class: "hero-link", "aria-label": t("game.got_it_lets_get_started"), data: { intro_target: "link" } do %><% end %> | |||
| </div> | |||
| @ -0,0 +1,21 @@ | |||
| <%- content_for :title, node_title(@node) %> | |||
| <div class="stage-header"> | |||
| <div class="stage-icon"> | |||
| <%= svg "ico-soil" %> | |||
| </div> | |||
| <div> | |||
| <%= tag.div t("game.stage_i_of_n", i: 1, n: 5), class: "stage-progress" %> | |||
| <%= tag.h1 @node.title %> | |||
| </div> | |||
| </div> | |||
| <div class="hero-container"> | |||
| <%= render_responsive_picture(@node.icon, alt: "Hero", fetchpriority: "high") %> | |||
| <%= svg "ico-wave" %> | |||
| </div> | |||
| <article> | |||
| <%= tag.h1 t("game.intro_title").html_safe %> | |||
| </article> | |||