@eliceio/cdk-cli 1.7.2-sharedqa.0 โ 1.8.1-documentqa.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -20
- package/assets/link-bridge.js +1 -0
- package/es/commands/create/index.js +6 -3
- package/es/commands/create/scaffold.d.ts +1 -1
- package/es/commands/create/scaffold.js +1 -1
- package/es/commands/dev/index.d.ts +1 -1
- package/es/commands/dev/index.js +1 -1
- package/es/commands/doctor/index.js +34 -1
- package/es/core/lesson-check.d.ts +7 -0
- package/es/core/lesson-check.js +87 -0
- package/es/core/templates.d.ts +2 -0
- package/es/core/templates.js +4 -1
- package/es/dev/host-page.js +17 -3
- package/es/dev/link-bridge.d.ts +27 -0
- package/es/dev/link-bridge.js +142 -0
- package/es/dev/server.d.ts +1 -1
- package/es/dev/server.js +4 -1
- package/es/rules/csp.d.ts +1 -1
- package/es/rules/csp.js +2 -2
- package/es/rules.json.js +1 -1
- package/package.json +3 -2
- package/rules.json +3 -3
- package/skills/_shared/always.md +1 -1
- package/skills/_shared/references/02-design-the-material.md +10 -9
- package/skills/_shared/references/03-create-the-project.md +12 -11
- package/skills/_shared/references/04-rules.md +1 -1
- package/skills/_shared/references/08-fix-check-errors.md +2 -1
- package/skills/_shared/references/12-upload-with-the-material-mcp.md +2 -2
- package/skills/_shared/references/17-using-the-entry-template.md +44 -5
- package/skills/_shared/references/18-using-the-lesson-template.md +207 -0
- package/skills/_shared/references/19-lesson-layouts.md +2132 -0
- package/skills/elice-content-create/SKILL.md +4 -3
- package/skills/elice-content-publish/SKILL.md +3 -3
- package/templates/blank/template.json +1 -1
- package/templates/board/package.json +1 -1
- package/templates/board/template.json +1 -1
- package/templates/board/ui/board.css +4 -1
- package/templates/board/ui/texts.js +3 -1
- package/templates/document/README.md +5 -3
- package/templates/document/core/viewer.js +4 -1
- package/templates/document/screens/learn.js +47 -2
- package/templates/document/styles.css +73 -0
- package/templates/document/template.json +1 -1
- package/templates/document/ui/templates/viewer.js +8 -3
- package/templates/document/ui/texts.js +2 -0
- package/templates/document/ui/theme.css +2 -0
- package/templates/lesson/README.md +71 -0
- package/templates/lesson/commentary.txt +7 -0
- package/templates/lesson/core/dom.d.ts +4 -0
- package/templates/lesson/core/dom.js +22 -0
- package/templates/lesson/core/engine.d.ts +23 -0
- package/templates/lesson/core/engine.js +169 -0
- package/templates/lesson/core/interact.d.ts +2 -0
- package/templates/lesson/core/interact.js +429 -0
- package/templates/lesson/core/layout-files.d.ts +4 -0
- package/templates/lesson/core/layout-files.js +9 -0
- package/templates/lesson/core/lesson.d.ts +95 -0
- package/templates/lesson/core/lesson.js +609 -0
- package/templates/lesson/core/sample.d.ts +4 -0
- package/templates/lesson/core/sample.js +128 -0
- package/templates/lesson/edit.html +21 -0
- package/templates/lesson/gitignore +4 -0
- package/templates/lesson/index.html +22 -0
- package/templates/lesson/layouts/_actions.html +1 -0
- package/templates/lesson/layouts/_cmp.html +1 -0
- package/templates/lesson/layouts/_deco-corner.html +1 -0
- package/templates/lesson/layouts/_deco-cover.html +1 -0
- package/templates/lesson/layouts/_deco-section.html +1 -0
- package/templates/lesson/layouts/_foot.html +1 -0
- package/templates/lesson/layouts/_head.html +1 -0
- package/templates/lesson/layouts/_media.html +1 -0
- package/templates/lesson/layouts/agenda.html +13 -0
- package/templates/lesson/layouts/bar-chart.html +14 -0
- package/templates/lesson/layouts/cards.html +12 -0
- package/templates/lesson/layouts/checklist.html +12 -0
- package/templates/lesson/layouts/choice-list.html +13 -0
- package/templates/lesson/layouts/closing.html +13 -0
- package/templates/lesson/layouts/compare.html +12 -0
- package/templates/lesson/layouts/cover-dark.html +13 -0
- package/templates/lesson/layouts/cover.html +15 -0
- package/templates/lesson/layouts/figures.html +12 -0
- package/templates/lesson/layouts/flow.html +13 -0
- package/templates/lesson/layouts/how-to.html +15 -0
- package/templates/lesson/layouts/image-bg.html +12 -0
- package/templates/lesson/layouts/image-pair.html +15 -0
- package/templates/lesson/layouts/image-split.html +12 -0
- package/templates/lesson/layouts/layers.html +12 -0
- package/templates/lesson/layouts/objectives.html +12 -0
- package/templates/lesson/layouts/ox-card.html +24 -0
- package/templates/lesson/layouts/ox-list.html +21 -0
- package/templates/lesson/layouts/process.html +14 -0
- package/templates/lesson/layouts/profile.html +13 -0
- package/templates/lesson/layouts/prompt-builder.html +18 -0
- package/templates/lesson/layouts/quiz.html +14 -0
- package/templates/lesson/layouts/quote.html +12 -0
- package/templates/lesson/layouts/scenario-rows.html +12 -0
- package/templates/lesson/layouts/section.html +14 -0
- package/templates/lesson/layouts/simulation.html +18 -0
- package/templates/lesson/layouts/stat.html +14 -0
- package/templates/lesson/layouts/statement.html +13 -0
- package/templates/lesson/layouts/stats.html +12 -0
- package/templates/lesson/layouts/stepper.html +13 -0
- package/templates/lesson/layouts/table.html +12 -0
- package/templates/lesson/layouts/tabs.html +13 -0
- package/templates/lesson/layouts/text-visual.html +16 -0
- package/templates/lesson/layouts/timeline.html +12 -0
- package/templates/lesson/layouts/toggle.html +16 -0
- package/templates/lesson/layouts/variables.html +14 -0
- package/templates/lesson/layouts/venn.html +15 -0
- package/templates/lesson/layouts/versus.html +12 -0
- package/templates/lesson/metadata.json +9 -0
- package/templates/lesson/package.json +15 -0
- package/templates/lesson/public/img/sample-chat.svg +21 -0
- package/templates/lesson/screens/edit.js +79 -0
- package/templates/lesson/screens/learn.js +56 -0
- package/templates/lesson/styles.css +27 -0
- package/templates/lesson/template.json +7 -0
- package/templates/lesson/ui/design.css +1103 -0
- package/templates/lesson/ui/fonts/PretendardVariable.woff2 +0 -0
- package/templates/lesson/ui/learn.css +64 -0
- package/templates/lesson/ui/mobile.css +492 -0
- package/templates/lesson/ui/reset.css +6 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: elice-content-create
|
|
3
|
-
description: Create a new Elice Custom HTML learning material (LXP material type 17) with the ecdk CLI - a quiz, simulation, interactive explanation, guided exercise, flashcards or survey - and answer how-to questions about making one (design, screens, the screen kit and SDK, templates, the content editor, checking in ecdk dev, building the zip). Use when the person asks to make Elice or LXP learning content, a Custom HTML material or an ecdk project, or asks how to build something in one. To change a material that already exists (its questions, answers or points), use elice-content-edit.
|
|
3
|
+
description: Create a new Elice Custom HTML learning material (LXP material type 17) with the ecdk CLI - a page-by-page learning material (the default lesson template), a quiz, simulation, interactive explanation, guided exercise, flashcards or survey - and answer how-to questions about making one (design, screens, the screen kit and SDK, templates, the content editor, checking in ecdk dev, building the zip). Use when the person asks to make Elice or LXP learning content, a Custom HTML material or an ecdk project, or asks how to build something in one. To change a material that already exists (its questions, answers or points), use elice-content-edit.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Create an Elice learning material
|
|
@@ -16,8 +16,9 @@ Write the progress line `[n/N] โฆ` before and after every step below (Always
|
|
|
16
16
|
1. **Design before code.** Read `references/00-what-the-person-decides.md` and `references/02-design-the-material.md`. Decide โ what the student does, โก whether the student submits and the grading (`type` `pattern` or `rubric`, set on the edit screen; the quiz template uses `pattern`, so do not ask for a quiz; AI grading is `rubric` saved by the edit screen's `getGrading` and the student submits only the answer, never a score computed with `mlapi`, `references/05-screen-code.md` "AI grading") and which completion policy fits (the publish skill sets it after the person agrees; only `on_graded` grades, `on_submit` completes on any submission without grading), โข the instructor screen (seen only in the LXP editor preview; instructors on the learning page see the student screen), โฃ the content edit screen, โค the purpose. Decide what the request leaves out and tell the person briefly; ask only when the learning goal is unclear. Then show the numbered plan.
|
|
17
17
|
2. **Environment and project.** `ecdk --version && ecdk doctor --json` (`references/01-check-the-environment.md`, also for `cli.latest`), then `ecdk create --list` to pick a template and `ecdk create <folder> --template <name>` (`references/03-create-the-project.md`; it runs `npm install` for the SDK, so when that fails run `npm install` in the project). Start `ecdk dev <folder>` in the background now and give the person the URL.
|
|
18
18
|
3. **Write the screens.** Start from the template's example code and the kit API table at the top of `references/05-screen-code.md`; do not open `lib/` to learn the API (the table is the API). Follow its UI patterns (kit icon buttons, list rows, drop zones; the quiz template: `references/06-using-the-quiz-template.md`; a survey (opinions, feedback, self-assessment, no right answers): the survey template and `references/16-using-the-survey-template.md` for the settings shape, question-writing rules, personal data and where the answers are; block coding in Entry: the Entry template and `references/17-using-the-entry-template.md`, where the person builds the start and answer projects on the edit screen and you never write project JSON); an edit screen you write by hand follows `references/13-edit-screen-design.md` (kit classes, layout, microcopy); when a student or instructor screen has nothing to show, always use `app.emptyState()`, never your own empty-state markup, illustration or text (`references/05-screen-code.md`, "Nothing to show"), and write `commentary.txt` (key concepts and intent, no answers). There is no default content file: the content and answers are what the edit screen saves (`ecdk dev` writes `.ecdk/settings.json`, local by default; the elice-content-publish skill can send it with the upload after the person agrees, otherwise the person enters it in the LXP edit screen).
|
|
19
|
-
-
|
|
20
|
-
-
|
|
19
|
+
- **A learning material the person did not give a screen layout for** (explanations, guided practice, self-check, "ํ์ต ์๋ฃ ๋ง๋ค์ด์ค") and that is not a quiz, survey, PDF/PPT document, video, Entry or board request: use the lesson template and `references/18-using-the-lesson-template.md`. You write only the content (`.ecdk/settings.json`, the lesson content object with layouts from `references/19-lesson-layouts.md`), never screen code; `ecdk doctor` (`project.lesson`) checks it. Lesson quizzes are self-check only. In a run without a person, skip the edit-view save and report how the content reaches LXP (`references/18-using-the-lesson-template.md` step 8).
|
|
20
|
+
- When the person wants to design the screens themselves, or the activity needs an interaction the lesson layouts cannot do (a live simulation, a game, a custom visualization), start from the blank template and its content editor: design the content JSON shape and its schema first (`references/02-design-the-material.md` โฃ-1), put them in `screens/edit.js` (`useContentEditor(app, { initial, schema })`), then write the student screen against that shape. Replace the template's example everywhere it says `์ด ์๋ฃ์ ๋ง๊ฒ ๋ฐ๊ฟ ๊ณณ`.
|
|
21
|
+
- If the person describes the content (for example "5 questions about perceptrons"), fill it in so the upload can carry it: write `.ecdk/settings.json` in the shape `references/09-check.md` describes (the edit screen's content object at the top level, `grading` when graded), then have the person open the edit view in `ecdk dev`, check it and save with the edit screen's button, so the edit screen's own validation runs. Draft the answers, but the person confirms them before any upload (Always). One quiz material holds up to 20 questions (`references/06-using-the-quiz-template.md`): put them all in one material; only more than 20 means several quiz materials (pages). If the person prefers, give the content as draft text (the content editor: one JSON block for ์ฝ๋ ๋ณด๊ธฐ) to enter in the LXP edit screen instead. Not for the Entry template: its settings are Entry projects the person builds on the edit screen, never written by you, also in a run without a person (`references/17-using-the-entry-template.md` "Who makes what").
|
|
21
22
|
4. **Check each screen** with `ecdk dev <folder> --check --screens <screen>` after you write it (`references/09-check.md`), fix what it reports (error ids: `references/08-fix-check-errors.md`). The person looks at the screens too.
|
|
22
23
|
5. **Build and report.** `ecdk validate` once, then `ecdk build --json` must return `ok: true`. Report as `references/10-build.md` says.
|
|
23
24
|
6. **Upload** only after the person approves: the elice-content-publish skill (it can send `.ecdk/settings.json` with the upload after the person agrees to the summary), or the person uploads `dist/content.zip` in LXP. Content not sent with the upload is entered in the LXP edit screen, then '์์
์๋ฃ์ ๋ฐ์' at the top of the LXP edit page (`references/12-upload-with-the-material-mcp.md`, "Content and answers (settings)" and "Fallback").
|
|
@@ -13,13 +13,13 @@ Reference files are in `references/` in this skill's folder (see Always). Read `
|
|
|
13
13
|
|
|
14
14
|
1. **MCP ready?** The `elice-material` tools must be available. If not, ask the person to run `ecdk setup --only mcp` and log in (Claude Code `/mcp` โ elice-material โ Authenticate, Helpy Code `โ ;`), then stop.
|
|
15
15
|
2. **Build.** `ecdk build --json` must return `ok: true`. Keep `zip` and `zipBytes`.
|
|
16
|
-
3. **Content and answers.** Check whether the input schema of `save_draft` (or `update_material`) lists `settings` as a key of `payload` (on an older server, a top-level parameter). If it does and this project has `.ecdk/settings.json`: make sure the edit screen saved it (the person saves the edit view in `ecdk dev`; a file you wrote by hand must go through that save), run `ecdk doctor` and send no `settings` while its `project.grading` or `project.quiz` check fails (tell the person why, never the answer values; they fix it in the edit view), show a short summary (title, number of questions or items, answers included or not and `grading.type`, never the answer values) and ask for an explicit yes to send it with the upload. `settings` replaces the page's settings as a whole: on a page that already has a version, compare `get_material`'s settings with the file first, and if keys would disappear or the LXP content differs (an instructor edited it in LXP), show the difference briefly and ask before overwriting (a new page needs no comparison). Adding images to a page that already has a version: merge its current settings (`get_material` or `get_draft`) into `.ecdk/settings.json` first, keeping `asset:` images as they are (`references/12-upload-with-the-material-mcp.md` item 8). No file: suggest filling the edit view in `ecdk dev` first, or skip it. No `settings` key, or the person says no: zip only (the fallback). Details: `references/12-upload-with-the-material-mcp.md` "Content and answers (settings)".
|
|
17
|
-
4. **Completion policy.** If `save_draft` (or `update_material`) lists `completion_policy` in its input schema (in `payload`), propose one (`references/12-upload-with-the-material-mcp.md` "Completion policy"): graded (the quiz template, or settings with `grading`) โ `on_graded`, the survey template โ `on_access` (decided 2026-11-25; may change; its submissions are still recorded), other submits without grading โ `on_submit`, no submission โ `on_access`. `on_graded` only when the same save carries `settings` with `grading` (or the page already has grading); a material that grades with AI (`mlapi.fetch`, evaluation criteria) and has no `grading`: stop and fix it first (rubric from the criteria, `references/12-upload-with-the-material-mcp.md` "AI grading"), never `on_graded` without grading, and `on_submit` only on purpose for display-only AI feedback (tell the person scores won't reflect the AI); otherwise no policy at the first save, or `on_submit` if the person wants it (ask). Tell the person that only `on_graded` grades: `on_submit` completes on any submission without grading ("์ ์ถํ์ด์."), `on_access` completes on open. The policy is a page setting and applies at once.
|
|
16
|
+
3. **Content and answers.** Check whether the input schema of `save_draft` (or `update_material`) lists `settings` as a key of `payload` (on an older server, a top-level parameter). If it does and this project has `.ecdk/settings.json`: make sure the edit screen saved it (the person saves the edit view in `ecdk dev`; a file you wrote by hand must go through that save, except for **the lesson template**, whose hand-written content counts as checked when `ecdk doctor` `project.lesson` does not fail, so a run without a person skips the save: `references/18-using-the-lesson-template.md` step 8), run `ecdk doctor` and send no `settings` while its `project.grading` or `project.quiz` check fails (tell the person why, never the answer values; they fix it in the edit view), show a short summary (title, number of questions or items, answers included or not and `grading.type`, never the answer values) and ask for an explicit yes to send it with the upload. `settings` replaces the page's settings as a whole: on a page that already has a version, compare `get_material`'s settings with the file first, and if keys would disappear or the LXP content differs (an instructor edited it in LXP), show the difference briefly and ask before overwriting (a new page needs no comparison). Adding images to a page that already has a version: merge its current settings (`get_material` or `get_draft`) into `.ecdk/settings.json` first, keeping `asset:` images as they are (`references/12-upload-with-the-material-mcp.md` item 8). No file: suggest filling the edit view in `ecdk dev` first, or skip it. **The Entry template** (`references/17-using-the-entry-template.md`): never write or complete `.ecdk/settings.json` yourself (the start and answer projects are Entry project JSON the person builds), even when no one can open the edit screen in this run (Helpy and other unattended runs); send only a file the edit view saved, otherwise zip only. No `settings` key, or the person says no: zip only (the fallback). Details: `references/12-upload-with-the-material-mcp.md` "Content and answers (settings)".
|
|
17
|
+
4. **Completion policy.** If `save_draft` (or `update_material`) lists `completion_policy` in its input schema (in `payload`), propose one (`references/12-upload-with-the-material-mcp.md` "Completion policy"): graded (the quiz template, or settings with `grading`) โ `on_graded`, the survey template โ `on_access` (decided 2026-11-25; may change; its submissions are still recorded), other submits without grading โ `on_submit`, no submission โ `on_access`. `on_graded` only when the same save carries `settings` with `grading` (or the page already has grading; the Entry template without them: no policy now, and the to-do in step 10); a material that grades with AI (`mlapi.fetch`, evaluation criteria) and has no `grading`: stop and fix it first (rubric from the criteria, `references/12-upload-with-the-material-mcp.md` "AI grading"), never `on_graded` without grading, and `on_submit` only on purpose for display-only AI feedback (tell the person scores won't reflect the AI); otherwise no policy at the first save, or `on_submit` if the person wants it (ask). Tell the person that only `on_graded` grades: `on_submit` completes on any submission without grading ("์ ์ถํ์ด์."), `on_access` completes on open. The policy is a page setting and applies at once.
|
|
18
18
|
5. **Pick the page and confirm it.** Candidates: `.ecdk/link.json`, the LXP edit URL the person gives (`https://{org}.โฆ/lecturepages/{id}/edit`), or the person's choice from `list_my_organizations` โ `list_courses` โ `list_lectures` โ `list_custom_pages`. Never pick a page yourself (not the first in a list, not a guess by title, not a page from another project); if the answer is ambiguous, ask again. Before any upload call (`create_package_upload`, `submit_package`), show the full target, ๊ธฐ๊ด ยท ๊ณผ๋ชฉ ยท ์์
ยท ํ์ด์ง with names and ids, its LXP edit URL, whether content and answers go with it and the completion policy to set (the page's current one too), then wait for an explicit yes. Do this every time: also for `.ecdk/link.json` (and compare its `version_id` with `get_material`) and for a URL the person gave (confirm the names it resolves to). `.ecdk/link.json` and an edit URL give only the org's `name_short`: get the ๊ธฐ๊ด name from `list_my_organizations` and the ๊ณผ๋ชฉ ยท ์์
ยท ํ์ด์ง names from `get_material`. A new page (`create_custom_page`) needs its own yes that names the ์์
it goes into. If the page already has content or answers saved in LXP, say that sending settings replaces them and ask again.
|
|
19
19
|
6. **Upload.** `get_material` (keep `current_version.id`) โ `create_package_upload` with `size_bytes = zipBytes` โ run its `curl_command` with `package.zip` replaced by the zip path โ `submit_package` โ poll `get_draft` until ready or failed. On failure, report the server's reason with `ecdk validate dist/content.zip` and stop. Images or a PDF/PPTX for the settings: only now (draft ready), `create_asset_upload` per file โ its `curl_command`, and put the returned `key`, never the URL, into the merged settings (`references/12-upload-with-the-material-mcp.md` "Images and documents"); no such tool: zip images, and tell the person.
|
|
20
20
|
7. **Approve.** Show what changes (page, title, whether the content and answers go with it or are entered on the LXP edit screen after saving, the completion policy) and the draft `preview_urls`. Saving is visible to learners at once if the page is open. Wait for an explicit yes.
|
|
21
21
|
8. **Save.** One `save_draft` with `material_draft_id`, `expected_current_version_id` and `payload` holding only keys its schema lists: `settings` (the content of `.ecdk/settings.json`) only when step 3 got a yes, `completion_policy` only when step 4 got a yes, and `title` ยท `icon` when the page has none (a new page; icon: `references/12-upload-with-the-material-mcp.md` "Icon"), all in this one save so no extra version is made. On `MATERIAL_CHANGED` or `MATERIAL_GRADING_REQUIRED`, stop and tell the person (`references/12-upload-with-the-material-mcp.md` "Errors and warnings").
|
|
22
22
|
9. **Check.** Show any `warnings` in the result to the person close to word for word. `get_material` must show what was sent: the settings (same keys, item count and `grading.type` as the summary), the completion policy, the title. If not, tell the person and use the fallback. Without settings: tell the person to enter the content and answers in the LXP edit screen, save with its own button, then press '์์
์๋ฃ์ ๋ฐ์' at the top of the LXP edit page (`references/12-upload-with-the-material-mcp.md` "Fallback"); for a graded material, then pick ๋ต์ ํ์ธ ํ ์๋ฃ in the '์ค์ ' panel at the top of the LXP edit page, or offer to set `on_graded` with `update_material` (when it takes `completion_policy`) once `get_material` shows the grading. No `completion_policy` key: tell the person which policy to pick in that '์ค์ ' panel. `update_material` stopping with `MATERIAL_DRAFT_PENDING`: someone's upload is not saved; explain and ask whether to save it (`save_draft`) or discard it (`discard_draft`), never pick for them.
|
|
23
|
-
10. **Finish.** Write `.ecdk/link.json` as `{ "org": โฆ, "lecture_page_id": โฆ, "version_id": โฆ }` so the next upload goes to the same page. Report ๊ธฐ๊ด ยท ๊ณผ๋ชฉ ยท ์์
ยท ํ์ด์ง (names and ids), the LXP URL, the saved version, whether content and answers were sent, the completion policy (only `on_graded` grades: a quiz with `on_submit` completes on any submission and shows "์ ์ถํ์ด์.", not a score), any `warnings`, and whether the page is closed to learners (a new page stays closed until the person opens it in LXP). Later changes to the title, icon, settings or policy of this page without a new zip go through `update_material`.
|
|
23
|
+
10. **Finish.** Write `.ecdk/link.json` as `{ "org": โฆ, "lecture_page_id": โฆ, "version_id": โฆ }` so the next upload goes to the same page. Report ๊ธฐ๊ด ยท ๊ณผ๋ชฉ ยท ์์
ยท ํ์ด์ง (names and ids), the LXP URL, the saved version, whether content and answers were sent, the completion policy (only `on_graded` grades: a quiz with `on_submit` completes on any submission and shows "์ ์ถํ์ด์.", not a score), any `warnings`, and whether the page is closed to learners (a new page stays closed until the person opens it in LXP). **The Entry template uploaded without settings** (always the case in a run without a person): the report is not "done"; end it with a remaining to-do, in the person's language, to open the LXP edit screen, build the start project ('์์ ํ๋ฉด' tab) and the answer project ('์ฑ์ ํ๋ฉด' tab), pick the grading (์ผ๋ฐ ์ฑ์ ยท AI ์ฑ์ , with the AI criteria you drafted as text to type in) in the '์ค์ ' tab, press '์ด์์ผ๋ก ์ ์ฅ' and then '์์
์๋ฃ์ ๋ฐ์', and for grading pick '๋ต์ ํ์ธ ํ ์๋ฃ' (`on_graded`) in the '์ค์ ' panel at the top of the LXP edit page (`references/17-using-the-entry-template.md` "Runs without a person"). Later changes to the title, icon, settings or policy of this page without a new zip go through `update_material`.
|
|
24
24
|
|
|
25
25
|
{{version}}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
"name": "blank",
|
|
3
3
|
"version": "1.2.6",
|
|
4
4
|
"title": "๋น ์๋ฃ",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "ํ๋ฉด์ ์ง์ ์ง์ผ ํ๋ ์๋ฃ(์๋ฎฌ๋ ์ด์
ยท ๊ฒ์ ยท ์๊ฐํ ๋ฑ, ๋ ์ด์์์ ๋ด์ฉ๋ง ์ฑ์ฐ๋ ํ์ต ์๋ฃ๋ lesson). ์์ \"์์ธกํ๊ณ ํ์ธํ๊ธฐ\"(๋ง๋ ์์ธก ยท ์ ๋ต ๋ณด๊ธฐ)์ ๋ด์ฉ JSON ํธ์ง๊ธฐ(ํผ ๋ณด๊ธฐ ยท ์ฝ๋ ๋ณด๊ธฐ)๋ก ์์ (์๋ฃ ์ ์ฑ
์ LXP ์๋ฃ ํธ์ง ํ๋ฉด์ '์ค์ '์์ ๊ต์ก์๊ฐ ๊ณ ๋ฆ)"
|
|
6
6
|
}
|
|
@@ -1211,6 +1211,7 @@ body.ec-edit-page:has(.bw) .ec-submitbar {
|
|
|
1211
1211
|
white-space: nowrap;
|
|
1212
1212
|
}
|
|
1213
1213
|
.bw-filehint {
|
|
1214
|
+
white-space: pre-line;
|
|
1214
1215
|
margin: -4px 0 0 4px;
|
|
1215
1216
|
font-size: 12px;
|
|
1216
1217
|
color: var(--bw-text2);
|
|
@@ -1265,9 +1266,11 @@ body.ec-edit-page:has(.bw) .ec-submitbar {
|
|
|
1265
1266
|
color: var(--bw-text3);
|
|
1266
1267
|
font-weight: 500;
|
|
1267
1268
|
}
|
|
1268
|
-
/* ์ง์ฐ๊ธฐ ยท ๋ฉ๋ด ๋ฒํผ(์ค๋ฅธ์ชฝ ์)์ด ๋งจ ์
|
|
1269
|
+
/* ์ง์ฐ๊ธฐ ยท ๋ฉ๋ด ๋ฒํผ(์ค๋ฅธ์ชฝ ์)์ด ๋งจ ์ ๊ทธ๋ฆผ์ ๋ฌปํ์ง ์๊ฒ. ํ ๋ฒ ๋๋ฅธ '์ญ์ '(๋นจ๊ฐ, .is-confirm)๋ ๋ฎ์ง ์์ */
|
|
1269
1270
|
.bw-card-x:has(+ .bw-card-media) {
|
|
1270
1271
|
z-index: 1;
|
|
1272
|
+
}
|
|
1273
|
+
.bw-card-x:not(.is-confirm):has(+ .bw-card-media) {
|
|
1271
1274
|
background: rgba(255, 255, 255, 0.85);
|
|
1272
1275
|
border-radius: 50%;
|
|
1273
1276
|
}
|
|
@@ -115,7 +115,9 @@ export const texts = {
|
|
|
115
115
|
submit: '์ฌ๋ฆฌ๊ธฐ',
|
|
116
116
|
/** ํ์ผ ์ฌ๋ฆฌ๊ธฐ (๊ทธ๋ฆผ ยท PDF, ์ข
๋ฅ ยท ํฌ๊ธฐ๋ ์๋ฒ ๊ธฐ์ค) */
|
|
117
117
|
pickFile: 'ํ์ผ ์ฌ๋ฆฌ๊ธฐ',
|
|
118
|
-
|
|
118
|
+
/** ์ค๋ฐ๊ฟ(\n)์ ๊ทธ๋๋ก ๋ณด์ */
|
|
119
|
+
fileHint:
|
|
120
|
+
'์ง์ ํ์: ์ด๋ฏธ์ง(PNG, JPG, WebP) ์ต๋ 10MB, PDF ์ต๋ 20MB\nํ์ผ์ ๋์ด๋ค ๋๊ฑฐ๋ ๋ถ์ฌ๋ฃ์ ์๋ ์์ต๋๋ค.',
|
|
119
121
|
clearFile: '๊ณ ๋ฅธ ํ์ผ ์ง์ฐ๊ธฐ',
|
|
120
122
|
sending: '์นด๋๋ฅผ ์ถ๊ฐํ๋ ์ค',
|
|
121
123
|
uploading: percent => `ํ์ผ์ ์ฌ๋ฆฌ๋ ์ค ${percent}%`,
|
|
@@ -6,7 +6,7 @@ Elice Custom HTML ํ์ต์๋ฃ ํ๋ก์ ํธ์
๋๋ค (๋ฌธ์ ํ
ํ๋ฆฟ: PDF ยท P
|
|
|
6
6
|
|
|
7
7
|
| ํ์ผ | ํ๋ฉด |
|
|
8
8
|
| --------------------------------- | ------------------------------------------------------------------------------------ |
|
|
9
|
-
| `screens/learn.js` ยท `index.html` | ํ์ ํ๋ฉด (์ด๋์ด ๋ฐํ ๋ฌธ์ ๋ทฐ์ด: ํ๋ฉด ๋์ด์ ๋ง์ถค, ์๋ `< [n] / N์ชฝ >`
|
|
9
|
+
| `screens/learn.js` ยท `index.html` | ํ์ ํ๋ฉด (์ด๋์ด ๋ฐํ ๋ฌธ์ ๋ทฐ์ด: ํ๋ฉด ๋์ด์ ๋ง์ถค, ์๋ `< [n] / N์ชฝ >` ๋๊ธฐ๊ธฐ. ์ข๊ฑฐ๋ ๋ฎ์ ์นธ์์๋ `โน n / N โบ` + ๋ด๋ ค๋ฐ๊ธฐ) |
|
|
10
10
|
| `screens/edit.js` ยท `edit.html` | ๋ด์ฉ ํธ์ง ํ๋ฉด (CMS): ๋ฌธ์ ์ฌ๋ฆฌ๊ธฐ ยท ๋ค๋ฅธ ํ์ผ๋ก ๋ณ๊ฒฝ ยท PPTX ๊ธ์ ๊ณ ์น๊ธฐ |
|
|
11
11
|
| `ui/` | ๋ชจ์: ์ ยท ๊ฐ๊ฒฉ ยท ๋ฌธ๊ตฌ ยท ๋งํฌ์
(์๋ ํ) |
|
|
12
12
|
| `styles.css` | ์ด ์ฝํ
์ธ ์ ์คํ์ผ (๊ฐ์ `ui/theme.css`์ ๋ณ์) |
|
|
@@ -22,7 +22,7 @@ screens/ ๋ฐฐ์น โ ์ด๋ค ๋ธ๋ก์ ์ด๋ค ์์๋ก ๋ณด์ผ์ง
|
|
|
22
22
|
core/ ๋์ โ ๊ณ ์น์ง ์์ต๋๋ค
|
|
23
23
|
โโ file-type.js ์ฌ๋ฆด ํ์ผ ํ์ ํ์ธ (.pdf ยท .pptx๋ง, ์ด๋ฆ ยท ์ฒซ ๋ฐ์ดํธ)
|
|
24
24
|
โโ settings.js ์ ์ฅ ๋ด์ฉ ๋ชจ์ ยท ๊ธฐ๋ณธ๊ฐ ยท ๊ฒ์ฆ ยท ํฌ๊ธฐ ํ๋
|
|
25
|
-
โโ viewer.js ๋๊ธฐ๊ธฐ ยท n / N ยท ์ชฝ ๋ฒํธ ์
๋ ฅ ยท ํญ ยท ๋์ด ๋ง์ถค ยท ํค๋ณด๋(โ โ Home End)
|
|
25
|
+
โโ viewer.js ๋๊ธฐ๊ธฐ ยท n / N(์
๋ ฅ ์นธ ยท ๊ธ current-text) ยท ์ชฝ ๋ฒํธ ์
๋ ฅ ยท ํญ ยท ๋์ด ๋ง์ถค ยท ํค๋ณด๋(โ โ Home End)
|
|
26
26
|
โโ load.js ํ์ผ ๋ฐ๊ธฐ ยท ์ข
๋ฅ์ ๋ง๋ ๊ทธ๋ฆฌ๊ธฐ ๋ชจ๋ ์ด๊ธฐ
|
|
27
27
|
โโ pdf.js PDF ๊ทธ๋ฆฌ๊ธฐ (pdf.js legacy ๋น๋, canvas + ๊ธ์ ์ธต)
|
|
28
28
|
โโ pdf-worker.js pdf.js ์์
์ ๋์ฐ๊ธฐ (์ถ์ฒ null์์๋: ์ผ๋ฐ blob ์์
์ โ ์ ๋๋ฉด ์์
์ ์์ด)
|
|
@@ -37,7 +37,7 @@ core/ ๋์ โ ๊ณ ์น์ง ์์ต๋๋ค
|
|
|
37
37
|
| ------------------------------------ | -------------------------------------------------------------------- |
|
|
38
38
|
| ์ ยท ๊ฐ๊ฒฉ ยท ํ๋ฉด ํญ | `ui/theme.css`์ `--dc-*` ๋ณ์ (์: `--dc-accent`, `--dc-max-width`) |
|
|
39
39
|
| ๋ฌธ๊ตฌ ("์ด์์ผ๋ก ์ ์ฅ", ์๋ด ๋ฌธ๊ตฌ ๋ฑ) | `ui/texts.js` |
|
|
40
|
-
| ๋ทฐ์ด ๋๊ธฐ๊ธฐ ์ค (`< [n] / N์ชฝ >`, ์ชฝ ๋ฒํธ ์
๋ ฅ
|
|
40
|
+
| ๋ทฐ์ด ๋๊ธฐ๊ธฐ ์ค (`< [n] / N์ชฝ >`, ์ชฝ ๋ฒํธ ์
๋ ฅ ์นธ, ๋ด๋ ค๋ฐ๊ธฐ ๋ฒํผ) | `ui/templates/viewer.js`. ์ข์ ์นธ ๋ชจ์์ `styles.css` `@container dc-learn` |
|
|
41
41
|
| ํธ์ง ํ๋ฉด ํ์ผ ์ค ยท ์ฌ๋ฆฌ๋ ์ค ยท ์๋ด ยท ์ชฝ ๋ชฉ๋ก | `ui/templates/edit.js` |
|
|
42
42
|
| ํ์ ํ๋ฉด ๋น ์๋ด (๊ทธ๋ฆผ ยท ๋ฌธ๊ตฌ) | ํคํธ `app.emptyState({ theme: 'dark' })` (`screens/learn.js`). ๋ฌธ๊ตฌ๋ฅผ ๋ฐ๊พธ๋ ค๋ฉด `title` ยท `description`์ ๋๊น๋๋ค |
|
|
43
43
|
| ๋ธ๋ก ์์ | `screens/*.js` |
|
|
@@ -58,6 +58,8 @@ core/ ๋์ โ ๊ณ ์น์ง ์์ต๋๋ค
|
|
|
58
58
|
- **PPTX ๊ธ์ ๊ณ ์น๊ธฐ**: ํธ์ง ํ๋ฉด์์ ์ฌ๋ผ์ด๋์ ๊ธ์๋ฅผ ๋๋ฅด๋ฉด ๊ทธ ๊ธ์๋ฅผ ์ฌ๋ผ์ด๋ ๋ชจ์ ๊ทธ๋๋ก ๊ณ ์นฉ๋๋ค (๋ ๋๋ฌ๊ฐ ๊ทธ๋ฆฐ ๊ธ์ ์์๊ฐ ์
๋ ฅ ์นธ, ํ์ผ ์ขํ ยท ๊ธ์๋ก ๋ํ๊ณผ ์ง์ง์, `core/inline-edit.js`. Enter๋ ์ ๋ฌธ๋จ ยท Shift+Enter๋ ์ค๋ฐ๊ฟ, ๋ค๋ฅธ ๊ณณ์ ๋๋ฅด๊ฑฐ๋ Ctrl+Enter ยท โ+Enter๋ฉด ์ ์ฉ, Esc ์ทจ์, ๋ถ์ฌ๋ฃ๊ธฐ๋ ๊ธ์๋ง, ํ๊ธ ์กฐํฉ ๊ทธ๋๋ก). ๋๋ฅผ ์ ์๋ ๊ณณ์ ๊ธ์๊ฐ ์๋ ๊ณณ(๋ฌธ๋จ์ ๊ธ์ ํญ์ผ๋ก ์ค์ฌ ์ ๋ ฌ๋๋ก ๋์)์ด๊ณ , ๊ฐ๋ฆฌํค๋ฉด ์ ์ ยท ๊ณ ์น๋ ์ค ์ค์ ํ
๋๋ฆฌ๋ ๊ธ์ ์์๋ง๋ค ํ๋๋ก ์์ ์ ๋ฌธ๋จ ์ ์ฒด๋ฅผ ๊ฐ์๋๋ค (๋ฌธ๋จ์ด ๋๊ฑฐ๋ ์ค๋ฉด ๋ค์ ์ผ, ํ์ ยท ๊ทธ๋ฃน ๋ํ์ ๋ํ๊ณผ ๊ฐ์ด ๊ธฐ์. ํ ์นธ์ ์นธ ์ ์ฒด). ๋ฐ๊พธ์ง ์์ ๊ธ์์ ์์๊ณผ ๊ธ์๊ฐ ์๋ ์์(๊ทธ๋ฆผ ยท ๋ํ ยท ํ ยท ์ฐจํธ)๋ ์๋ ํ์ผ ๊ทธ๋๋ก์
๋๋ค. ๊ณ ์น ๊ธ์๋ ํ๋ฉด์ ๋ฐ๋ก ๋ณด์ด๊ณ ํ์ผ์ ๊ทธ๋ ๋ค์ ์ฐ์ง ์์ต๋๋ค. **์ด์์ผ๋ก ์ ์ฅ**์ ๋๋ฅด๋ฉด ๊ณ ์น ๊ธ์๋ฅผ ํ ๋ฒ์ ๋ฃ์ .pptx๋ฅผ ๊ฐ์ ํ๋ฆ์ผ๋ก ์๋ก ์ฌ๋ฆฌ๊ณ `asset_key`๋ฅผ ๋ฐ๊ฟ๋๋ค (๊ธ์ ์ฐจ์ด๋ฅผ ๋ฐ๋ก ์ ์ฅํ์ง ์์).
|
|
59
59
|
- **ํ์ผ์ ๊ณ ๋ฅด๋ฉด** ๋ฏธ๋ฆฌ๋ณด๊ธฐ๋ฅผ ๋จผ์ ๋ณด์ด๊ณ ๋ค์์ ์ฌ๋ฆฝ๋๋ค (์ฌ๋ฆฌ๋ ๋์ ์ ์ฅ์ ๋ง์, ์ฌ๋ฆฌ์ง ๋ชปํ๋ฉด ์ ๋ฌธ์๋ก ๋์๊ฐ). ํธ์ง ํ๋ฉด์ ํฐ ์ชฝ ยท ๋๊ธฐ๊ธฐ ์ค ยท ์ชฝ ๋ชฉ๋ก์ ํ๋ฉด ๋์ด(LXP ํธ์ง iframe 512px) ์์ ๋ค์ด์ค๊ฒ ๋ง์ถฅ๋๋ค.
|
|
60
60
|
- **PDF**๋ ๋ณด๊ธฐ๋ง ํฉ๋๋ค (ํ์ผ ์ค ยท ๋ค๋ฅธ ํ์ผ๋ก ๋ณ๊ฒฝ ยท ์ชฝ ๋ชฉ๋ก ยท ํฐ ์ชฝ). ๋์์ด๋ ์์์ PDF ํธ์ง ๋๊ตฌ๊ฐ ์์ด ๋ฃ์ง ์์์ต๋๋ค. ๋ด์ฉ์ ๋ฐ๊พธ๋ ค๋ฉด ๊ณ ์น ํ์ผ๋ก ๋ฐ๊ฟ๋๋ค.
|
|
61
|
+
- **ํ์ ํ๋ฉด ํฌ๊ธฐ**: ํ๋ฉด(`main`) ํญ < 480px ๋๋ ๋์ด < 320px์ด๋ฉด(๋ณด์กฐ ์นธ ยท ํด๋ํฐ) ์ชฝ์ด ์นธ์ ์ฑ์ฐ๊ณ ์๋ 24px ์ค์ `โน n / N โบ`(๊ธ์๋ง)์ ์ค๋ฅธ์ชฝ ๋ ๋ด๋ ค๋ฐ๊ธฐ ๋ฒํผ์ ๋ณด์
๋๋ค (`styles.css` `@container dc-learn`, ์ค ๋์ด `--dc-compact-bar`). ๊ทธ๋ณด๋ค ํฌ๋ฉด ์ง๊ธ ๋ชจ์ ๊ทธ๋๋ก์
๋๋ค.
|
|
62
|
+
- **๋ด๋ ค๋ฐ๊ธฐ**๋ ์ฌ๋ฆฐ ํ์ผ ๊ทธ๋๋ก(PDF๋ PDF, PPTX๋ ํธ์ง ํ๋ฉด์์ ๊ณ ์น ์ต์ข
.pptx)๋ฅผ `document.name` ์ด๋ฆ์ผ๋ก ์ค๋๋ค. ์ฃผ์๊ฐ ํ๋ฉด๊ณผ ๊ฐ์ ์ถ์ฒ๋ฉด `<a download>`๋ก, ๋ค๋ฅธ ์ถ์ฒ๋ฉด(`ecdk dev`) ๋ฐ์์ blob ์ฃผ์๋ก ๋ด๋ ค๋ฐ๊ณ , ๋ฐ์ง ๋ชปํ๋ฉด ์ ํญ์ผ๋ก ์ฃผ์๋ฅผ ์ฝ๋๋ค (๋ธ๋ผ์ฐ์ ๊ธฐ๋ณธ ๋์).
|
|
61
63
|
- ์ฑ์ ์ค์ (`grading`)์ ์๊ณ ํ์ ํ๋ฉด์ ์ ์ถํ์ง ์์ต๋๋ค. LXP ์๋ฃ ํธ์ง ํ๋ฉด์ '์ค์ '์์ ์๋ฃ ์ ์ฑ
์ **์ด๋ ์ ํ์ต ์๋ฃ**๋ก ๊ณ ๋ฆ
๋๋ค.
|
|
62
64
|
|
|
63
65
|
`ecdk dev`์ ๋ด์ฉ ํธ์ง์์ ์ฌ๋ฆฐ ํ์ผ์ `.ecdk/assets/`์, ์ ์ฅํ ๋ด์ฉ์ `.ecdk/settings.json`์ ๋จ์ต๋๋ค (zip์๋ ๋ค์ด๊ฐ์ง ์์). ๊ธฐ๋ณธ์ผ๋ก๋ ๋ก์ปฌ์๋ง ์๊ณ , publish ์คํฌ๋ก ์ฌ๋ฆด ๋ ๋์ํ๋ฉด ์
๋ก๋์ ํจ๊ป ๋ณด๋
๋๋ค. ๋ณด๋ด์ง ์์ผ๋ฉด LXP์ ์ฌ๋ฆฐ ๋ค ํธ์ง ํ๋ฉด์์ ์
๋ ฅํฉ๋๋ค. ์ ์ฅํ๊ธฐ ์ ์๋ ํ์ ํ๋ฉด์ด ๊ทธ๋ฆผ๊ณผ "ํ์ต ์๋ฃ๋ฅผ ์ค๋นํ๊ณ ์์ด์" ์๋ด๋ฅผ ๋ณด์
๋๋ค (ํคํธ `app.hasContent` ยท `app.emptyState({ theme: 'dark' })`: ์ด๋์ด ๋ฐํ์ด๋ผ ์ด๋์ด ์).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ๋ฌธ์ ๋ทฐ์ด ๋์ (๊ณ ์น์ง ์์ต๋๋ค): ์ชฝ ๋๊ธฐ๊ธฐ ยท n / N ยท ์ชฝ ๋ฒํธ ์
๋ ฅ ยท ํญ ๋ง์ถค ยท ํค๋ณด๋ ยท ํฌ๊ธฐ ๋ฐ๋๋ฉด ๋ค์ ๋ง์ถค (ํ๋ ๋ฒํผ ์์).
|
|
1
|
+
// ๋ฌธ์ ๋ทฐ์ด ๋์ (๊ณ ์น์ง ์์ต๋๋ค): ์ชฝ ๋๊ธฐ๊ธฐ ยท n / N(์
๋ ฅ ์นธ ยท ๊ธ) ยท ์ชฝ ๋ฒํธ ์
๋ ฅ ยท ํญ ๋ง์ถค ยท ํค๋ณด๋ ยท ํฌ๊ธฐ ๋ฐ๋๋ฉด ๋ค์ ๋ง์ถค (ํ๋ ๋ฒํผ ์์).
|
|
2
2
|
// ๋งํฌ์
์ ui/templates/viewer.js (data-role๋ก ์ฐพ์), ๊ทธ๋ฆฌ๊ธฐ๋ core/pdf.js ยท core/pptx-view.js๊ฐ ํฉ๋๋ค.
|
|
3
3
|
import { part } from './dom.js';
|
|
4
4
|
|
|
@@ -29,6 +29,8 @@ export function mountViewer(root, doc, opts = {}) {
|
|
|
29
29
|
const next = part(root, 'next');
|
|
30
30
|
const current = part(root, 'current');
|
|
31
31
|
const total = part(root, 'total');
|
|
32
|
+
// ์ชฝ ๋ฒํธ ๊ธ (์ ํ): ์ข์ ์นธ์์ ์
๋ ฅ ์นธ ๋์ ๋ณด์ด๋ "n" (CSS๊ฐ ๋ ์ค ํ๋๋ง ๋ณด์)
|
|
33
|
+
const currentText = root.querySelector('[data-role="current-text"]');
|
|
32
34
|
const alert = root.querySelector('[data-role="alert"]');
|
|
33
35
|
const showAlert = (text) => {
|
|
34
36
|
if (!alert) return;
|
|
@@ -45,6 +47,7 @@ export function mountViewer(root, doc, opts = {}) {
|
|
|
45
47
|
const showCurrent = () => {
|
|
46
48
|
if (isInput) current.value = String(index + 1);
|
|
47
49
|
else current.textContent = String(index + 1);
|
|
50
|
+
if (currentText) currentText.textContent = String(index + 1);
|
|
48
51
|
};
|
|
49
52
|
|
|
50
53
|
const available = () => {
|
|
@@ -47,9 +47,11 @@ async function show(file) {
|
|
|
47
47
|
root.replaceChildren(notice({ text: isLoadError(e) ? t.loadFailed : t.openFailed, error: true }));
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
|
-
const
|
|
50
|
+
const downloadName = file.name || `${title || '๋ฌธ์'}.${file.type}`;
|
|
51
|
+
const view = viewer({ kind: file.type, name: title || file.name, download: { name: downloadName } });
|
|
51
52
|
root.replaceChildren(view);
|
|
52
|
-
// ์ฐ์ฃผ๋ ์์: ์ชฝ ์ ์ฒด๊ฐ ํ๋ฉด(๋ฌด๋) ์์ ๋ณด์ด๊ฒ ํญ ยท ๋์ด์ ๋ง์ถ๊ณ , ์๋ < [n] / N์ชฝ >๋ง (ํ๋ ๋ฒํผ ์์)
|
|
53
|
+
// ์ฐ์ฃผ๋ ์์: ์ชฝ ์ ์ฒด๊ฐ ํ๋ฉด(๋ฌด๋) ์์ ๋ณด์ด๊ฒ ํญ ยท ๋์ด์ ๋ง์ถ๊ณ , ์๋ < [n] / N์ชฝ >๋ง (ํ๋ ๋ฒํผ ์์).
|
|
54
|
+
// ์ข๊ฑฐ๋ ๋ฎ์ ์นธ์ โน n / N โบ + ๋ด๋ ค๋ฐ๊ธฐ (styles.css @container dc-learn)
|
|
53
55
|
const stage = part(view, 'stage');
|
|
54
56
|
mountViewer(view, doc, {
|
|
55
57
|
// ๋๊ธด ์ชฝ์ ๋ฐ์ง ๋ชปํ๋ฉด(์๋ช
์ฃผ์ 6์๊ฐ ๋ง๋ฃ) ๋น ์ชฝ ๋์ ์๋ด. ๋ค์ ๋ฐ์ง ์๋๋ค (์ ์ฃผ์ ๋ฐ๊ธฐ๋ SDK ์ถํ ์์
)
|
|
@@ -59,5 +61,48 @@ async function show(file) {
|
|
|
59
61
|
return stage.clientHeight - (parseFloat(style.paddingTop) || 0) - (parseFloat(style.paddingBottom) || 0);
|
|
60
62
|
},
|
|
61
63
|
});
|
|
64
|
+
// ๋ด๋ ค๋ฐ๊ธฐ: ์ฌ๋ฆฐ ํ์ผ ๊ทธ๋๋ก (PPTX๋ ํธ์ง ํ๋ฉด์์ ๊ณ ์น ์ต์ข
ํ์ผ)
|
|
65
|
+
const button = part(view, 'download');
|
|
66
|
+
button.addEventListener('click', async () => {
|
|
67
|
+
button.disabled = true;
|
|
68
|
+
try {
|
|
69
|
+
await download(url, downloadName);
|
|
70
|
+
} catch (e) {
|
|
71
|
+
// ๋ฐ์ง ๋ชปํ๋ฉด ์ ํญ์์ ์ฃผ์๋ฅผ ์ฐ๋ค (๋ณด๊ธฐ ยท ์ ์ฅ์ ๋ธ๋ผ์ฐ์ ๊ธฐ๋ณธ ๋์)
|
|
72
|
+
console.error('[document] ๋ฌธ์๋ฅผ ๋ด๋ ค๋ฐ์ง ๋ชปํด ์ ํญ์ผ๋ก ์ฝ๋๋ค', url, e);
|
|
73
|
+
openInNewTab(url);
|
|
74
|
+
} finally {
|
|
75
|
+
button.disabled = false;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* ํ์ผ์ ์ด๋ฆ(name)์ผ๋ก ๋ด๋ ค๋ฐ๋๋ค. ๊ฐ์ ์ถ์ฒ ์ฃผ์๋ฉด <a download>๋ก ๋ฐ๋ก (์ด์: ์๋ฃ ํ์ผ์ด ์ฝํ
์ธ ์ ๊ฐ์ ์ถ์ฒ).
|
|
82
|
+
* ๋ค๋ฅธ ์ถ์ฒ๋ฉด ๋ธ๋ผ์ฐ์ ๊ฐ download ์ด๋ฆ์ ๋ฌด์ํ๊ณ PDF๋ ํ๋ฉด์ด ๊ทธ ์ฃผ์๋ก ๋์ด๊ฐ๋ฏ๋ก, ๋ฐ์์ blob ์ฃผ์๋ก (ecdk dev)
|
|
83
|
+
*/
|
|
84
|
+
async function download(url, name) {
|
|
85
|
+
const link = document.createElement('a');
|
|
86
|
+
link.download = name;
|
|
87
|
+
if (new URL(url, location.href).origin === location.origin) {
|
|
88
|
+
link.href = url;
|
|
89
|
+
link.click();
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const res = await fetch(url);
|
|
93
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
94
|
+
const blob = URL.createObjectURL(await res.blob());
|
|
95
|
+
link.href = blob;
|
|
96
|
+
link.click();
|
|
97
|
+
// ๋ฐ๋ก ์ง์ฐ๋ฉด ๋ฐ๊ธฐ๋ฅผ ์ทจ์ํ๋ ๋ธ๋ผ์ฐ์ ๊ฐ ์์ด ์ ๊น ๋ค์ ์ง์ด๋ค
|
|
98
|
+
setTimeout(() => URL.revokeObjectURL(blob), 1000);
|
|
99
|
+
}
|
|
62
100
|
|
|
101
|
+
/** ์ฃผ์๋ฅผ ์ ํญ์ผ๋ก (window.open์ sandbox๋ฅผ ๋ฌผ๋ ค๋ฐ์ผ๋ฏ๋ก ๋งํฌ๋ก: LXP๊ฐ sandbox ๋ฐ ์ ํญ์ผ๋ก ์ฐ๋ค) */
|
|
102
|
+
function openInNewTab(url) {
|
|
103
|
+
const link = document.createElement('a');
|
|
104
|
+
link.href = url;
|
|
105
|
+
link.target = '_blank';
|
|
106
|
+
link.rel = 'noopener';
|
|
107
|
+
link.click();
|
|
63
108
|
}
|
|
@@ -15,6 +15,8 @@ body.dc-learn {
|
|
|
15
15
|
overflow: hidden;
|
|
16
16
|
}
|
|
17
17
|
body.dc-learn main {
|
|
18
|
+
/* ์ข๊ฑฐ๋ ๋ฎ์ ์นธ(์๋ @container dc-learn)์ ํ์ ํ๋ฉด ํฌ๊ธฐ๋ก ํ๋จํ๋ค. ๋์ด๋ 100dvh๋ก ์ ํด์ ธ ์์ด size๋ก ๋๋ค */
|
|
19
|
+
container: dc-learn / size;
|
|
18
20
|
display: flex;
|
|
19
21
|
flex-direction: column;
|
|
20
22
|
gap: 0;
|
|
@@ -192,6 +194,11 @@ button.dc-icon-button,
|
|
|
192
194
|
white-space: nowrap;
|
|
193
195
|
font-variant-numeric: tabular-nums;
|
|
194
196
|
}
|
|
197
|
+
/* ์ชฝ ๋ฒํธ ๊ธ ยท ๋ด๋ ค๋ฐ๊ธฐ๋ ์ข์ ํ์ ํ๋ฉด(์๋ @container dc-learn)์์๋ง ๋ณด์ธ๋ค */
|
|
198
|
+
.dc-current-text,
|
|
199
|
+
button.dc-icon-button.dc-download {
|
|
200
|
+
display: none;
|
|
201
|
+
}
|
|
195
202
|
input.dc-current-input {
|
|
196
203
|
width: 3ch;
|
|
197
204
|
height: 28px;
|
|
@@ -306,6 +313,72 @@ button.dc-icon-button:disabled {
|
|
|
306
313
|
}
|
|
307
314
|
}
|
|
308
315
|
|
|
316
|
+
/* ์ข๊ฑฐ๋ ๋ฎ์ ํ์ ํ๋ฉด (๋ณด์กฐ ์นธ ยท ํด๋ํฐ, ๋์์ด๋ ์์ 340ร190): ์ชฝ์ด ์นธ์ ์ฑ์ฐ๊ณ , ์๋ 24px ์ค์
|
|
317
|
+
"โน n / N โบ"(๊ธ์๋ง) ๊ฐ์ด๋ฐ ยท ๋ด๋ ค๋ฐ๊ธฐ ์ค๋ฅธ์ชฝ ๋. ์ @media ๋ฒํผ ํฌ๊ธฐ ๊ท์น๋ณด๋ค ๋ค์ ๋ฌ์ ์ด๊ธด๋ค.
|
|
318
|
+
๊ฒฝ๊ณ๊ฐ์ @container ์กฐ๊ฑด์ ๋ณ์๋ฅผ ์ธ ์ ์์ด ์ซ์๋ก ๋๋ค */
|
|
319
|
+
@container dc-learn (width < 480px) or (height < 320px) {
|
|
320
|
+
body.dc-learn .dc-stage {
|
|
321
|
+
padding: 0 12px;
|
|
322
|
+
}
|
|
323
|
+
body.dc-learn .dc-toolbar {
|
|
324
|
+
display: grid;
|
|
325
|
+
grid-template-columns: 1fr auto 1fr;
|
|
326
|
+
height: var(--dc-compact-bar);
|
|
327
|
+
padding: 0 12px;
|
|
328
|
+
}
|
|
329
|
+
body.dc-learn .dc-nav {
|
|
330
|
+
grid-column: 2;
|
|
331
|
+
gap: 10px;
|
|
332
|
+
}
|
|
333
|
+
body.dc-learn button.dc-icon-button {
|
|
334
|
+
width: 20px;
|
|
335
|
+
height: 20px;
|
|
336
|
+
border: 0;
|
|
337
|
+
background: transparent;
|
|
338
|
+
}
|
|
339
|
+
body.dc-learn button.dc-icon-button svg {
|
|
340
|
+
width: 16px;
|
|
341
|
+
height: 16px;
|
|
342
|
+
}
|
|
343
|
+
body.dc-learn button.dc-icon-button.dc-download {
|
|
344
|
+
display: inline-flex;
|
|
345
|
+
grid-column: 3;
|
|
346
|
+
justify-self: end;
|
|
347
|
+
}
|
|
348
|
+
body.dc-learn .dc-count {
|
|
349
|
+
height: auto;
|
|
350
|
+
padding: 0;
|
|
351
|
+
border: 0;
|
|
352
|
+
border-radius: 0;
|
|
353
|
+
font-size: 14px;
|
|
354
|
+
font-weight: 500;
|
|
355
|
+
line-height: 1.4;
|
|
356
|
+
}
|
|
357
|
+
body.dc-learn input.dc-current-input,
|
|
358
|
+
body.dc-learn .dc-unit {
|
|
359
|
+
display: none;
|
|
360
|
+
}
|
|
361
|
+
body.dc-learn .dc-current-text {
|
|
362
|
+
display: inline;
|
|
363
|
+
}
|
|
364
|
+
@media (hover: hover) {
|
|
365
|
+
body.dc-learn button.dc-icon-button:hover:not(:disabled) {
|
|
366
|
+
background: var(--dc-nav-hover-bg);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
/* ์๊ฐ๋ฝ: ๋ณด์ด๋ ํฌ๊ธฐ๋ ์์๋๋ก ๋๊ณ ๋๋ฅด๋ ์๋ฆฌ๋ง 32px๋ก ๋ํ๋ค */
|
|
370
|
+
@media (pointer: coarse) {
|
|
371
|
+
body.dc-learn button.dc-icon-button {
|
|
372
|
+
position: relative;
|
|
373
|
+
}
|
|
374
|
+
body.dc-learn button.dc-icon-button::after {
|
|
375
|
+
content: '';
|
|
376
|
+
position: absolute;
|
|
377
|
+
inset: -6px;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
309
382
|
/* pdf.js ๊ธ์ ์ธต (pdfjs-dist web/pdf_viewer.css์์ ํ์ํ ๊ฒ๋ง, Apache-2.0): ๊ธ์๋ฅผ ๊ณ ๋ฅด๊ณ ๋ณต์ฌํ ์ ์๊ฒ */
|
|
310
383
|
.dc-pdf-page .textLayer {
|
|
311
384
|
position: absolute;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// ๋จ๊ฒจ์ผ ํ๋ data-role (๋์ core/viewer.js๊ฐ ์ฐพ์):
|
|
3
3
|
// stage(์ชฝ์ ๋๋ ์์ญ, ํค๋ณด๋ โ โ) ยท sheet(์ชฝ ํฌ๊ธฐ ํ) ยท page(๊ทธ๋ฆผ์ด ๋ค์ด๊ฐ)
|
|
4
4
|
// alert(์ชฝ์ ๊ทธ๋ฆฌ์ง ๋ชปํ์ ๋ ์๋ด, ์์ด๋ ๋จ) ยท prev ยท next ยท current(์ชฝ ๋ฒํธ ์
๋ ฅ ์นธ: ์ซ์๋ฅผ ๋ฃ๊ณ Enter๋ฉด ๊ทธ ์ชฝ์ผ๋ก. <span>์ด๋ฉด ๊ธ๋ง ๋ฐ๋) ยท total
|
|
5
|
+
// current-text(์ชฝ ๋ฒํธ ๊ธ, ์์ด๋ ๋จ: ์ข์ ์นธ์์ ์
๋ ฅ ์นธ ๋์ ๋ณด์) ยท download(ํ์ ํ๋ฉด ๋ด๋ ค๋ฐ๊ธฐ, screens/learn.js๊ฐ ์ฒ๋ฆฌ)
|
|
5
6
|
import { html } from '../../core/dom.js';
|
|
6
7
|
import { texts } from '../texts.js';
|
|
7
8
|
|
|
@@ -15,9 +16,10 @@ const icon = (d) => html`
|
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* ๋ทฐ์ด ํ
|
|
18
|
-
* @param {{ kind: 'pdf' | 'pptx', name?: string }} opts
|
|
19
|
+
* @param {{ kind: 'pdf' | 'pptx', name?: string, download?: { name: string } }} opts
|
|
20
|
+
* download: ๋๊ธฐ๊ธฐ ์ค ์ค๋ฅธ์ชฝ์ ๋ด๋ ค๋ฐ๊ธฐ ๋ฒํผ (ํ์ ํ๋ฉด๋ง). name์ ๋ฒํผ ์ด๋ฆ์ ์ฐ๋ ํ์ผ ์ด๋ฆ
|
|
19
21
|
*/
|
|
20
|
-
export const viewer = ({ kind, name = '' }) => html`
|
|
22
|
+
export const viewer = ({ kind, name = '', download }) => html`
|
|
21
23
|
<section class="dc-viewer" data-kind="${kind}" data-ec-quiet>
|
|
22
24
|
<p class="dc-viewer-alert" data-role="alert" role="alert" hidden></p>
|
|
23
25
|
<div class="dc-stage" data-role="stage" tabindex="0" role="region" aria-label="${t.label(name)}">
|
|
@@ -28,9 +30,12 @@ export const viewer = ({ kind, name = '' }) => html`
|
|
|
28
30
|
<div class="dc-toolbar">
|
|
29
31
|
<div class="dc-nav">
|
|
30
32
|
<button type="button" class="dc-icon-button" data-role="prev" aria-label="${t.prev[kind]}" title="${t.prev[kind]}">${icon('m15 18-6-6 6-6')}</button>
|
|
31
|
-
<span class="dc-count" aria-live="polite"><input type="text" inputmode="numeric" autocomplete="off" class="dc-current-input" data-role="current" value="1" aria-label="${t.current}"
|
|
33
|
+
<span class="dc-count" aria-live="polite"><input type="text" inputmode="numeric" autocomplete="off" class="dc-current-input" data-role="current" value="1" aria-label="${t.current}" /><span class="dc-current-text" data-role="current-text">1</span> / <span data-role="total">1</span><span class="dc-unit">${t.unit}</span></span>
|
|
32
34
|
<button type="button" class="dc-icon-button" data-role="next" aria-label="${t.next[kind]}" title="${t.next[kind]}">${icon('m9 18 6-6-6-6')}</button>
|
|
33
35
|
</div>
|
|
36
|
+
${download
|
|
37
|
+
? html`<button type="button" class="dc-icon-button dc-download" data-role="download" aria-label="${t.download(download.name)}" title="${t.download(download.name)}">${icon('M12 4v11m-5-5 5 5 5-5M5 20h14')}</button>`
|
|
38
|
+
: ''}
|
|
34
39
|
</div>
|
|
35
40
|
</section>
|
|
36
41
|
`;
|
|
@@ -23,6 +23,8 @@ export const texts = {
|
|
|
23
23
|
/** ์ฐ ๋ค ๋๊ธด ์ชฝ์ ๋ฐ์ง ๋ชปํจ (์๋ช
์ฃผ์ ๋ง๋ฃ: ํ์ ํ๋ฉด 6์๊ฐ) */
|
|
24
24
|
expired: '๋ฌธ์ ์ฃผ์๊ฐ ๋ง๋ฃ๋์ด์. ์๋ก๊ณ ์นจํด ์ฃผ์ธ์.',
|
|
25
25
|
openFailed: '๋ฌธ์๋ฅผ ์ด์ง ๋ชปํ์ด์. ํ์ผ์ด ์์๋์๊ฑฐ๋ ์ง์ํ์ง ์๋ ๋ด์ฉ์ด ์์ ์ ์์ด์.',
|
|
26
|
+
/** ํ์ ํ๋ฉด ๋ด๋ ค๋ฐ๊ธฐ ๋ฒํผ (์ฌ๋ฆฐ ํ์ผ ๊ทธ๋๋ก. ๋ฐ์ง ๋ชปํ๋ฉด ์ ํญ์ผ๋ก ์ถ) */
|
|
27
|
+
download: (name) => (name ? `${name} ๋ด๋ ค๋ฐ๊ธฐ` : '๋ฌธ์ ๋ด๋ ค๋ฐ๊ธฐ'),
|
|
26
28
|
thumbnails: '์ชฝ ๋ชฉ๋ก',
|
|
27
29
|
thumbnail: (n) => `${n}์ชฝ`,
|
|
28
30
|
},
|
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
--dc-nav-hover-line: var(--ec-edit-hover-line);
|
|
33
33
|
--dc-nav-input-hover-bg: color-mix(in srgb, var(--eds-text-primary) 8%, transparent);
|
|
34
34
|
--dc-nav-input-focus-bg: var(--eds-background-paper);
|
|
35
|
+
/* ์ข๊ฑฐ๋ ๋ฎ์ ํ์ ํ๋ฉด์ ๋๊ธฐ๊ธฐ ์ค ๋์ด (styles.css @container dc-learn) */
|
|
36
|
+
--dc-compact-bar: 24px;
|
|
35
37
|
|
|
36
38
|
/* ํ์ ํ๋ฉด: ์ด๋์ด ๋ฐํ. ๋์์ด๋(์ฐ์ฃผ๋) ์์์ ๊ณ ์ ๊ฐ์ด๋ผ ๋ฐ์ ยท ์ด๋์ด ํ
๋ง ๋ชจ๋ ๊ฐ์ ์์
๋๋ค */
|
|
37
39
|
--dc-learn-bg: #212121;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# {{name}}
|
|
2
|
+
|
|
3
|
+
Elice Custom HTML ํ์ต์๋ฃ ํ๋ก์ ํธ์
๋๋ค. ํ์์ด ์ชฝ์ ๋๊ธฐ๋ฉฐ ์ฝ๊ณ , ๊ฐ์ ์
๋ ฅํ๊ณ , ํ๋กฌํํธ๋ฅผ ๋ณต์ฌํ๊ณ , ํ์ธ ๋ฌธ์ ๋ก ์ค์ค๋ก ์ ๊ฒํ๋ **ํ์ต ์๋ฃ(ํ์ด์งํ)** ํ
ํ๋ฆฟ์
๋๋ค. ๋์์ธ(๋ณด๋ผ `#673cda` ยท Pretendard ยท 16:9)๊ณผ ๋ ์ด์์ 39์ข
์ ์ ํด์ ธ ์๊ณ , ์๋ฃ๋ง๋ค ๋ฐ๊พธ๋ ๊ฒ์ **๋ด์ฉ(JSON)๋ฟ**์
๋๋ค. ํ๋ฉด ์ฝ๋๋ CSS๋ฅผ ์๋ก ์ฐ์ง ์์ต๋๋ค.
|
|
4
|
+
|
|
5
|
+
## ๊ณ ์น๋ ๊ณณ
|
|
6
|
+
|
|
7
|
+
| ํ์ผ | ๋ด์ฉ |
|
|
8
|
+
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
9
|
+
| ํธ์ง ํ๋ฉด (`ecdk dev`์ ๋ด์ฉ ํธ์ง) | ๋ด์ฉ `{ meta, slides }`. ์ ์ฅํ๋ฉด `.ecdk/settings.json` (zip์๋ ๋ค์ด๊ฐ์ง ์์, LXP์์๋ ์๋ฃ์ settings) |
|
|
10
|
+
| `public/img/` | ์ฌ๋ผ์ด๋ ์ด๋ฏธ์ง. ๋ด์ฉ์๋ `public/` ์์ด `"image": "img/ํ์ผ.png"`๋ก ์ (์ธ๋ถ ์ฃผ์๋ ์ฝํ
์ธ CSP๊ฐ ๋ง์) |
|
|
11
|
+
| `commentary.txt` | ํ์ต ์ฐธ๊ณ ๋ด์ฉ (LXP AI ํฌํผ๊ฐ ์ฝ์, ์ ๋ต์ ์ ์ง ์์) |
|
|
12
|
+
| `metadata.json` | ํ๋ฉด ๊ตฌ์ฑ(ํ์ ยท ํธ์ง ํ๋ฉด, ๊ต์ก์ ํ๋ฉด์ ๊บผ ๋ ). `ecdk build`๊ฐ `build`๋ง ์ฑ์ |
|
|
13
|
+
| `styles.css` | ์ด ์ฝํ
์ธ ๋ง์ ์คํ์ผ (๋ณดํต ๊ณ ์น์ง ์์, ์์ ๋ด์ฉ `meta.key_color`) |
|
|
14
|
+
|
|
15
|
+
๊ณ ์น์ง ์๋ ๊ณณ: `layouts/`(๋ ์ด์์ ํ ยท ์ฌ๋กฏ ๊ท์น, ๋น๋ ๋ ํ๋ฉด ์ฝ๋์ ๊ธ๋ก ๋ฌถ์ด๊ณ zip์๋ ํ์ผ๋ก ๋ค์ด๊ฐ์ง ์์), `core/`(ํ ์์ง ยท ๊ฒ์ฌ ยท ์ค์ต ๋์), `ui/`(๋์์ธ ยท ํฐํธ), `screens/`, `lib/`(ํ๋ฉด ํคํธ). ์ํ๋ ๋ชจ์์ ๋ ์ด์์์ด ์์ผ๋ฉด ํ
ํ๋ฆฟ ๊ธฐ๋ฅ ์์ฒญ์ผ๋ก ์๋ฆฝ๋๋ค.
|
|
16
|
+
|
|
17
|
+
## ๋ด์ฉ ๋ชจ์
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"meta": {
|
|
22
|
+
"title": "์๋ฃ ์ ๋ชฉ",
|
|
23
|
+
"variables": [{ "key": "org", "label": "๊ธฐ๊ด ์ด๋ฆ", "default": "my-org" }]
|
|
24
|
+
},
|
|
25
|
+
"slides": [
|
|
26
|
+
{ "layout": "cover", "data": { "title": "์ ๊ท ๊ธฐ๋ฅ\n๋์
๊ฐ์ด๋", "subtitle": "๋์
์ ํ์ธ ํญ๋ชฉ๊ณผ ์ ์ฉ ์ ์ฐจ" } },
|
|
27
|
+
{ "layout": "cards", "data": { "title": "์ธ ๊ฐ์ง ๋ฐฉ๋ฒ ๋น๊ต", "cols": "3", "items": [{ "title": "๋ฐฉ๋ฒ A", "desc": "์ค๋ช
๋ฌธ์ฅ์
๋๋ค." }] } }
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
- ๋ ์ด์์ ์ด๋ฆ ยท ์ฌ๋กฏ ยท ๊ธ์ ์ ์ํ์ ์คํฌ ์ฐธ๊ณ ๋ฌธ์ 19(๋ ์ด์์), ๊ณ ๋ฅด๋ ๋ฒ ยท ๋ฌธ์ฒด ยท ๊ตฌ์ฑ ๊ท์น์ 18์ ์์ต๋๋ค (`ecdk setup --only skills`๋ก ์ค์นํ ์คํฌ์ `references/`).
|
|
33
|
+
- ๊ธ ์์์ `**๊ฐ์กฐ**`๋ ๋ณด๋ผ ๊ตต์ ๊ธ์จ, `` `์ฝ๋` ``๋ ์ฝ๋ ์์, `\n`์ ์ค๋ฐ๊ฟ, `[[key]]`๋ `meta.variables`์ ๋ณ์(ํ์์ด `variables` ์ชฝ์์ ์
๋ ฅํ ๊ฐ์ผ๋ก ๋ฐ๋)์
๋๋ค.
|
|
34
|
+
- ํธ์ง ํ๋ฉด์ ๊ฒฌ๋ณธ(9์ฅ, "์์ฑํ AI์๊ฒ ์ง๋ฌธ ์ํ๊ธฐ")์ ๋ฐ๊ฟ ์ฐ๋ผ๊ณ ๋ฃ์ ์์์
๋๋ค. ์ ์ฅํ๊ธฐ ์ ์๋ ํ์ ํ๋ฉด์ด "ํ์ต ์๋ฃ๋ฅผ ์ค๋นํ๊ณ ์์ด์" ์๋ด๋ฅผ ๋ณด์
๋๋ค.
|
|
35
|
+
|
|
36
|
+
## ๊ฒ์ฌ
|
|
37
|
+
|
|
38
|
+
| ์ด๋์ | ๋ฌด์์ |
|
|
39
|
+
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
40
|
+
| ํธ์ง ํ๋ฉด ์ ์ฅ | ์ค๋ฅ(ํ์ ์ฌ๋กฏ ยท ํญ๋ชฉ ์ ยท ํ์ฉ๊ฐ ยท ์๋ ๋ ์ด์์ ยท ํด์ฆ ์ ๋ต ๋ฒํธ ยท ์ธ๋ถ ์ด๋ฏธ์ง ยท `meta` ๊ฐ)๊ฐ ์์ผ๋ฉด ์ ์ฅ์ ๋ง์. ๊ธ์ ์ ยท ๋ฌธ์ฒด ๊ฒฝ๊ณ ๋ ์๋ ๋ชฉ๋ก์๋ง |
|
|
41
|
+
| `ecdk doctor` (`project.lesson`) | ๊ฐ์ ๊ฒ์ฌ๋ฅผ `.ecdk/settings.json`์ ๋ค์ ๋๋ฆผ + ์ด๋ฏธ์ง ํ์ผ์ด `public/`์ ์๋์ง. ๋ด์ฉ์ ์์ผ๋ก(AI๊ฐ) ๊ณ ์ณค์ผ๋ฉด ๊ผญ ๋๋ฆฌ๊ณ , ํธ์ง ํ๋ฉด์์ ํ ๋ฒ ์ ์ฅ |
|
|
42
|
+
| `ecdk dev --check --step all` | ์ชฝ๋ง๋ค ํ๋ฉด ๊ทธ๋ฆผ (`.ecdk/screens/learn-desktop-step<n>.png`): ๊ธ ๋์นจ ยท ๋น ์ด๋ฏธ์ง ์๋ฆฌ ยท ์ ๋ชฉ ์ค๋ฐ๊ฟ์ ๋์ผ๋ก |
|
|
43
|
+
|
|
44
|
+
๊ฒฝ๊ณ ๋ ์ฝ๊ณ ํ๋จํฉ๋๋ค. ๋์น๋ฉด ๊ธ์ ํฌ๊ธฐ๊ฐ ์๋๋ผ ๊ธ์ ์ค์ด๊ฑฐ๋ ์ชฝ์ ๋๋๋๋ค.
|
|
45
|
+
|
|
46
|
+
## ์งํ๊ณผ ์ ์ถ
|
|
47
|
+
|
|
48
|
+
- **์ชฝ ๋๊ธฐ๊ธฐ**: ์์ ๋ฒํผ ยท โ โ ํค ยท ํฐ์น๋ก ๋ฐ๊ธฐ. ์ผ์ชฝ ์๋ `n / N`. ์ฒซ ์ชฝ์ ์ด์ ยท ๋ง์ง๋ง ์ชฝ์ ๋ค์์ LXP ์ด์ ยท ๋ค์ ์์
์๋ฃ๋ก ๊ฐ๋๋ค (ํคํธ ์คํ
ํผ `app.useStepper`).
|
|
49
|
+
- **์ ์ถ ์์**: ํด์ฆ(`quiz` ยท `choice-list` ยท `ox-list` ยท `ox-card`) ยท ์๋ฎฌ๋ ์ด์
๋ฏธ์
์ **์๊ฐ ํ์ธ**์
๋๋ค. ํ๋ฉด ์์์ ์ ์ค์ ํด์ค๋ง ๋ณด์ด๊ณ ์๋ฒ์ ์ ์ถ ยท ์ฑ์ ํ์ง ์์ต๋๋ค. ์ ๋ต์ ๋ด์ฉ(settings)์ ์์ด ํ์๋ ์ฝ์ ์ ์์ผ๋, ์ฑ์ ์ ๋ค์ด๊ฐ๋ ๋ฌธ์ ๋ ํด์ฆ ํ
ํ๋ฆฟ์ผ๋ก ๋ง๋ญ๋๋ค.
|
|
50
|
+
- **์๋ฃ ์ ์ฑ
**: LXP ์๋ฃ ํธ์ง ํ๋ฉด '์ค์ '์์ **์ด๋ฉด ์๋ฃ**(`on_access`)๋ฅผ ๊ณ ๋ฆ
๋๋ค (์ ์ถ์ด ์์ด `on_submit` ยท `on_graded`๋ก๋ ์๋ฃ๋์ง ์์).
|
|
51
|
+
- ์
๋ ฅํ ๋ณ์ ๊ฐ ยท ์ฒดํฌ๋ฆฌ์คํธ ์ฒดํฌ๋ ๊ทธ ํ๋ฉด์๋ง ์๊ณ ์ ์ฅํ์ง ์์ต๋๋ค. ๊ฐ์ ๋
ธํธ(`notes`)๋ ๋ด์ฉ์ ๋จ์ง๋ง ํ์ ํ๋ฉด์๋ ๋ณด์ด์ง ์์ต๋๋ค.
|
|
52
|
+
|
|
53
|
+
## ์๋ณธ(๋์์ด๋ deck-kit)๊ณผ ๋ค๋ฅธ ์
|
|
54
|
+
|
|
55
|
+
๋์์ด๋ deck-kit(build.py ยท deck.css ยท deck.js ยท layouts)๋ฅผ ์ฎ๊ฒผ์ต๋๋ค. ๋ ์ด์์ ํ์ `layouts/*.html`(์๋ณธ์์ "๋ฑ" ํํ ยท ๋จธ๋ฆฌ๊ธ ๋ณ์ ์ด๋ฆ `lesson_title`๋ง ๋ฐ๊ฟ, ๋งจ ์ `<!--SCHEMA {...}-->`๊ฐ ์ฌ๋กฏ ๊ท์น), ๋์์ธ์ `ui/design.css`(์๋ณธ deck.css, ํ id๋ง `#lesson`)์
๋๋ค. ํ ์์ง ยท ๊ฒ์ฌ ๋ฌธ๊ตฌ๋ ์๋ณธ๊ณผ ๊ฐ์ ๊ฒฐ๊ณผ๋ฅผ ๋
๋๋ค.
|
|
56
|
+
|
|
57
|
+
- ์ชฝ ๋๊ธฐ๊ธฐ ๋ฒํผ ยท ์ชฝ ๋ฒํธ๋ ํคํธ ์คํ
ํผ(LXP ์ด์ ยท ๋ค์ ์๋ฃ์ ์ด์ด์ง)๊ฐ ๊ทธ๋ฆฌ๊ณ , ์๋ณธ์ ์ํ ์ข์ฐ ๋ฒํผ ยท ์ฌ๋ผ์ด๋ ์ ์ชฝ ๋ฒํธ๋ ์ฐ์ง ์์ต๋๋ค. ์ฌ๋ผ์ด๋๋ ์์ ๋ฒํผ ์๋ฆฌ๋ฅผ ๋น์ฐ๊ณ 16:9๋ก ํ๋ฉด์ ๋ง์ถฅ๋๋ค.
|
|
58
|
+
- ์ ์ฒด ๋ณด๊ธฐ(O) ยท ๊ฐ์ ๋
ธํธ ํจ๋(N) ยท ์ ์ฒด ํ๋ฉด(F) ํค, ๋์นจ ๊ฒ์ฌ ยท ์บก์ฒ ยท PDF๋ ์์ต๋๋ค.
|
|
59
|
+
- ํด๋ํฐ ยท ์ธ๋ก ํ๋ธ๋ฆฟ(์ฝํ
์ธ ํญ 768px ๋ฏธ๋ง)์์๋ ์ชฝ์ ํต์งธ๋ก ์ค์ด์ง ์๊ณ ์ธ๋ก๋ก ํ์ด ์์ต๋๋ค(`ui/mobile.css`, ์๋ณธ์๋ ์์): ๊ธ์จ ยท ๋ฒํผ์ ์๋ ํฌ๊ธฐ, ์ฌ๋ฌ ์ด ยท ์ข์ฐ ๋ฐฐ์น๋ ์์๋๋ก, ์ฅ์์ ์จ๊น, ํ๋ ๊ฐ๋ก ์คํฌ๋กค, ํ๋ฉด์ ์ธ๋ก๋ก ์คํฌ๋กค๋ฉ๋๋ค. ๋์ ํ๋ฉด์ ์๋ณธ 16:9 ๊ทธ๋๋ก์
๋๋ค. ๊ธ์ด ๊ธธ๊ฑฐ๋ ๊ทธ๋ฆผ์ด ์ธ๋ก๋ก ๊ธธ๋ฉด ํด๋ํฐ์์ ์ชฝ์ด ๊ธธ์ด์ง๋๋ค.
|
|
60
|
+
- ๋ณ์ ๊ฐ์ ๋ธ๋ผ์ฐ์ ์ ์ฅ์์ ๋จ๊ธฐ์ง ์์ต๋๋ค. ๋ณต์ฌํ ๋ ์ค๋ฐ๊ฟ ๋ฐฉ์ง ๊ธ์(๋ณด์ด์ง ์๋ ๊ธ์)๋ฅผ ๋บ๋๋ค.
|
|
61
|
+
- ์ด๋ฏธ์ง๋ zip ์ ํ์ผ(`public/`)๋ง ์๋๋ค (์๋ณธ `--embed-images` ยท CDN ํฐํธ ์ต์
์์).
|
|
62
|
+
|
|
63
|
+
## ๋ช
๋ น
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
ecdk dev # ๋ก์ปฌ์์ ์ด์๊ณผ ๊ฐ์ ์กฐ๊ฑด์ผ๋ก ๋ณด๊ธฐ (http://localhost:4170)
|
|
67
|
+
ecdk doctor # ํ๊ฒฝ ยท ํ๋ก์ ํธ ์ ๊ฒ (project.lesson: ๋ด์ฉ ๊ฒ์ฌ)
|
|
68
|
+
ecdk build # ๊ฒ์ฌ ํ dist/content.zip (ํธ์ง ํ๋ฉด์ ์ฌ๋ฆด ํ์ผ)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
ํฐํธ: Pretendard (SIL Open Font License 1.1, `ui/fonts/PretendardVariable.woff2`).
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
์ด ์๋ฃ์์ ๋ค๋ฃจ๋ ํต์ฌ ๊ฐ๋
, ํ์์ด ํ๋ ํ๋, ๋ฌธ์ ์ ์๋๋ฅผ ์ ์ด ์ฃผ์ธ์. LXP AI ํฌํผ๊ฐ ์ด ๋ด์ฉ์ ์ฐธ๊ณ ํด ๋ตํฉ๋๋ค.
|
|
2
|
+
์ ๋ต์ ์ ์ง ์์ต๋๋ค: zip ์ ํ์ผ์ด๋ผ ํ์๋ ์ฝ์ ์ ์์ต๋๋ค.
|
|
3
|
+
|
|
4
|
+
(์๋๋ ํ
ํ๋ฆฟ ์์ "์์ฑํ AI์๊ฒ ์ง๋ฌธ ์ํ๊ธฐ"์ ์ค๋ช
์
๋๋ค. ์๋ฃ๋ฅผ ๋ง๋ค๋ฉด ์ด ์๋ฃ์ ๋ง๊ฒ ๋ชจ๋ ๋ค์ ์๋๋ค.)
|
|
5
|
+
ํต์ฌ ๊ฐ๋
: ์์ฑํ AI์๊ฒ ํ๋ ์ง๋ฌธ์ ์ญํ , ๋งฅ๋ฝ, ํ ์ผ, ํ์์ ๋ด์ผ๋ฉด ๋ฐ๋ก ์ธ ์ ์๋ ๋ต์ ์ป๋๋ค.
|
|
6
|
+
ํ์ ํ๋: ์ชฝ์ ๋๊ธฐ๋ฉฐ ๋ค ์์์ ๊ณ ์น๊ธฐ ์ ํ ์ง๋ฌธ์ ๋น๊ตํ๊ณ , ์๊ธฐ ์ฃผ์ ๋ฅผ ์
๋ ฅํด ์์ฑ๋ ์ง๋ฌธ์ ๋ณต์ฌํด ์จ ๋ณธ๋ค. ํ์ธ ๋ฌธ์ ๋ก ์์์ ์ญํ ์ ์ค์ค๋ก ์ ๊ฒํ๋ค.
|
|
7
|
+
์๋: ์ง๋ฌธ ์์๋ฅผ ์ธ์ฐ๊ธฐ๋ณด๋ค ๋ง์ฐํ ์ง๋ฌธ์ ์ง์ ๊ณ ์ณ ๋ณด๊ฒ ํ๋ค. ํ์ธ ๋ฌธ์ ๋ ์๊ฐ ํ์ธ์ด๊ณ ์ฑ์ ํ์ง ์๋๋ค.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// ์กฐ๋ฆฝํ ํ์ต ์๋ฃ(core/lesson.js buildLesson ๊ฒฐ๊ณผ)์ ํ๋ฉด ์์๋ก. ์ฌ๋ผ์ด๋ HTML์ ๊ฐ์ ๋ชจ๋ core/engine.js๊ฐ ์ด์ค์ผ์ดํํ๋ค.
|
|
2
|
+
|
|
3
|
+
/** ์๋ฃ ํ(#lesson) + ์ฌ๋ผ์ด๋. ์๋ณธ ๋์์ธ(ui/design.css)์ด ์ฝ๋ data-* ์์ฑ์ ๋ถ์ธ๋ค */
|
|
4
|
+
export function mountLesson(lesson) {
|
|
5
|
+
const el = document.createElement('div');
|
|
6
|
+
el.id = 'lesson';
|
|
7
|
+
const { attrs } = lesson;
|
|
8
|
+
el.dataset.title = attrs.title;
|
|
9
|
+
el.dataset.header = attrs.header;
|
|
10
|
+
el.dataset.hright = attrs.hright;
|
|
11
|
+
el.dataset.bg = attrs.bg;
|
|
12
|
+
if (attrs.single) el.dataset.single = 'true';
|
|
13
|
+
if (attrs.key) el.style.setProperty('--key', attrs.key);
|
|
14
|
+
if (lesson.title) el.setAttribute('aria-label', lesson.title);
|
|
15
|
+
const template = document.createElement('template');
|
|
16
|
+
// ํ ์์ง์ด ๋ง๋ ๊ธ: ๋ด์ฉ ๊ฐ์ ๋ชจ๋ ์ด์ค์ผ์ดํ๋จ (core/engine.js fmt ยท escapeHtml)
|
|
17
|
+
// ecdk-ignore-next-line sec.html-injection
|
|
18
|
+
template.innerHTML = lesson.slides.map(s => s.html).join('\n');
|
|
19
|
+
for (const s of template.content.querySelectorAll('section.slide')) s.hidden = true;
|
|
20
|
+
el.append(template.content);
|
|
21
|
+
return el;
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// core/engine.js ํ์
(ํธ์ง๊ธฐ ์๋์์ฑ ยท ํ
์คํธ์ฉ). engine.js์ ๊ฐ์ด ๊ณ ์นฉ๋๋ค.
|
|
2
|
+
|
|
3
|
+
export type TemplateNode =
|
|
4
|
+
| ['t', string]
|
|
5
|
+
| ['r', string]
|
|
6
|
+
| ['v', string]
|
|
7
|
+
| ['a', string]
|
|
8
|
+
| ['p', string]
|
|
9
|
+
| ['s', string, boolean, TemplateNode[]];
|
|
10
|
+
|
|
11
|
+
/** ํ ๊ธ โ ๋
ธ๋ ๋ชฉ๋ก (๋ซ๋ ํ๊ทธ๊ฐ ๋ง์ง ์์ผ๋ฉด ์ค๋ฅ) */
|
|
12
|
+
export declare function parse(src: string): TemplateNode[];
|
|
13
|
+
/** ๊ฐ์ด ์๋์ง (์์ ยท false ยท '' ยท [] ยท {}๋ ์์) */
|
|
14
|
+
export declare function truthy(v: unknown): boolean;
|
|
15
|
+
export declare function escapeHtml(s: unknown, quote?: boolean): string;
|
|
16
|
+
/** ๋ณธ๋ฌธ ์์: ์ด์ค์ผ์ดํ ยท [[๋ณ์]] ยท **๊ฐ์กฐ** ยท `์ฝ๋` ยท ์ค๋ฐ๊ฟ ยท ์ค ๋ ๋ ๊ธ์ ๋ฌถ๊ธฐ */
|
|
17
|
+
export declare function fmt(v: unknown, vars?: Record<string, string>): string;
|
|
18
|
+
/** ํ ๋
ธ๋์ ๊ฐ์ ์ฑ์ด HTML ๊ธ */
|
|
19
|
+
export declare function render(
|
|
20
|
+
nodes: TemplateNode[],
|
|
21
|
+
ctx: Record<string, unknown>,
|
|
22
|
+
env?: { partials?: Record<string, TemplateNode[]>; vars?: Record<string, string> }
|
|
23
|
+
): string;
|