From 3ba0b6c1b2d5550060bfb7595bba356c43a04d9f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joakim=20S=C3=B8rensen?=
Date: Thu, 21 Sep 2023 17:05:11 +0200
Subject: [PATCH] Make number of integrations dynamic on welcome screen
(#28970)
---
source/_includes/custom/welcome.html | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/source/_includes/custom/welcome.html b/source/_includes/custom/welcome.html
index 5e5de0fa9b4..77d747068ab 100644
--- a/source/_includes/custom/welcome.html
+++ b/source/_includes/custom/welcome.html
@@ -3,8 +3,19 @@
{{ site.description }}
+{%- assign tot = 0 -%}
+{%- for comp in site.integrations -%}
+{%- if comp.ha_category -%}
+{%- if comp.ha_category.first -%}
+{%- assign tot = tot | plus: comp.ha_category.size -%}
+{%- else -%}
+{%- assign tot = tot | plus: 1 -%}
+{%- endif -%}
+{%- endif %}
+{%- endfor -%}
+
Get started
View demo
- Browse 1900+ integrations
-
+ Browse {{ tot | minus: 1 | divided_by: 100 | round | times: 100 }}+ integrations
+
\ No newline at end of file