[web-php] master: Fix GH-2032: Replace hero background with a video (#2061)
| From: | Jordi Kroon via GitHub | Date: | Mon, 16 Nov 2026 16:30:36 +0000 |
| Subject: | [web-php] master: Fix GH-2032: Replace hero background with a video (#2061) | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-34186@lists.php.net to get a copy of this message | ||
Author: Jordi Kroon (jordikroon)
Committer: GitHub (web-flow)
Pusher: TimWolla
Date: 2026-11-16T17:30:33+01:00
Commit: https://github.com/php/web-php/commit/157116b0a932a2662e1f9bc640dee7284a1484cf
Raw diff: https://github.com/php/web-php/commit/157116b0a932a2662e1f9bc640dee7284a1484cf.diff
Fix GH-2032: Replace hero background with a video (#2061)
Changed paths:
A public/images/php8/hero-bg-dark.webm
A public/images/php8/hero-bg-light.webm
M public/styles/php85.css
M src/Themes/ReleasePage.php
Diff:
diff --git a/public/images/php8/hero-bg-dark.webm b/public/images/php8/hero-bg-dark.webm
new file mode 100644
index 0000000000..fcff1665a9
Binary files /dev/null and b/public/images/php8/hero-bg-dark.webm differ
diff --git a/public/images/php8/hero-bg-light.webm b/public/images/php8/hero-bg-light.webm
new file mode 100644
index 0000000000..70d4b16015
Binary files /dev/null and b/public/images/php8/hero-bg-light.webm differ
diff --git a/public/styles/php85.css b/public/styles/php85.css
index c6cc01da9e..15f2aa0143 100644
--- a/public/styles/php85.css
+++ b/public/styles/php85.css
@@ -468,48 +468,25 @@ a {
object-fit: cover;
width: 100%;
height: 100%;
- transition-property: opacity;
- opacity: .35;
- transition-duration: .5s;
- transition-timing-function: cubic-bezier(.4, 0, .2, 1);
-webkit-user-select: none;
user-select: none;
position: absolute
}
-.hero-orb-1-x,
-.hero-orb-1-y,
-.hero-orb-1-r,
-.hero-orb-2-x,
-.hero-orb-2-y,
-.hero-orb-2-r,
-.hero-orb-3-x,
-.hero-orb-3-y,
-.hero-orb-3-r {
- transform-box: view-box;
- transform-origin: 50% 50%
-}
-
-.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 .hero-bg-dark,
+.hero .hero-bg-light:where(.dark,.dark *) {
+ display: none
+}
+
+.hero .hero-bg-dark:where(.dark,.dark *) {
+ display: block
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .hero .hero-bg {
+ display: none !important
+ }
+}
.hero-badge {
margin-bottom: calc(var(--spacing) * 6);
diff --git a/src/Themes/ReleasePage.php b/src/Themes/ReleasePage.php
index 29ba944b9b..f63a4e9023 100644
--- a/src/Themes/ReleasePage.php
+++ b/src/Themes/ReleasePage.php
@@ -36,16 +36,12 @@ public static function getHeroSection(
return <<<HTML
<section class="hero">
- <svg viewBox="0 0 100 100" preserveAspectRatio="xMidYMid slice"
class="hero-bg" aria-hidden="true">
- <defs>
- <radialGradient id="Gradient1" cx="50%"
cy="50%" fx="0.441602%" fy="50%" r=".5"><stop
offset="0%" stop-color="rgba(210, 203, 255, 1)"></stop><stop
offset="100%" stop-color="rgba(51, 63, 124,
0)"></stop></radialGradient>
- <radialGradient id="Gradient2" cx="50%"
cy="50%" fx="2.68147%" fy="50%" r=".5"><stop
offset="0%" stop-color="rgba(133, 109, 255, 1)"></stop><stop
offset="100%" stop-color="rgba(51, 63, 124,
0)"></stop></radialGradient>
- <radialGradient id="Gradient3" cx="50%"
cy="50%" fx="0.836536%" fy="50%" r=".5"><stop
offset="0%" stop-color="rgba(210, 203, 255, 1)"></stop><stop
offset="100%" stop-color="rgba(51, 63, 124,
0)"></stop></radialGradient>
- </defs>
- <g class="hero-orb-1-x"><g
class="hero-orb-1-y"><rect width="100%" height="100%"
fill="url(#Gradient1)" class="hero-orb-1-r"></rect></g></g>
- <g class="hero-orb-2-x"><g
class="hero-orb-2-y"><rect width="100%" height="100%"
fill="url(#Gradient2)" class="hero-orb-2-r"></rect></g></g>
- <g class="hero-orb-3-x"><g
class="hero-orb-3-y"><rect width="100%" height="100%"
fill="url(#Gradient3)" class="hero-orb-3-r"></rect></g></g>
- </svg>
+ <video class="hero-bg hero-bg-light" autoplay muted loop playsinline
disablepictureinpicture aria-hidden="true" tabindex="-1">
+ <source src="/images/php8/hero-bg-light.webm"
type="video/webm">
+ </video>
+ <video class="hero-bg hero-bg-dark" autoplay muted loop playsinline
disablepictureinpicture aria-hidden="true" tabindex="-1">
+ <source src="/images/php8/hero-bg-dark.webm"
type="video/webm">
+ </video>
<!-- hero background pattern -->
<svg aria-hidden="true" class="hero-pattern">