Skip to content

Commit 424d2bc

Browse files
Merge pull request #10 from pip-install-python/home-video
Add the introduction video to the home page and the README
2 parents 849cfb3 + 9e6af20 commit 424d2bc

4 files changed

Lines changed: 110 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ analytics and its CI.
7878
markdown's H1 and the README. This matters because the home page is
7979
registered as `"Home"`, which `resolve_site_title` skips as generic; without
8080
the explicit registration the site published a framework fallback.
81+
- **An introduction video** on the home page and in the README —
82+
[*Dash Leaflet 2.0: Drone Tracking, Image Overlays & Map Packages in
83+
Python*](https://youtu.be/Wlmw98JrJZI). Embedded from
84+
`youtube-nocookie.com`, so the player sets no visitor-tracking cookies on a
85+
site that otherwise counts nothing beyond an anonymised page view, and
86+
accompanied by a plain link — an agent reading `/llms.txt` never sees an
87+
iframe, and neither does anyone whose browser blocks the embed.
8188
- **`scripts/network_smoke.py`** — the network's named-check battery, run
8289
against the CI container and against production with identical check names.
8390
Proves identity, the agent-facing document surfaces, the robots fingerprint,

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,20 @@ all live inside `dash_leaflet2.js`. A normal `pip install` needs no Node and no
7373
> alpha and APIs will move until v2 leaves alpha upstream. See
7474
> [CHANGELOG.md](./CHANGELOG.md) for what's shipped, fixed and known-broken.
7575
76+
## Watch the introduction
77+
78+
<div align="center">
79+
80+
<a href="https://youtu.be/Wlmw98JrJZI">
81+
<img src="https://img.youtube.com/vi/Wlmw98JrJZI/maxresdefault.jpg" alt="Dash Leaflet 2.0: Drone Tracking, Image Overlays &amp; Map Packages in Python" width="720">
82+
</a>
83+
84+
**[Dash Leaflet 2.0: Drone Tracking, Image Overlays &amp; Map Packages in Python](https://youtu.be/Wlmw98JrJZI)**
85+
86+
</div>
87+
88+
Drone tracking, image overlays and map packages, built with this library.
89+
7690
## Installation
7791

7892
```bash

docs/home/home.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ reach of a Python callback:
3434
The demo below is the whole claim in one page: Leaflet `2.0.0-alpha.1`,
3535
rendering inside Dash 4, with no JavaScript build step.
3636

37+
### Watch the introduction
38+
39+
[Dash Leaflet 2.0: Drone Tracking, Image Overlays & Map Packages in
40+
Python](https://youtu.be/Wlmw98JrJZI) — drone tracking, image overlays and map
41+
packages, built with this library.
42+
43+
.. exec::docs.home.video
44+
:code: false
45+
:border: false
46+
3747
### Live demo
3848

3949
.. exec::docs.home.example

docs/home/video.py

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
"""Home — the introduction video.
2+
3+
Its own module rather than part of `example.py` because the two are different
4+
things: `example.py` is the live Leaflet 2 demo that proves the library
5+
renders, and this is a recording that explains it. `.. exec::` imports each by
6+
module path, so keeping them separate lets the markdown place them
7+
independently.
8+
9+
Embedded from `youtube-nocookie.com`, which is YouTube's no-tracking-cookie
10+
origin. It plays identically and does not set the visitor-tracking cookies the
11+
standard embed does — worth having on a documentation site that otherwise
12+
counts nothing about its readers beyond an anonymised page view.
13+
"""
14+
15+
import dash_mantine_components as dmc
16+
from dash import html
17+
18+
VIDEO_ID = "Wlmw98JrJZI"
19+
VIDEO_URL = f"https://youtu.be/{VIDEO_ID}"
20+
VIDEO_TITLE = "Dash Leaflet 2.0: Drone Tracking, Image Overlays & Map Packages in Python"
21+
22+
component = dmc.Stack(
23+
[
24+
html.Div(
25+
html.Iframe(
26+
src=(
27+
f"https://www.youtube-nocookie.com/embed/{VIDEO_ID}"
28+
"?rel=0&modestbranding=1"
29+
),
30+
title=VIDEO_TITLE,
31+
# `fullscreen` belongs in `allow`, not in a separate
32+
# `allowFullScreen` prop: Dash 4.4.1's html.Iframe does not
33+
# expose the legacy attribute at all, and without the
34+
# permission the player still renders a fullscreen button that
35+
# silently does nothing — which reads as a broken embed rather
36+
# than a missing feature.
37+
allow=(
38+
"accelerometer; autoplay; clipboard-write; encrypted-media; "
39+
"fullscreen; gyroscope; picture-in-picture; web-share"
40+
),
41+
# Nothing here needs the container's origin, and the iframe is
42+
# third-party — so it gets only what a video player requires.
43+
referrerPolicy="strict-origin-when-cross-origin",
44+
style={
45+
"position": "absolute",
46+
"top": 0,
47+
"left": 0,
48+
"width": "100%",
49+
"height": "100%",
50+
"border": "0",
51+
"borderRadius": "8px",
52+
},
53+
),
54+
# The padding-bottom trick rather than `aspect-ratio`: it holds the
55+
# 16:9 box open from first paint in every engine, so the page does
56+
# not reflow when the iframe finally loads. (Dash 4.4.1's
57+
# html.Iframe exposes no `loading` prop, so the embed is eager and
58+
# the reserved box is what keeps the layout stable regardless.)
59+
style={
60+
"position": "relative",
61+
"paddingBottom": "56.25%",
62+
"height": 0,
63+
"overflow": "hidden",
64+
"borderRadius": "8px",
65+
},
66+
),
67+
# A real link as well as the player. An agent reading /llms.txt never
68+
# sees the iframe, and neither does anyone whose browser blocks the
69+
# embed — both should still be able to reach the video.
70+
dmc.Anchor(
71+
f"Watch on YouTube: {VIDEO_TITLE}",
72+
href=VIDEO_URL,
73+
target="_blank",
74+
size="sm",
75+
c="dimmed",
76+
),
77+
],
78+
gap="xs",
79+
)

0 commit comments

Comments
 (0)