Credit and link the district unit list, and say to contact the unit first
This commit is contained in:
@@ -330,6 +330,7 @@ footer a.fb{display:inline-flex;align-items:center;gap:8px}
|
||||
.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}
|
||||
.nu-src{color:#6B5510;font-weight:700;text-decoration:underline}
|
||||
"""
|
||||
|
||||
ICO_INFO = ('<svg viewBox="0 0 24 24" width="17" height="17" fill="none" stroke="currentColor"'
|
||||
|
||||
+26
-5
@@ -39,6 +39,25 @@ SERVES_LABEL = {
|
||||
|
||||
BEASCOUT = "https://beascout.scouting.org"
|
||||
|
||||
# The district's own short link to its unit list. This is the page the district
|
||||
# hands out, so it is the right thing to credit and the right thing to link.
|
||||
# One URL for the whole page rather than a per-row column: when the admin panel
|
||||
# exists this belongs in a settings row, not in seventeen copies.
|
||||
SOURCE_NAME = "Continental District unit list"
|
||||
SOURCE_URL = "https://tinyurl.com/ContinentalScouts"
|
||||
|
||||
MONTHS = ["January", "February", "March", "April", "May", "June", "July",
|
||||
"August", "September", "October", "November", "December"]
|
||||
|
||||
|
||||
def pretty_date(iso):
|
||||
"""2026-09-04 -> September 4, 2026. A log line is not a sentence."""
|
||||
try:
|
||||
y, m, d = (int(x) for x in str(iso).split("-"))
|
||||
return f"{MONTHS[m - 1]} {d}, {y}"
|
||||
except Exception:
|
||||
return str(iso)
|
||||
|
||||
|
||||
def listing():
|
||||
"""Rows grouped by area, in sort_order. Empty list if the table is unusable."""
|
||||
@@ -157,8 +176,10 @@ def body_html(hero_html):
|
||||
'has every unit in the area.</div>')
|
||||
|
||||
checked = checked_on()
|
||||
stamp = (f'We checked these details on {_esc(checked)}.' if checked
|
||||
else 'These details come from the district unit list.')
|
||||
src = (f'<a class="nu-src" href="{SOURCE_URL}" target="_blank" '
|
||||
f'rel="noopener">{SOURCE_NAME}</a>')
|
||||
stamp = (f'Pulled from the {src} on {pretty_date(checked)}.' if checked
|
||||
else f'Pulled from the {src}.')
|
||||
|
||||
return f"""{hero_html}
|
||||
<section style="padding:56px 0 20px"><div class="wrap">
|
||||
@@ -168,9 +189,9 @@ of them welcomes visitors, and none of them mind being asked.</p>
|
||||
</div></section>
|
||||
<section style="padding:0 0 24px"><div class="wrap">{inner}</div></section>
|
||||
<section style="padding:0 0 40px"><div class="wrap"><div class="note">
|
||||
<strong>Before you drive out, call ahead.</strong> {stamp} Meeting nights and locations change,
|
||||
and this list is a courtesy rather than an official record. The unit's own page, linked from its
|
||||
name above, is always more current than we are.
|
||||
<strong>Reach out before you go.</strong> {stamp} Meeting nights and locations change through
|
||||
the year, so contact the unit first and make sure the details still match their program. Each
|
||||
unit's own page, linked from its name above, is more current than we are.
|
||||
</div></div></section>
|
||||
<div class="band" style="background:linear-gradient(180deg,rgba(13,22,40,.55),rgba(13,22,40,.78)),url('/static/img/campfire-dusk.jpg') center/cover no-repeat">
|
||||
<h2>Looking somewhere we haven't listed?</h2>
|
||||
|
||||
Reference in New Issue
Block a user