Skip to content

Commit af1fe88

Browse files
Add Luma embed for Community Day events & facade iframes (#38845)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
1 parent ebe3ece commit af1fe88

File tree

2 files changed

+64
-40
lines changed

2 files changed

+64
-40
lines changed

source/_includes/javascripts/scripts.html

+50-20
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,62 @@
55
<script src="{{ '/javascripts/prism.js' | cache_buster }}" type="text/javascript" defer></script>
66
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@docsearch/js@3/dist/umd/index.min.js"></script>
77
<script type="text/javascript">
8-
docsearch({
9-
container: '#docsearch',
10-
appId: 'FBHBYS3J0U',
11-
indexName: 'home-assistant',
12-
apiKey: "{{ site.algolia.api_key }}",
13-
});
14-
document.querySelector('.site-title').addEventListener('contextmenu', function(ev) {
15-
ev.preventDefault();
16-
document.location.assign("https://design.home-assistant.io/#brand/logo")
17-
});
8+
docsearch({
9+
container: '#docsearch',
10+
appId: 'FBHBYS3J0U',
11+
indexName: 'home-assistant',
12+
apiKey: "{{ site.algolia.api_key }}",
13+
});
14+
document.querySelector('.site-title').addEventListener('contextmenu', function (ev) {
15+
ev.preventDefault();
16+
document.location.assign("https://design.home-assistant.io/#brand/logo")
17+
});
1818
</script>
1919

2020

2121
{% if page.hero_unit %}
2222
<script type="text/javascript">
23-
const changeNavColor = () => {
24-
const scrollPosition = document.documentElement.scrollTop;
25-
const nav = document.querySelector("header");
26-
if (scrollPosition <= 1) {
27-
nav.classList.add("dark");
28-
} else {
29-
nav.classList.remove("dark");
23+
{
24+
const changeNavColor = () => {
25+
const scrollPosition = document.documentElement.scrollTop;
26+
const nav = document.querySelector("header");
27+
if (scrollPosition <= 1) {
28+
nav.classList.add("dark");
29+
} else {
30+
nav.classList.remove("dark");
31+
}
3032
}
31-
}
3233

33-
window.addEventListener("load", () => changeNavColor());
34-
window.addEventListener("scroll", () => changeNavColor());
34+
window.addEventListener("load", () => changeNavColor());
35+
window.addEventListener("scroll", () => changeNavColor(), { passive: true });
36+
}
3537
</script>
3638
{% endif %}
39+
40+
<script type="text/javascript">
41+
{
42+
const article = document.querySelector("article.post");
43+
if (article) {
44+
const iframes = article.querySelectorAll("iframe[data-src]");
45+
let loaded = false;
46+
if (iframes) {
47+
document.addEventListener('mousemove', loadLazyFrames, { passive: true, once: true });
48+
document.addEventListener('touchmove', loadLazyFrames, { passive: true, once: true });
49+
document.addEventListener('scroll', loadLazyFrames, { passive: true, once: true });
50+
51+
function loadLazyFrames() {
52+
if (loaded) return;
53+
loaded = true;
54+
55+
iframes.forEach((iframe) => {
56+
const src = iframe.getAttribute("data-src");
57+
if (src) {
58+
iframe.setAttribute("src", src);
59+
iframe.removeAttribute("data-src");
60+
}
61+
});
62+
}
63+
}
64+
}
65+
}
66+
</script>

source/_posts/2025-04-24-community-day.markdown

+14-20
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,20 @@ I'm sure you're all wondering, "*Missy, what is a Community Day?*". In its simpl
2323

2424
### Locations and registering to attend
2525

26-
We already have **13 events** hosted by several of us who work on Home Assistant 😎! To coordinate these, we are using Luma, a site focused on tech meetups. All the current events can be found on our [Home Assistant Community Day](https://lu.ma/haday2025) calendar, including:
27-
28-
**Europe**
29-
- [Aveiro, Portugal](https://lu.ma/p9eo4v3t)
30-
- [Bordeaux, France](https://lu.ma/shxhyi6u)
31-
- [London, United Kingdom](https://lu.ma/fa5ez3t7)
32-
- [Madrid, Spain](https://lu.ma/o6pqbjv8)
33-
- [Porto, Portugal](https://lu.ma/uozbfr6n)
34-
- [Prague, Czech Republic](https://lu.ma/dhudha0z)
35-
- [Utrecht, Netherlands](https://lu.ma/e2wyv8k0)
36-
- [Vienna, Austria](https://lu.ma/2vjs7dab)
37-
38-
**North America**
39-
- [Brooklyn, New York](https://lu.ma/efkt35on)
40-
- [Charlotte, North Carolina](https://lu.ma/3kbb2dte)
41-
- [Houston, Texas](https://lu.ma/g5o66to2)
42-
- [Redmond, Washington](https://lu.ma/qb0hhhkm)
43-
- [Twin Cities, Minnesota](https://lu.ma/ljwdnjmc)
44-
45-
All Community Day events are free, so **[register before spaces run out!](https://lu.ma/haday2025)** (No worries, there are waitlists!)
26+
To coordinate all these meetups, we are using Luma, a site focused on tech meetups. All the current events can be found below or on our [Home Assistant Community Day](https://lu.ma/haday2025) calendar.
27+
28+
<iframe
29+
data-src="https://lu.ma/embed/calendar/cal-QXZXEJrvB3UaI63/events?lt=light"
30+
width="100%"
31+
height="600"
32+
frameborder="0"
33+
style="border: 1px solid #bfcbda88; border-radius: 4px;"
34+
allowfullscreen=""
35+
aria-hidden="false"
36+
tabindex="0"
37+
></iframe>
38+
39+
All Community Day events are free, so **[register before spaces run out!](https://lu.ma/haday2025)** (No worries, there are waitlists!). We also have people who work full-time on Home Assistant attending these events. To find out who you can meet, head over to Luma 😎!
4640

4741
### Host your own
4842

0 commit comments

Comments
 (0)