Synchronizes 72 lesson files across 5 languages (de, pl, es, ar, uk) to match the English source. This ensures code, solutions, and validations are identical while only title, description, task, and message fields are translated. Changes include: - Box model lessons (01-box-model.json) - Units and variables (05-units-variables.json) - Transitions and animations (06-transitions-animations.json) - Responsive design (08-responsive.json) - HTML elements (20-html-elements.json) - HTML forms basic and validation (21, 22) - HTML details/summary, progress/meter (23, 24) - HTML datalist, dialog, fieldset (25, 27, 28) - HTML tables and SVG (30, 32) - HTML marquee (31) - Welcome module (00-welcome.json) Fixes validation inconsistencies and removes extra content that exceeded English source. German translations were largely correct; Polish, Spanish, Arabic, and Ukrainian required full translations.
98 lines
5.9 KiB
JSON
98 lines
5.9 KiB
JSON
{
|
|
"$schema": "../../schemas/code-crispies-module-schema.json",
|
|
"id": "html-details-summary",
|
|
"title": "HTML Details & Summary",
|
|
"description": "Twórz rozwijane sekcje bez JavaScript",
|
|
"mode": "html",
|
|
"difficulty": "beginner",
|
|
"lessons": [
|
|
{
|
|
"id": "details-summary-basic",
|
|
"title": "Pierwszy widget",
|
|
"description": "Element <kbd><details></kbd> tworzy zwijany sekcję. Element <kbd><summary></kbd> zapewnia klikalną etykietę.<br><br>Kliknij podsumowanie, aby przełączyć ukrytą treść - bez JavaScript!",
|
|
"task": "Utwórz element <kbd><details></kbd> z:<br>1. Elementem <kbd><summary></kbd> z tekstem <code>Click to reveal</code><br>2. Elementem <kbd><p></kbd> z tekstem <code>This content was hidden!</code>",
|
|
"previewHTML": "",
|
|
"previewBaseCSS": "body { font-family: system-ui; padding: 20px; } details { border: 1px solid #ddd; border-radius: 8px; padding: 15px; } summary { font-weight: 600; cursor: pointer; } summary:hover { color: #1976d2; } details p { margin-top: 15px; color: #666; }",
|
|
"sandboxCSS": "",
|
|
"initialCode": "",
|
|
"solution": "<details>\n <summary>Click to reveal</summary>\n <p>This content was hidden!</p>\n</details>",
|
|
"previewContainer": "preview-area",
|
|
"validations": [
|
|
{
|
|
"type": "element_exists",
|
|
"value": "details",
|
|
"message": "Dodaj element <kbd><details></kbd>"
|
|
},
|
|
{
|
|
"type": "element_exists",
|
|
"value": "summary",
|
|
"message": "Dodaj <kbd><summary></kbd> wewnątrz details"
|
|
},
|
|
{
|
|
"type": "parent_child",
|
|
"value": { "parent": "details", "child": "summary" },
|
|
"message": "Element <kbd><summary></kbd> musi być wewnątrz <kbd><details></kbd>"
|
|
},
|
|
{
|
|
"type": "parent_child",
|
|
"value": { "parent": "details", "child": "p" },
|
|
"message": "Dodaj <kbd><p></kbd> wewnątrz <kbd><details></kbd> dla ukrytej treści"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "details-open-attribute",
|
|
"title": "Domyślnie rozwinięte",
|
|
"description": "Domyślnie <kbd><details></kbd> jest zamknięte. Dodaj atrybut <kbd>open</kbd>, aby pokazać treść na początku.<br><br>To jest atrybut logiczny - po prostu dodaj <kbd>open</kbd> bez wartości.",
|
|
"task": "Dodaj atrybut <kbd>open</kbd> do elementu <kbd><details></kbd>, aby domyślnie pokazać treść.",
|
|
"previewHTML": "",
|
|
"previewBaseCSS": "body { font-family: system-ui; padding: 20px; } details { border: 1px solid #ddd; border-radius: 8px; padding: 15px; background: #f9f9f9; } summary { font-weight: 600; cursor: pointer; } details p { margin-top: 15px; color: #666; }",
|
|
"sandboxCSS": "",
|
|
"initialCode": "<details>\n <summary>FAQ: What is HTML5?</summary>\n <p>HTML5 is the latest version of the HTML standard with new semantic elements and APIs.</p>\n</details>",
|
|
"solution": "<details open>\n <summary>FAQ: What is HTML5?</summary>\n <p>HTML5 is the latest version of the HTML standard with new semantic elements and APIs.</p>\n</details>",
|
|
"previewContainer": "preview-area",
|
|
"validations": [
|
|
{
|
|
"type": "attribute_value",
|
|
"value": { "selector": "details", "attr": "open", "value": true },
|
|
"message": "Dodaj atrybut <kbd>open</kbd> do <kbd><details></kbd>"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "faq-accordion",
|
|
"title": "Akordeon FAQ",
|
|
"description": "Wiele elementów <kbd><details></kbd> tworzy FAQ w stylu akordeonu. Każde pytanie może być rozwijane niezależnie.<br><br><b>Pro tip:</b> Wpisz <kbd>details*3>summary+p</kbd> i naciśnij Tab dla rozwinięcia Emmet. <kbd>*3</kbd> tworzy 3 elementy, <kbd>></kbd> zagnieżdża wewnątrz, <kbd>+</kbd> dodaje rodzeństwo.",
|
|
"task": "Utwórz sekcję FAQ z:<br>1. Nagłówkiem <kbd><h1></kbd> z tekstem <code>Frequently Asked Questions</code><br>2. Trzema elementami <kbd><details></kbd>, każdy z pytaniem w <kbd><summary></kbd> i odpowiedzią w <kbd><p></kbd>",
|
|
"previewHTML": "",
|
|
"previewBaseCSS": "body { font-family: system-ui; min-height: 100vh; background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); display: flex; flex-direction: column; justify-content: center; padding: 40px; margin: 0; box-sizing: border-box; } h1 { font-size: 2.5rem; color: #4a4a4a; text-align: center; margin: 0 0 30px 0; } details { background: white; border-radius: 12px; margin-bottom: 15px; padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); } summary { font-size: 1.3rem; font-weight: 600; color: #5c5c5c; cursor: pointer; list-style: none; } summary::before { content: '▸ '; color: #fcb69f; } details[open] summary::before { content: '▾ '; } details p { margin: 15px 0 0 0; color: #666; line-height: 1.6; }",
|
|
"sandboxCSS": "",
|
|
"initialCode": "",
|
|
"solution": "<h1>Frequently Asked Questions</h1>\n\n<details>\n <summary>What is HTML5?</summary>\n <p>HTML5 is the latest version of HTML with new semantic elements and APIs.</p>\n</details>\n\n<details>\n <summary>Do I need JavaScript?</summary>\n <p>Many interactive features work with pure HTML5, no JavaScript required!</p>\n</details>\n\n<details>\n <summary>Is this accessible?</summary>\n <p>Yes! Native HTML elements have built-in keyboard and screen reader support.</p>\n</details>",
|
|
"previewContainer": "preview-area",
|
|
"validations": [
|
|
{
|
|
"type": "element_exists",
|
|
"value": "h1",
|
|
"message": "Dodaj nagłówek <kbd><h1></kbd> dla tytułu FAQ"
|
|
},
|
|
{
|
|
"type": "element_count",
|
|
"value": { "selector": "details", "min": 3 },
|
|
"message": "Utwórz co najmniej 3 elementy <kbd><details></kbd> dla FAQ"
|
|
},
|
|
{
|
|
"type": "element_count",
|
|
"value": { "selector": "summary", "min": 3 },
|
|
"message": "Każdy <kbd><details></kbd> potrzebuje <kbd><summary></kbd> dla pytania"
|
|
},
|
|
{
|
|
"type": "element_count",
|
|
"value": { "selector": "details p", "min": 3 },
|
|
"message": "Każdy <kbd><details></kbd> potrzebuje <kbd><p></kbd> dla odpowiedzi"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|