From 3eb530de26ffeef6bbcbad845d0ded9b810e1f3b Mon Sep 17 00:00:00 2001 From: Darren Griffin Date: Wed, 17 Sep 2025 23:24:32 +0200 Subject: [PATCH] Fix countup on community page (#40904) Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../homeassistant/pages/community/_stats.scss | 34 ------------------ source/community/components/_global.html | 35 ++++++++++++++++--- source/community/index.html | 1 + 3 files changed, 32 insertions(+), 38 deletions(-) diff --git a/sass/homeassistant/pages/community/_stats.scss b/sass/homeassistant/pages/community/_stats.scss index 6b6c510cbf5..dc6ab93cd34 100644 --- a/sass/homeassistant/pages/community/_stats.scss +++ b/sass/homeassistant/pages/community/_stats.scss @@ -1,53 +1,19 @@ -@property --num { - syntax: ''; - initial-value: 0; - inherits: false; -} - .stats { - display: flex; flex-wrap: wrap; gap: 24px 40px; - &[data-dsap-seen] { - .stat { - .stat-value span { - --num: attr(data-value type(#{''})); - } - } - } - .stat { display: flex; flex-direction: column; min-width: 100px; - @for $i from 0 through 10 { - &:nth-child(#{$i + 1}) { - .stat-value span { - transition-delay: #{$i * 0.15}s; - } - } - } - .stat-value { @include h3; color: var(--color-secondary); display: flex; gap: 4px; - - span { - --num: 0; - - transition: --num 1.5s ease-out; - counter-reset: num var(--num); - - &::after { - content: counter(num); - } - } } .stat-label { diff --git a/source/community/components/_global.html b/source/community/components/_global.html index 4d6a392f614..7ba01460134 100644 --- a/source/community/components/_global.html +++ b/source/community/components/_global.html @@ -35,18 +35,45 @@
- A crowd of people gathering in a bar - Utrecht, Netherlands + A crowd of people gathering in a bar - Utrecht, Netherlands
Community Day 2025 - Utrecht
- A group of 6 people standing in front of a bar - Berlin, Germany + A group of 6 people standing in front of a bar - Berlin, Germany
Community Meetup - IFA Berlin 2025
- A few people gathering around a table demonstrating ESP32 hardware - Columbus, Ohio + A few people gathering around a table demonstrating ESP32 hardware - Columbus, Ohio
Community Day 2025 - Columbus
- \ No newline at end of file + + \ No newline at end of file diff --git a/source/community/index.html b/source/community/index.html index 7f462471cdd..6dfb1f7edaa 100644 --- a/source/community/index.html +++ b/source/community/index.html @@ -5,6 +5,7 @@ description: "Connect and share ideas with makers, tinkerers, and smart home ent og_image: /images/community/og.jpeg frontpage: false --- +