Commit Graph

24 Commits

Author SHA1 Message Date
3f30621630 feat(assets): probe-first resolver + SPOT for IMAGE_NAME/PORT + README screenshot
Probe-first asset resolution (regression fix)
---------------------------------------------

cache_manager.cache_file() returned either a relative cache path
(success) or None (failure). The previous app.py fallback
asset['cache'] = cached or asset['source'] mixed both types into
one field, which the template wrapped in url_for('static', ...)
regardless — producing broken
/static/https://file.infinito.nexus/.../logo.png URLs whenever the
source couldn't be downloaded.

- New app/utils/asset_resolver.py: HEAD-probes the URL (3 s
  timeout, image/* content type). On hit, embed directly via a
  new external_url field — no download required. On miss, fall
  back to cache_manager.cache_file. If that also fails, expose
  the source URL via external_url so the browser shows the alt
  text instead of an empty src.
- app.py exposes an asset_src(asset) context processor that
  picks external_url first, then url_for('static', cache),
  so the template never wraps an absolute URL in a static prefix.
- Templates (base, navigation, card) switch to asset_src(...) and
  gate the card image branch on cache or external_url.
- 16 unit tests cover every probe/cache/fallback branch; one live
  integration test exercises the canonical
  https://file.infinito.nexus/assets/img/logo.png to prove the
  probe-first path works end-to-end (cache dir stays empty).
- config.sample.yaml: new Infinito.Nexus card driven by the same
  canonical asset URL.

Single source of truth for IMAGE_NAME and PORT
----------------------------------------------

- env.example is now the only place the literal values live.
- Makefile and docker-compose.yml reference \$(IMAGE_NAME) /
  \${IMAGE_NAME:?…} (same for PORT); no defaults, no silent
  fallbacks.
- New make env / make config bootstrap .env / app/config.yaml
  from their checked-in templates. Idempotent.
- All container-using targets depend on the two bootstrap targets
  so a fresh checkout runs in a single invocation.
- Recipes source .env at recipe-execution time so they pick up a
  freshly bootstrapped .env in the same make invocation.

README
------

- Screenshot added under the title.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 12:19:15 +02:00
a29a0b1862 feat(vendor): replace CDN dependencies with local npm packages
Introduces a vendor build pipeline so all third-party browser assets
(Bootstrap, Bootstrap Icons, Font Awesome, marked, jQuery) are served
from local static files instead of external CDNs.

- Add app/package.json with vendor deps and postinstall/build scripts
- Add app/scripts/copy-vendor.js to copy assets to static/vendor/
- Update base.html.j2 to use url_for('static', ...) for all vendor assets
- Update Dockerfile to install Node.js/npm and run npm install
- Update .gitignore to exclude app/node_modules/ and app/static/vendor/

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 09:29:28 +02:00
55d309b2d7 Changed fade between html iframe animation 2025-07-07 15:37:24 +02:00
d99a8c8452 Added restore functionality to small logo 2025-07-07 15:06:36 +02:00
430ea4a120 Solved loading bug 2025-07-07 13:19:49 +02:00
64db9a4e6a Implemented Nasa Picture of the day 2025-07-05 20:08:00 +02:00
2f63009c31 Implemented full width function 2025-07-05 18:00:23 +02:00
d6389157ec Added fullscreen mode 2025-07-05 13:30:25 +02:00
242d1b9948 Implemented iframes for menu items and imprint 2025-03-19 15:54:19 +01:00
3529749df5 Added iframe draft 2025-03-18 14:59:54 +01:00
ae775916b0 Replaced German by English comments 2025-03-18 14:27:07 +01:00
3284684282 Solved main size bug 2025-03-18 13:30:38 +01:00
20c4a4809b Refactored css 2025-03-18 13:10:35 +01:00
898f7479c9 Added scrollbar draft 2025-03-18 12:50:14 +01:00
ef7059e748 Solved title bug 2025-03-12 11:14:40 +01:00
6597fb2862 Implemented better differenciation between platform and company 2025-02-19 23:47:34 +01:00
7c51ac6bbc Refactored navigation code 2025-01-14 17:19:09 +01:00
2a3491b98b Added warnings 2025-01-09 16:30:38 +01:00
9455f40079 Optimized modals 2025-01-09 14:59:30 +01:00
d59cc73470 Implemented hover submenüs 2025-01-09 14:42:38 +01:00
7a66184a46 Added dynamic submenus 2025-01-09 14:36:44 +01:00
e45bd16631 Optimized caching and changed from json to yaml 2025-01-09 11:59:23 +01:00
861fd29d45 Added tooltip js 2025-01-08 20:32:00 +01:00
4b2c251e79 Optimized menus 2025-01-08 19:37:24 +01:00