feat(editor): add Jinja partial for editor asset includes
Five script/link tags consolidated so call-site templates only need a
single {% include '_editor_assets.html' %} to enable the widget.
This commit is contained in:
parent
04f9a4d6a2
commit
b203a83f58
1 changed files with 10 additions and 0 deletions
10
l4d2web/l4d2web/templates/_editor_assets.html
Normal file
10
l4d2web/l4d2web/templates/_editor_assets.html
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{# Editor asset bundle — include on any page that mounts a
|
||||
<textarea data-editor-language>. Order matters: prism + codejar load
|
||||
first, then the srccfg grammar registers itself on window.Prism, then
|
||||
editor.js scans the DOM and mounts. #}
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='vendor/prism.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/editor.css') }}">
|
||||
<script src="{{ url_for('static', filename='vendor/prism.js') }}" defer nonce="{{ g.csp_nonce }}"></script>
|
||||
<script src="{{ url_for('static', filename='vendor/codejar.js') }}" defer nonce="{{ g.csp_nonce }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/srccfg-grammar.js') }}" defer nonce="{{ g.csp_nonce }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/editor.js') }}" defer nonce="{{ g.csp_nonce }}"></script>
|
||||
Loading…
Reference in a new issue