From 56a033ef9daa5f25e961b662e55d2b8984d4e7d4 Mon Sep 17 00:00:00 2001 From: Matthew Polak Date: Sat, 18 Jul 2026 12:55:37 -0700 Subject: [PATCH 1/3] Add Steam links and refine trailer hero Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3bca27e8-1e03-415b-801a-f6bf81a6ba9e --- .../src/components/home/TrailerHero.test.js | 23 ++++++ website/src/components/home/TrailerHero.vue | 17 ++++- .../src/components/layout/SiteChrome.test.js | 44 ++++++++++++ website/src/components/layout/SiteFooter.vue | 15 +++- website/src/components/layout/SiteHeader.vue | 8 +++ website/src/styles/base.css | 70 ++++++++++++++----- 6 files changed, 158 insertions(+), 19 deletions(-) create mode 100644 website/src/components/layout/SiteChrome.test.js diff --git a/website/src/components/home/TrailerHero.test.js b/website/src/components/home/TrailerHero.test.js index 69d89d2..cf0f9bf 100644 --- a/website/src/components/home/TrailerHero.test.js +++ b/website/src/components/home/TrailerHero.test.js @@ -3,6 +3,29 @@ import { describe, expect, it } from 'vitest'; import TrailerHero from './TrailerHero.vue'; describe('TrailerHero', () => { + it('links to Steam without the retired Watch film copy', () => { + const wrapper = mount(TrailerHero); + const steamLink = wrapper.get('a'); + + expect(steamLink.text()).toBe('Get Straif on Steam'); + expect(steamLink.attributes()).toMatchObject({ + href: 'https://store.steampowered.com/app/3850480/Straif/', + target: '_blank', + rel: 'noopener noreferrer', + }); + expect(wrapper.text()).not.toMatch(/watch film/i); + }); + + it('uses an inline SVG for the play icon', () => { + const wrapper = mount(TrailerHero); + const playButton = wrapper.get( + 'button[aria-label="Play the Straif trailer"]' + ); + + expect(playButton.get('svg').attributes('aria-hidden')).toBe('true'); + expect(playButton.element.children).toHaveLength(1); + }); + it('loads the privacy-enhanced embed only after activation', async () => { const wrapper = mount(TrailerHero); expect(wrapper.find('iframe').exists()).toBe(false); diff --git a/website/src/components/home/TrailerHero.vue b/website/src/components/home/TrailerHero.vue index d7a8238..2e9313b 100644 --- a/website/src/components/home/TrailerHero.vue +++ b/website/src/components/home/TrailerHero.vue @@ -11,7 +11,14 @@ const trailerSrc =

Official trailer · YouTube

Straif

-

Watch film

+ + Get Straif on Steam +
@@ -44,7 +51,13 @@ const trailerSrc = aria-label="Play the Straif trailer" @click="isPlaying = true" > - Play trailer +
diff --git a/website/src/components/layout/SiteChrome.test.js b/website/src/components/layout/SiteChrome.test.js new file mode 100644 index 0000000..e8b8a65 --- /dev/null +++ b/website/src/components/layout/SiteChrome.test.js @@ -0,0 +1,44 @@ +import { mount } from '@vue/test-utils'; +import { describe, expect, it } from 'vitest'; +import SiteFooter from './SiteFooter.vue'; +import SiteHeader from './SiteHeader.vue'; + +const steamUrl = 'https://store.steampowered.com/app/3850480/Straif/'; +const routerLinkStub = { + props: ['to'], + template: '', +}; + +function mountWithRouterLink(component) { + return mount(component, { + global: { + stubs: { + RouterLink: routerLinkStub, + }, + }, + }); +} + +describe('site Steam links', () => { + it('adds the approved Steam link to the header', () => { + const wrapper = mountWithRouterLink(SiteHeader); + const link = wrapper.get(`a[href="${steamUrl}"]`); + + expect(link.text()).toBe('Get Straif'); + expect(link.attributes()).toMatchObject({ + target: '_blank', + rel: 'noopener noreferrer', + }); + }); + + it('adds the approved Steam link to the footer', () => { + const wrapper = mountWithRouterLink(SiteFooter); + const link = wrapper.get(`a[href="${steamUrl}"]`); + + expect(link.text()).toBe('Steam'); + expect(link.attributes()).toMatchObject({ + target: '_blank', + rel: 'noopener noreferrer', + }); + }); +}); diff --git a/website/src/components/layout/SiteFooter.vue b/website/src/components/layout/SiteFooter.vue index e7697db..b0a140d 100644 --- a/website/src/components/layout/SiteFooter.vue +++ b/website/src/components/layout/SiteFooter.vue @@ -4,7 +4,20 @@ diff --git a/website/src/components/layout/SiteHeader.vue b/website/src/components/layout/SiteHeader.vue index 0541d46..bc22c0d 100644 --- a/website/src/components/layout/SiteHeader.vue +++ b/website/src/components/layout/SiteHeader.vue @@ -6,6 +6,14 @@ diff --git a/website/src/styles/base.css b/website/src/styles/base.css index 1410333..49581c4 100644 --- a/website/src/styles/base.css +++ b/website/src/styles/base.css @@ -171,6 +171,12 @@ a { font-weight: 500; } +.site-header nav .site-header__cta { + border: 1px solid var(--color-border-strong); + color: var(--color-text); + padding: 0.45rem 0.65rem; +} + .site-header nav a.router-link-exact-active { color: var(--color-text); } @@ -188,8 +194,12 @@ a { .trailer-hero { position: relative; isolation: isolate; - width: min(100%, 100rem, calc(177.7778vh - 7.1111rem)); - max-height: calc(100vh - 4rem); + width: min( + calc(100% - var(--page-gutter) - var(--page-gutter)), + 84rem, + calc(156.4444vh - 7.1111rem) + ); + max-height: calc(88vh - 4rem); margin-inline: auto; overflow: hidden; aspect-ratio: 16 / 9; @@ -239,14 +249,15 @@ a { transform var(--transition-fast); } -.trailer-hero__media button::before { - width: 0; - height: 0; - margin-left: 0.2rem; - border-top: 0.45rem solid transparent; - border-bottom: 0.45rem solid transparent; - border-left: 0.72rem solid var(--color-text); - content: ''; +.trailer-hero__media button svg { + width: 1.25rem; + height: 1.25rem; + color: var(--color-text); + transform: translateX(0.08rem); +} + +.trailer-hero__media button path { + fill: currentColor; } .trailer-hero__media button:active { @@ -266,7 +277,8 @@ a { pointer-events: none; } -.trailer-hero__copy > p { +.trailer-hero__copy > p, +.trailer-hero__steam { width: 10rem; color: var(--color-text); font-family: var(--font-data); @@ -278,8 +290,22 @@ a { text-transform: uppercase; } -.trailer-hero__copy > p:last-child { - text-align: right; +.trailer-hero__steam { + box-sizing: border-box; + border: 1px solid oklch(0.96 0.007 100 / 0.72); + background: oklch(0.115 0 0 / 0.82); + padding: 0.7rem 0.8rem; + pointer-events: auto; + text-align: center; + text-decoration: none; + transition: + background-color var(--transition-fast), + border-color var(--transition-fast), + transform var(--transition-fast); +} + +.trailer-hero__steam:active { + transform: scale(0.98); } .trailer-hero h1, @@ -689,6 +715,11 @@ a { transform: translate(-50%, -50%) scale(1.04); } + .trailer-hero__steam:hover { + border-color: var(--color-text); + background: oklch(0.115 0 0 / 0.94); + } + .leaderboard-tabs button:hover { color: var(--color-text); } @@ -718,9 +749,15 @@ a { } .site-header { + gap: 1rem; padding-block: 1.25rem; } + .site-header nav { + justify-content: flex-end; + gap: 1rem; + } + .site-footer { flex-direction: column; gap: 1rem; @@ -737,13 +774,14 @@ a { gap: 1rem; } - .trailer-hero__copy > p { + .trailer-hero__copy > p, + .trailer-hero__steam { width: min(9rem, 42vw); font-size: 0.625rem; } - .trailer-hero__copy > p:last-child { - display: none; + .trailer-hero__steam { + display: block; } .game-intro { From 4bb8a1f4e95f04f1fa20a76b0cbeb4fba49bd9a7 Mon Sep 17 00:00:00 2001 From: Matthew Polak Date: Sat, 18 Jul 2026 13:02:59 -0700 Subject: [PATCH 2/3] Refine Steam navigation and trailer spacing Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3bca27e8-1e03-415b-801a-f6bf81a6ba9e --- .../src/components/home/TrailerHero.test.js | 10 +- website/src/components/home/TrailerHero.vue | 100 ++++++++---------- .../src/components/layout/SiteChrome.test.js | 1 + website/src/components/layout/SiteHeader.vue | 5 + website/src/styles/base.css | 72 ++++++------- 5 files changed, 88 insertions(+), 100 deletions(-) diff --git a/website/src/components/home/TrailerHero.test.js b/website/src/components/home/TrailerHero.test.js index cf0f9bf..3420868 100644 --- a/website/src/components/home/TrailerHero.test.js +++ b/website/src/components/home/TrailerHero.test.js @@ -3,16 +3,10 @@ import { describe, expect, it } from 'vitest'; import TrailerHero from './TrailerHero.vue'; describe('TrailerHero', () => { - it('links to Steam without the retired Watch film copy', () => { + it('does not render promotional copy or a Steam link over the trailer', () => { const wrapper = mount(TrailerHero); - const steamLink = wrapper.get('a'); - expect(steamLink.text()).toBe('Get Straif on Steam'); - expect(steamLink.attributes()).toMatchObject({ - href: 'https://store.steampowered.com/app/3850480/Straif/', - target: '_blank', - rel: 'noopener noreferrer', - }); + expect(wrapper.find('a').exists()).toBe(false); expect(wrapper.text()).not.toMatch(/watch film/i); }); diff --git a/website/src/components/home/TrailerHero.vue b/website/src/components/home/TrailerHero.vue index 2e9313b..507691b 100644 --- a/website/src/components/home/TrailerHero.vue +++ b/website/src/components/home/TrailerHero.vue @@ -7,59 +7,53 @@ const trailerSrc =