diff --git a/src/lib/components/Hero.svelte b/src/lib/components/Hero.svelte index 9e0da07b..fc9097b0 100644 --- a/src/lib/components/Hero.svelte +++ b/src/lib/components/Hero.svelte @@ -6,34 +6,29 @@ import Link from '$lib/components/Link.svelte' - let isMobile = false let tagline: HTMLDivElement - const checkMobile = () => { - isMobile = window.innerWidth <= 850 || window.innerHeight > window.innerWidth - } - onMount(() => { - checkMobile() - window.addEventListener('resize', checkMobile) - const cleanupCqwEmulation = emulateCqwIfNeeded(tagline) return () => { - window.removeEventListener('resize', checkMobile) cleanupCqwEmulation?.() } })
- {#if isMobile} - - {:else} - - {/if} + + {#each Object.entries(homeHeroMobile.sources) as [format, srcset]} + + {/each} + {#each Object.entries(homeHeroDesktop.sources) as [format, srcset]} + + {/each} + +
-

Don’t let AI companies
gamble away our future

+

Don't let AI companies
gamble away our future

Get involved Donate @@ -74,7 +69,13 @@ transform-origin: center bottom; } - @media (max-width: 850px), (orientation: portrait) { + @media (min-width: 851px) { + .hero :global(img) { + transform: scale(0.95); + } + } + + @media (max-width: 850px) { .hero :global(img) { position: absolute !important; bottom: var(--mobile-hero-img-pos, 0px) !important; @@ -82,7 +83,6 @@ width: 100% !important; height: auto !important; object-fit: initial !important; - transform: none !important; } .content { @@ -114,12 +114,6 @@ } } - @media (min-width: 851px) and (orientation: landscape) { - .hero :global(img) { - transform: scale(0.95); - } - } - .hero { display: block; height: 100vh;