Add /find-a-unit: a courtesy directory of other Continental District units

This commit is contained in:
Mike Wichers
2026-09-04 09:27:31 -04:00
parent 706eaf7739
commit 9a98c17913
2 changed files with 209 additions and 0 deletions
+33
View File
@@ -8,6 +8,7 @@ from fastapi.staticfiles import StaticFiles
# anything a family submits; see store.py for why.
import store
import admin_api
import nearby
import documents
# ---------------------------------------------------------------------------
@@ -317,6 +318,18 @@ footer a.fb{display:inline-flex;align-items:center;gap:8px}
.anncitem+.anncitem{border-top:1px solid rgba(0,0,0,.09);padding-top:10px;margin-top:10px}
.anncitem a{color:inherit;text-decoration:underline;font-size:13px}
.ancclink{flex:none;color:inherit;text-decoration:underline;font-size:13px;white-space:nowrap}
.nu-group{margin-bottom:44px}
.nu-area{font-size:1.45rem;margin-bottom:14px}
.nu-card{padding:22px 24px;display:flex;flex-direction:column;gap:8px}
.nu-head{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.nu-name{font-family:'Archivo';font-weight:800;font-size:1.15rem;color:#1E2F52;text-decoration:none;border-bottom:2px solid #F0AD2D}
.nu-name:hover{color:#B07B12}
.nu-plain{border-bottom:none;color:#1E2F52}
.nu-chips{display:flex;flex-wrap:wrap;gap:6px}
.nu-where{color:#5A6272;font-size:14.5px;line-height:1.6}
.nu-meets{font-weight:700;color:#1E2F52;font-size:14.5px}
.nu-note{color:#6A7280;font-size:13.5px;line-height:1.6}
.nu-mail{color:#B07B12;font-weight:600;text-decoration:none}
"""
ICO_INFO = ('<svg viewBox="0 0 24 24" width="17" height="17" fill="none" stroke="currentColor"'
@@ -730,6 +743,26 @@ def document_file(slug: str):
headers=headers)
# ---------------------------------------------------------------------------
# Find a unit. Other people's units, from nearby_units (see nearby.py). There
# are deliberately NO entry points elsewhere on the site yet - reachable by
# direct link only until the placement is settled. noindex, so a courtesy
# directory never outranks another unit for its own name.
# ---------------------------------------------------------------------------
@app.get("/find-a-unit", response_class=HTMLResponse)
def find_a_unit():
h = hero("morning-trail.jpg", "center 62%",
"Continental District \u00b7 Scouting America",
"Find a unit near you.",
"Packs, troops, a ship and an Exploring club within a short drive of "
"Zieglerville, so you can pick the one that fits your family.",
minh=440)
return HTMLResponse(page("Find a Unit Near You \u00b7 Pack & Troop 73",
nearby.body_html(h), "nearby"),
headers={"X-Robots-Tag": "noindex, nofollow"})
FAQ = [
("What does it cost?", "Annual registration plus modest pack or troop dues. Fundraisers like our chocolate booth keep costs down, and quiet help is available. Cost never keeps a kid out of Pack 73; just talk to us."),
("Do parents stay at meetings?", "Yes: a parent or guardian stays at every Cub Scout meeting and event. Lions and Tigers pair up with their grown-up for the hands-on parts; for older dens, being in the room is enough. Troop scouts (11 to 17) can be dropped off."),