Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed src/assets/protests/Home Hero - mobile - Faded.jpg
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/assets/protests/Home Hero - web - Faded.jpg
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 18 additions & 14 deletions src/lib/components/Hero.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import homeHeroDesktop from '$assets/protests/Home Hero - web - Faded.jpg?enhanced'
import homeHeroMobile from '$assets/protests/Home Hero - mobile - Faded.jpg?enhanced'
import homeHeroDesktop from '$assets/protests/Home Hero - web - No Background.png?enhanced'
import homeHeroMobile from '$assets/protests/Home Hero - mobile - No Background.png?enhanced'
import { onMount } from 'svelte'
import { emulateCqwIfNeeded } from '$lib/container-query-units'

Expand Down Expand Up @@ -62,27 +62,28 @@
}

.hero :global(img) {
width: 100%;
height: 100%;
object-fit: contain;
object-position: center bottom;
transform-origin: center bottom;
position: absolute;
bottom: 0;
left: 50%;
--hero-scale: 1;
transform: translateX(-50%) scale(var(--hero-scale));
width: min(100%, calc(max(100vh, var(--hero-min-height)) * var(--hero-img-ar)));
height: auto;
mix-blend-mode: soft-light;
-webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

@media (min-width: 851px) {
.hero :global(img) {
transform: scale(0.95);
transform-origin: center bottom;
--hero-scale: 0.95;
}
}

@media (max-width: 850px) {
.hero :global(img) {
position: absolute !important;
bottom: var(--mobile-hero-img-pos, 0px) !important;
left: 0 !important;
width: 100% !important;
height: auto !important;
object-fit: initial !important;
bottom: var(--mobile-hero-img-pos, 0px);
}

.content {
Expand Down Expand Up @@ -124,7 +125,10 @@
left: 50%;
transform: translateX(-50%);
background-color: #ff9416;
isolation: isolate;

/* Desktop hero image aspect ratio (2880 / 1600) — update if image changes */
--hero-img-ar: 1.8;
/* Adjust this to push the mobile image up or down (e.g., 0px, 10vh, -20px) */
--mobile-hero-img-pos: 215px;
}
Expand Down
2 changes: 1 addition & 1 deletion src/posts/australia-detail.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: " PauseAI Australia (our campaigns)"
title: ' PauseAI Australia (our campaigns)'
slug: australia-detail
description: More information about the Australian chapter of PauseAI
---
Expand Down
Loading