Add shared card schemas layouts and renderer

This commit is contained in:
mpabi
2026-07-15 08:41:20 +02:00
commit 65299458ed
19 changed files with 7786 additions and 0 deletions
+184
View File
@@ -0,0 +1,184 @@
{
"$schema": "../schemas/card-template.schema.json",
"schema": "esc-card-template.v1",
"id": "karta-5a",
"name": "Karta 5a",
"version": "1.0",
"description": "Wielostronicowy layout A4 landscape wyekstrahowany z referencyjnego pliku series/esc/html/ESC-04 karta.html; pierwsze dwie strony zachowują konwencję wzorca, dalsze strony dokładają pełną treść karty.",
"tokens": {
"page": {
"format": "a4",
"orientation": "landscape",
"width_px": 1123,
"height_px": 794,
"padding_px": {
"top": 38,
"right": 38,
"bottom": 30,
"left": 38
},
"paper": "#fefefc",
"desk": "#eceae4",
"ink": "#1c1c1a"
},
"grid": {
"columns": [
"112px",
"1fr",
"112px"
],
"gap_px": 19,
"left_role": "TECH",
"right_role": "OG"
},
"typography": {
"text": "STIX Two Text",
"mono": "JetBrains Mono",
"body_px": 13,
"line_height": 1.55,
"margin_tree_px": 7.5,
"label_px": 8.5,
"footer_px": 9.5
},
"colors": {
"paper": "#fefefc",
"desk": "#eceae4",
"ink": "#1c1c1a",
"muted": "#8a887f",
"subtle": "#4a4944",
"header": "#f4f3ef",
"line": "#d8d6d0",
"line_soft": "#e4e2dc",
"tree_line": "#c9c7bf",
"hairline": "#f0efe9",
"accent": "#3b5a8f"
}
},
"components": {
"section_box": {
"border": "1px solid #1c1c1a",
"header": "§N + uppercase title, letter-spacing .12em, background #f4f3ef"
},
"metric_header": {
"border": "1.5px solid #1c1c1a",
"title_bar": true,
"grid": "2x2",
"fill_fields": [
"Uczeń",
"Klasa · data"
]
},
"margin_tree_panel": {
"left": "TECH — zawodowe; WE → EK → KW",
"right": "OG — ogólne; WE → EN → KW",
"footer": "KW wspólne + dominanta"
},
"checkbox_row": {
"size_px": 11,
"border": "1.2px solid #1c1c1a"
},
"agenda_grid": {
"columns": [
"56px",
"1fr"
],
"time_color": "#3b5a8f"
},
"theory_table": {
"border": "1px solid #d8d6d0",
"id_font": "JetBrains Mono"
},
"tech_stack_table": {
"columns": [
"88px",
"1fr"
],
"groups": [
"Software",
"Hardware"
]
},
"footer": {
"rule": "1.5px solid #1c1c1a",
"format": "commit · uuid · wersja · data | strona N / M | status"
},
"fill_in_line": {
"style": "1px dotted #9a988f"
}
},
"block_map": {
"page_1": [
"metric_header",
"mission",
"objectives",
"agenda",
"hw_gate"
],
"page_2": [
"running_card_header",
"theory_refs",
"tech_stack",
"math_block"
],
"page_3": [
"part_a_banner",
"model_block",
"code_block",
"container_test",
"bom"
],
"page_4": [
"part_b_banner",
"safety_rules",
"reference_settings",
"figures",
"hardware_procedure"
],
"page_5": [
"observation_table"
],
"page_6": [
"troubleshooting",
"analysis_tasks"
],
"page_7": [
"team_decision",
"git_gate",
"session_record",
"ai_rules",
"references"
],
"objectives": "checkbox_row + objective_refs",
"agenda": "agenda_grid",
"hw_gate": "checkbox_row + teacher_signature",
"theory_refs": "theory_table",
"tech_stack": "tech_stack_table",
"math_block": "equations + answer_lines",
"model_block": "notebook + constants_table + manual_inputs",
"code_block": "skeleton_files + interfaces + responsibilities + pass_condition",
"container_test": "command_list + evidence_line",
"bom": "checkbox_table",
"safety_rules": "golden_rules_grid",
"reference_settings": "compact_reference_table",
"figures": "kicad_includegraphics",
"hardware_procedure": "checkbox_steps",
"observation_table": "spacious_grid",
"troubleshooting": "symptom_hypothesis_action_result_log",
"analysis_tasks": "answer_lines",
"team_decision": "mini_adr",
"git_gate": "checkbox_criterion_evidence_signature",
"ai_rules": "compact_policy_box",
"references": "compact_mono_list"
},
"emitters": {
"html": "5a",
"latex": "5a"
},
"limitations": {
"latex": [
"pdfLaTeX nie używa fontów Google Fonts; renderer wybiera stix2, jeśli jest dostępny, oraz mono z pakietu inconsolata/beramono/lmodern jako fallback.",
"HTML odwzorowuje pikselowe rozmiary 1123x794; LaTeX mapuje je na A4 landscape w centymetrach.",
"Panele drzewek w LaTeX są statycznymi minipage, bez interaktywnych tooltipów HTML."
]
}
}
+215
View File
@@ -0,0 +1,215 @@
{
"$schema": "../schemas/card-template.schema.json",
"schema": "esc-card-template.v1",
"id": "karta-5b",
"name": "Karta 5b",
"version": "1.3",
"approved": "04.07.2026 — layout referencyjny zatwierdzony przez prowadzącego (symetria 0,55/2,05/0,55/14,70; gołe drzewka); v1.1 — nagłówki punktowe zamiast §, 05.07.2026; v1.2 — linie nagłówka/stopki jako warstwa strony ograniczona do bloku treści, 06.07.2026; v1.3 — margines gorny/dolny 2,5 cm, 06.07.2026",
"description": "Wielostronicowy layout A4 portrait: charakter 5a z ramkami sekcji, ale z golymi drzewkami WE->EN/EK jako marginalia bez paneli i bez luznych KW. Linie strony sa warstwa overlay i nie wychodza pod drzewka. Blok tresci zaczyna sie 2,5 cm od gornej krawedzi i konczy 2,5 cm od dolnej.",
"tokens": {
"page": {
"format": "a4",
"orientation": "portrait",
"width_px": 794,
"height_px": 1123,
"padding_px": {
"top": 95,
"right": 21,
"bottom": 95,
"left": 21
},
"paper": "#fefefc",
"desk": "#eceae4",
"ink": "#1c1c1a"
},
"grid": {
"columns": [
"77px",
"21px",
"1fr",
"21px",
"77px"
],
"gap_px": 0,
"left_gap_px": 21,
"right_gap_px": 21,
"geometry_cm": {
"top": 2.5,
"bottom": 2.5,
"outer_margin_left": 0.55,
"left_tree": 2.05,
"left_gap": 0.55,
"content": 14.7,
"content_height": 24.7,
"right_gap": 0.55,
"right_tree": 2.05,
"outer_margin_right": 0.55
},
"left_role": "TECH",
"right_role": "OG"
},
"page_rules": {
"layer": "overlay",
"portrait_content_width_cm": 14.7,
"portrait_content_height_cm": 24.7,
"portrait_rule_scope": "kolumna tresci; linia nie wchodzi pod drzewka ani w przerwy marginesowe",
"landscape_schematic_slot_mm": 242,
"landscape_schematic_slot_height_mm": 160,
"landscape_schematic_figure_height_mm": 135,
"landscape_rule_scope": "slot schematu technicznego; pasek sekcji i stopka maja ta sama szerokosc co arkusz",
"line_weight_pt": 0.5
},
"typography": {
"text": "STIX Two Text",
"mono": "JetBrains Mono",
"body_px": 11,
"line_height": 1.42,
"margin_tree_px": 7.2,
"label_px": 7.8,
"footer_px": 8.2
},
"colors": {
"paper": "#fefefc",
"desk": "#eceae4",
"ink": "#1c1c1a",
"muted": "#8a887f",
"subtle": "#4a4944",
"header": "#f4f3ef",
"line": "#d8d6d0",
"line_soft": "#e4e2dc",
"tree_line": "#c9c7bf",
"hairline": "#f0efe9",
"accent": "#3b5a8f"
}
},
"components": {
"section_box": {
"border": "1px solid #1c1c1a",
"header": "N. + uppercase title, letter-spacing .12em, background #f4f3ef"
},
"metric_header": {
"border": "1.5px solid #1c1c1a",
"title_bar": true,
"grid": "2x2",
"fill_fields": [
"Uczen",
"Klasa · data"
]
},
"margin_tree_panel": {
"left": "TECH jako gole drzewko tekstowe WE->EK/EN bez KW, bez ramki, tla, naglowka i stopki",
"right": "OG jako gole drzewko tekstowe WE->EK/EN bez KW, bez ramki, tla, naglowka i stopki",
"footer": false
},
"checkbox_row": {
"size_px": 10,
"border": "1.1px solid #1c1c1a"
},
"agenda_grid": {
"columns": [
"46px",
"1fr"
],
"time_color": "#3b5a8f"
},
"theory_table": {
"border": "1px solid #d8d6d0",
"id_font": "JetBrains Mono"
},
"tech_stack_table": {
"columns": [
"72px",
"1fr"
],
"groups": [
"Software",
"Hardware"
]
},
"footer": {
"rule": "1.5px solid #1c1c1a",
"layer": "page overlay",
"width": "content block only: 14.7cm portrait, 242mm technical landscape",
"format": "commit · uuid · wersja · data | strona N / M | status"
},
"running_card_header": {
"rule": "1.4px solid #1c1c1a",
"layer": "page overlay",
"width": "content block only: 14.7cm portrait, 242mm technical landscape"
},
"fill_in_line": {
"style": "1px dotted #9a988f"
}
},
"block_map": {
"page_1": [
"metric_header",
"mission",
"objectives",
"agenda",
"hw_gate",
"theory_refs",
"tech_stack"
],
"page_2": [
"running_card_header",
"math_block",
"part_a_banner",
"model_block",
"code_block",
"container_test",
"bom"
],
"page_3": [
"part_b_banner",
"safety_rules",
"reference_settings",
"figures",
"hardware_procedure"
],
"page_4": [
"observation_table",
"troubleshooting"
],
"page_5": [
"analysis_tasks",
"team_decision",
"git_gate",
"session_record",
"ai_rules",
"references"
],
"objectives": "checkbox_row + objective_refs",
"agenda": "agenda_grid",
"hw_gate": "checkbox_row + teacher_signature",
"theory_refs": "theory_table",
"tech_stack": "tech_stack_table",
"math_block": "equations + answer_lines",
"model_block": "notebook + constants_table + manual_inputs",
"code_block": "skeleton_files + interfaces + responsibilities + pass_condition",
"container_test": "command_list + evidence_line",
"bom": "checkbox_table",
"safety_rules": "golden_rules_grid",
"reference_settings": "compact_reference_table",
"figures": "kicad_includegraphics",
"hardware_procedure": "checkbox_steps",
"observation_table": "spacious_grid",
"troubleshooting": "symptom_hypothesis_action_result_log",
"analysis_tasks": "answer_lines",
"team_decision": "mini_adr",
"git_gate": "checkbox_criterion_evidence_signature",
"ai_rules": "compact_policy_box",
"references": "compact_mono_list"
},
"emitters": {
"html": "5b",
"latex": "5b"
},
"limitations": {
"latex": [
"pdfLaTeX nie uzywa fontow Google Fonts; renderer wybiera stix2, jesli jest dostepny, oraz mono z pakietu inconsolata/beramono/lmodern jako fallback.",
"HTML odwzorowuje pikselowe rozmiary 794x1123; LaTeX mapuje je na A4 portrait z minipage dla marginesow.",
"Drzewka marginesowe sa statycznym tekstem mono: lewy margines TECH, prawy margines OG."
]
}
}
+74
View File
@@ -0,0 +1,74 @@
{
"$schema": "../schemas/card-template.schema.json",
"schema": "esc-card-template.v1",
"id": "karta-klasyczna",
"name": "Karta klasyczna",
"version": "1.0",
"description": "Dotychczasowy portretowy layout generatora: metryczka, marginesy z drzewkami po bokach, sekcje pełnej karty i słownik.",
"tokens": {
"page": {
"format": "a4",
"orientation": "portrait",
"paper": "#ffffff",
"margin_cm": {
"left": 2.15,
"right": 2.15,
"top": 2.2,
"bottom": 2.2
}
},
"grid": {
"columns": [
"116px",
"minmax(0, 1fr)",
"116px"
],
"gap_px": 18
},
"typography": {
"text": "Georgia, Times New Roman, serif",
"mono": "Latin Modern Mono, ui-monospace, SFMono-Regular, Consolas, monospace",
"body_px": 17,
"margin_px": 7
},
"colors": {
"paper": "#ffffff",
"desk": "#eeeeee",
"ink": "#111111",
"muted": "#666666",
"line": "#b9b9b9",
"line_soft": "#dddddd",
"we": "#e00000",
"og": "#008000",
"tech": "#d36b00",
"kw": "#0018c8"
}
},
"components": {
"section_box": "classic_section",
"metric_header": "classic_front_matter",
"margin_tree_panel": "classic_margin_notes",
"checkbox_row": "classic_empty_check",
"agenda_grid": "classic_compact_agenda",
"theory_table": "classic_tabularx",
"tech_stack_table": "classic_tabularx",
"footer": "classic_fancyhdr",
"fill_in_line": "classic_dotfill"
},
"block_map": {
"front_matter": "metric_header",
"front_page_scope": "classic_scope",
"objectives": "section_box",
"agenda": "section_box",
"hw_gate": "section_box",
"theory_refs": "section_box",
"tech_stack": "section_box",
"sections": "section_box",
"bibliography": "section_box",
"dictionary": "dictionary_page"
},
"emitters": {
"html": "classic",
"latex": "classic"
}
}