Badges: fix print page svelte-check error — extract print CSS to static file
Svelte 5 does not support <style> or conditional {#if} blocks wrapping
<style> tags inside <svelte:head>. The parser treats them as raw-text
elements and reports '<script> was left open' at EOF.
Fix:
- Print media CSS moved to static/ae-print-badge.css (plain static file,
no framework magic needed — all selectors target global elements).
- svelte:head now uses a simple <link> to that file.
- $effect injects the @page size dynamically per template layout field,
avoiding the Svelte 5 parser limitation for conditional style injection.
- Badge_template interface in db_events.ts: added cfg_json / data_json
(standard Aether object fields that were missing from the type).
This commit is contained in:
@@ -254,6 +254,9 @@ export interface Badge_template {
|
||||
style_href?: null | string;
|
||||
duplex?: null | number | boolean;
|
||||
|
||||
cfg_json?: null | string;
|
||||
data_json?: null | string;
|
||||
|
||||
enable?: null | boolean;
|
||||
hide?: null | boolean;
|
||||
priority?: null | boolean;
|
||||
|
||||
Reference in New Issue
Block a user