mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
Add lookup('asset', app, pkg, path) and lookup('asset_host'): both resolve
the asset origin through one shared resolve_host, returning the internal
CDN domain when web-svc-cdn is deployed with flavor internal and
cdn.jsdelivr.net otherwise, so template URLs and CSP origins can never
diverge. Versions come from the role's committed files/package-lock.json.
Roles declare frontend dependencies in files/package.json; web-svc-cdn
aggregates every role lockfile, runs one npm ci per role in a node
container and mirrors the packages under /npm/<pkg>@<version>/ following
jsdelivr's path scheme, so internal and external URLs differ only by host.
Convert web-app-dashboard (keycloak-js 24.0.5 UMD) and web-app-littlejs
(bootstrap, fontawesome) to the asset lookup, drop the vendored keycloak
blob, and add a repository lint forbidding hardcoded external CDN hosts
in templates and CSP metas; pre-existing external CDN entries are checked
out with nocheck markers and a migration TODO.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
29 lines
878 B
Django/Jinja
29 lines
878 B
Django/Jinja
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>{{ LITTLEJS_TITLE }}</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<link
|
|
href="{{ lookup('asset', application_id, 'bootstrap', 'dist/css/bootstrap.min.css') }}"
|
|
rel="stylesheet"
|
|
crossorigin="anonymous"
|
|
/>
|
|
|
|
<link
|
|
rel="stylesheet"
|
|
href="{{ lookup('asset', application_id, '@fortawesome/fontawesome-free', 'css/all.min.css') }}"
|
|
crossorigin="anonymous"
|
|
/>
|
|
</head>
|
|
|
|
<body>
|
|
{% include "nav/top.html.j2" %}
|
|
|
|
{% include "main.html.j2" %}
|
|
|
|
{% include "nav/bottom.html.j2" %}
|
|
</body>
|
|
<script src="{{ lookup('asset', application_id, 'bootstrap', 'dist/js/bootstrap.bundle.min.js') }}" crossorigin="anonymous"></script>
|
|
</html> |