Conversation
Resolve ESPN league/team <img> URLs against the on-disk static tree. College sports alias to the shipped nba/nfl icons; remaining missing slots (soccer, tennis, golf, fantasy, soccer clubs) use a committed SVG placeholder. Real HF files are used when present, so a later espn.tar.gz update needs no further template change. Fixes #3 Generated-by: Cursor Cloud Agent (Grok 4.6)
League nav still aliases ncaaf/ncaam/ncaaw to shipped nfl/nba icons. Missing club marks fall back to the shared placeholder so college and soccer score rows are not all stamped with the same pro-league shield. Generated-by: Cursor Cloud Agent (Grok 4.6)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes the remaining ESPN half of aiming-lab#3. Booking homepage gallery 404s are already fixed on
main(sites/booking/templates/index.htmluses/static/images/screenshots/{paris,bali,rome}.png); this PR does not touch Booking.The ESPN homepage (and other templates that reused the same paths) requested league/team PNGs that are not in the published asset bundle:
soccer,ncaaf,ncaam,ncaaw,tennis,golf,fantasypsg,mia,rmaExisting
nba/nfl/mlb/nhl(andmma) league icons are present. Hugging Face discussion https://huggingface.co/datasets/ChilleD/WebHarbor/discussions/9 has been open since May and is not merged, so this is a code-side fallback.Change
<img>URLs against the on-diskstatic/tree at render time so missing files are never requested (onerrorstill 404s).ncaaf→nfl,ncaam/ncaaw→nba).sites/espn/static/icons/sport-placeholder.svg./teamscards use the existing color swatch when no club PNG ships.espn.tar.gzactually ships the named PNGs, those files are used automatically.Verification
Against the current pinned ESPN HF assets (nba/nfl/mlb/nhl/mma league PNGs present; soccer/ncaaf/ncaam/ncaaw/tennis/golf/fantasy and soccer club PNGs absent):
python3 -m py_compile sites/espn/app.py/,/soccer/,/soccer/teams,/soccer/scoreboard,/nba/,/nba/teams,/college-football/,/scoresall 200/static/images/espn/leagues/soccer.png,ncaaf.png,/static/images/espn/teams/soccer/psg.png); templates no longer request themhttp://127.0.0.1:45014/: homepage nav/rail icons render; soccer/tennis/golf/fantasy use the red placeholder; NBA/NFL/MLB/NHL use real marks; soccer team cards use color swatches for Inter Miami / PSG / Real Madrid; NBA team logos remain realDocker image rebuild /
/resetbyte-identity was not re-run here (no Docker daemon; seed DB untouched).Fixes #3