diff --git a/public/images/php8/hero-bg-dark.webm b/public/images/php8/hero-bg-dark.webm deleted file mode 100644 index fcff1665a9..0000000000 Binary files a/public/images/php8/hero-bg-dark.webm and /dev/null differ diff --git a/public/images/php8/hero-bg-light.webm b/public/images/php8/hero-bg-light.webm deleted file mode 100644 index 70d4b16015..0000000000 Binary files a/public/images/php8/hero-bg-light.webm and /dev/null differ diff --git a/public/styles/php85.css b/public/styles/php85.css index 15f2aa0143..5d957f6239 100644 --- a/public/styles/php85.css +++ b/public/styles/php85.css @@ -463,28 +463,80 @@ a { .hero .hero-bg { pointer-events: none; - top: calc(var(--spacing) * 0); + inset: 0; z-index: calc(10 * -1); - object-fit: cover; - width: 100%; - height: 100%; + overflow: hidden; + opacity: .35; + container-type: size; -webkit-user-select: none; user-select: none; position: absolute } -.hero .hero-bg-dark, -.hero .hero-bg-light:where(.dark,.dark *) { - display: none +/* + * Each orb is a square the size of the larger hero dimension, centered in the hero + * (equivalent to an SVG viewBox with preserveAspectRatio="xMidYMid slice"). + * The gradients are static images, so the browser only has to rasterize them once. + * The x/y/rotate animations are applied to nested HTML elements and only change + * transform, so they can run on the compositor instead of repainting every frame. + */ +.hero-orb { + position: absolute; + top: 50%; + left: 50%; + width: max(100cqw, 100cqh); + aspect-ratio: 1; + translate: -50% -50% +} + +.hero-orb div { + width: 100%; + height: 100%; + background-size: 100% 100% +} + +.hero-orb-1-r { + background-image: url("data:image/svg+xml,") +} + +.hero-orb-2-r { + background-image: url("data:image/svg+xml,") +} + +.hero-orb-3-r { + background-image: url("data:image/svg+xml,") } -.hero .hero-bg-dark:where(.dark,.dark *) { - display: block +.hero-orb-1-x { animation: hero-orb1-x 10s linear infinite alternate } +.hero-orb-1-y { animation: hero-orb1-y 10.5s linear infinite alternate } +.hero-orb-1-r { animation: hero-orb-rotate-fwd 7s linear infinite } + +.hero-orb-2-x { animation: hero-orb2-x 11.5s linear infinite alternate } +.hero-orb-2-y { animation: hero-orb2-y 12s linear infinite alternate } +.hero-orb-2-r { animation: hero-orb-rotate-fwd 12s linear infinite } + +.hero-orb-3-x { animation: hero-orb3-x 12.5s linear infinite alternate } +.hero-orb-3-y { animation: hero-orb3-y 6s linear infinite alternate } +.hero-orb-3-r { animation: hero-orb-rotate-rev 9s linear infinite } + +@keyframes hero-orb1-x { from { transform: translateX(25%) } to { transform: translateX(0%) } } +@keyframes hero-orb1-y { from { transform: translateY(0%) } to { transform: translateY(25%) } } +@keyframes hero-orb2-x { from { transform: translateX(-25%) } to { transform: translateX(0%) } } +@keyframes hero-orb2-y { from { transform: translateY(0%) } to { transform: translateY(50%) } } +@keyframes hero-orb3-x { from { transform: translateX(0%) } to { transform: translateX(25%) } } +@keyframes hero-orb3-y { from { transform: translateY(0%) } to { transform: translateY(25%) } } +@keyframes hero-orb-rotate-fwd { from { transform: rotate(0deg) } to { transform: rotate(360deg) } } +@keyframes hero-orb-rotate-rev { from { transform: rotate(360deg) } to { transform: rotate(0deg) } } + +.hero-bg.paused .hero-orb, +.hero-bg.paused .hero-orb div { + animation-play-state: paused } @media (prefers-reduced-motion: reduce) { - .hero .hero-bg { - display: none !important + .hero-orb, + .hero-orb div { + animation-play-state: paused } } diff --git a/src/Themes/ReleasePage.php b/src/Themes/ReleasePage.php index f63a4e9023..2737238a43 100644 --- a/src/Themes/ReleasePage.php +++ b/src/Themes/ReleasePage.php @@ -36,12 +36,11 @@ public static function getHeroSection( return << - - +