@aiyiran/myclaw 1.1.25 → 1.1.26

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.
Files changed (66) hide show
  1. package/.claude/settings.local.json +3 -1
  2. package/assets/myclaw-artifacts.js +8 -1
  3. package/package.json +1 -1
  4. package/patches/patch-manifest.json +10 -0
  5. package/skills/yiran-course-template-pipeline/README.md +127 -0
  6. package/skills/yiran-course-template-pipeline/SKILL.md +65 -0
  7. package/skills/yiran-course-template-pipeline/assets/a100-teacher.example.html +66 -0
  8. package/skills/yiran-course-template-pipeline/assets/student-template.html +64 -0
  9. package/skills/yiran-course-template-pipeline/assets/teacher-portrait-demo.html +105 -0
  10. package/skills/yiran-course-template-pipeline/assets/teacher-task-view.html +110 -0
  11. package/skills/yiran-course-template-pipeline/prompts//351/230/266/346/256/2651-demo/347/224/237/346/210/220.md +92 -0
  12. package/skills/yiran-course-template-pipeline/prompts//351/230/266/346/256/2652-student/347/224/237/346/210/220.md +115 -0
  13. package/skills/yiran-course-template-pipeline/prompts//351/230/266/346/256/2653-teacher/347/224/237/346/210/220.md +131 -0
  14. package/skills/yiran-course-template-pipeline/prompts//351/230/266/346/256/2654-/346/211/223/345/214/205/350/220/275/347/233/230.md +77 -0
  15. package/skills/yiran-course-template-pipeline/references/student-example.json +38 -0
  16. package/skills/yiran-course-template-pipeline/references/student-fields.md +195 -0
  17. package/skills/yiran-course-template-pipeline/references/student-scaffold.json +34 -0
  18. package/skills/yiran-course-template-pipeline/references/teacher-fields.md +265 -0
  19. package/skills/yiran-course-template-pipeline/references/teacher-scaffold.json +25 -0
  20. package/skills/yiran-course-template-pipeline/scripts/build_template_views.py +125 -0
  21. package/skills/yiran-course-template-pipeline/scripts/move_template_task.py +59 -0
  22. package/skills/yiran-course-template-pipeline/scripts/render_student_page.py +52 -0
  23. package/skills/yiran-course-template-pipeline/scripts/render_teacher_view.py +108 -0
  24. package/skills/yiran-playground-template-use/SKILL.md +105 -0
  25. package/skills/yiran-playground-template-use/prompts/remix-handoff.txt +11 -0
  26. package/skills/yiran-playground-template-use/scripts/build_template_index.py +103 -0
  27. package/skills/yiran-playground-template-use/scripts/deploy_template.py +34 -0
  28. package/skills/yiran-playground-template-use/scripts/deploy_to_workspace.py +211 -0
  29. package/skills/yiran-playground-template-use/scripts/prepare_playgrounds.py +39 -0
  30. package/skills/yiran-playground-template-use/scripts/query_template.py +171 -0
  31. package/skills/yiran-playground-template-use/scripts/run_playgrounds_flow.py +44 -0
  32. package/skills/yiran-playground-template-use/scripts/start_tui_handoff.py +77 -0
  33. package/skills/yiran-playground-template-use/search-agent-prompt.md +39 -0
  34. package/skills/yiran-playground-template-use/template-index.json +136 -0
  35. package/skills/yiran-playground-template-use/template-index.md +38 -0
  36. package/skills/yiran-playground-template-use/templates/a100_/347/273/231/344/276/235/347/204/266/350/200/201/345/270/210/350/256/276/350/256/241/344/270/200/344/270/252AI/347/224/273/345/203/217/__demo__.html +140 -0
  37. package/skills/yiran-playground-template-use/templates/a100_/347/273/231/344/276/235/347/204/266/350/200/201/345/270/210/350/256/276/350/256/241/344/270/200/344/270/252AI/347/224/273/345/203/217/__student-view__.html +64 -0
  38. package/skills/yiran-playground-template-use/templates/a100_/347/273/231/344/276/235/347/204/266/350/200/201/345/270/210/350/256/276/350/256/241/344/270/200/344/270/252AI/347/224/273/345/203/217/__student__.json +38 -0
  39. package/skills/yiran-playground-template-use/templates/a100_/347/273/231/344/276/235/347/204/266/350/200/201/345/270/210/350/256/276/350/256/241/344/270/200/344/270/252AI/347/224/273/345/203/217/__teacher-view__.html +52 -0
  40. package/skills/yiran-playground-template-use/templates/a100_/347/273/231/344/276/235/347/204/266/350/200/201/345/270/210/350/256/276/350/256/241/344/270/200/344/270/252AI/347/224/273/345/203/217/__teacher__.json +36 -0
  41. package/skills/yiran-playground-template-use/templates/a100_/347/273/231/344/276/235/347/204/266/350/200/201/345/270/210/350/256/276/350/256/241/344/270/200/344/270/252AI/347/224/273/345/203/217/index.html +61 -0
  42. package/skills/yiran-playground-template-use/templates/a101_/345/201/2323/345/274/240/345/220/214/344/270/273/351/242/230/345/233/276/347/211/207/__demo__.html +131 -0
  43. package/skills/yiran-playground-template-use/templates/a101_/345/201/2323/345/274/240/345/220/214/344/270/273/351/242/230/345/233/276/347/211/207/__student-view__.html +64 -0
  44. package/skills/yiran-playground-template-use/templates/a101_/345/201/2323/345/274/240/345/220/214/344/270/273/351/242/230/345/233/276/347/211/207/__student__.json +34 -0
  45. package/skills/yiran-playground-template-use/templates/a101_/345/201/2323/345/274/240/345/220/214/344/270/273/351/242/230/345/233/276/347/211/207/__teacher-view__.html +52 -0
  46. package/skills/yiran-playground-template-use/templates/a101_/345/201/2323/345/274/240/345/220/214/344/270/273/351/242/230/345/233/276/347/211/207/__teacher__.json +34 -0
  47. package/skills/yiran-playground-template-use/templates/a103_/345/201/232/344/270/200/344/270/252/344/273/213/347/273/215/351/241/265/351/235/242/__demo__.html +77 -0
  48. package/skills/yiran-playground-template-use/templates/a103_/345/201/232/344/270/200/344/270/252/344/273/213/347/273/215/351/241/265/351/235/242/__student-view__.html +64 -0
  49. package/skills/yiran-playground-template-use/templates/a103_/345/201/232/344/270/200/344/270/252/344/273/213/347/273/215/351/241/265/351/235/242/__student__.json +38 -0
  50. package/skills/yiran-playground-template-use/templates/a103_/345/201/232/344/270/200/344/270/252/344/273/213/347/273/215/351/241/265/351/235/242/__teacher-view__.html +52 -0
  51. package/skills/yiran-playground-template-use/templates/a103_/345/201/232/344/270/200/344/270/252/344/273/213/347/273/215/351/241/265/351/235/242/__teacher__.json +34 -0
  52. package/skills/yiran-playground-template-use/templates/b100_/345/201/232/344/270/200/344/270/252/346/214/211/351/222/256/351/241/265/351/235/242/__demo__.html +162 -0
  53. package/skills/yiran-playground-template-use/templates/b100_/345/201/232/344/270/200/344/270/252/346/214/211/351/222/256/351/241/265/351/235/242/__student-view__.html +64 -0
  54. package/skills/yiran-playground-template-use/templates/b100_/345/201/232/344/270/200/344/270/252/346/214/211/351/222/256/351/241/265/351/235/242/__student__.json +34 -0
  55. package/skills/yiran-playground-template-use/templates/b100_/345/201/232/344/270/200/344/270/252/346/214/211/351/222/256/351/241/265/351/235/242/__teacher-view__.html +52 -0
  56. package/skills/yiran-playground-template-use/templates/b100_/345/201/232/344/270/200/344/270/252/346/214/211/351/222/256/351/241/265/351/235/242/__teacher__.json +34 -0
  57. package/skills/yiran-playground-template-use/templates/c100_/347/273/231/345/260/217/347/273/204/344/275/234/345/223/201/345/201/232/344/270/200/346/254/241/345/260/217/344/277/256/346/224/271/__demo__.html +180 -0
  58. package/skills/yiran-playground-template-use/templates/c100_/347/273/231/345/260/217/347/273/204/344/275/234/345/223/201/345/201/232/344/270/200/346/254/241/345/260/217/344/277/256/346/224/271/__student-view__.html +64 -0
  59. package/skills/yiran-playground-template-use/templates/c100_/347/273/231/345/260/217/347/273/204/344/275/234/345/223/201/345/201/232/344/270/200/346/254/241/345/260/217/344/277/256/346/224/271/__student__.json +38 -0
  60. package/skills/yiran-playground-template-use/templates/c100_/347/273/231/345/260/217/347/273/204/344/275/234/345/223/201/345/201/232/344/270/200/346/254/241/345/260/217/344/277/256/346/224/271/__teacher-view__.html +52 -0
  61. package/skills/yiran-playground-template-use/templates/c100_/347/273/231/345/260/217/347/273/204/344/275/234/345/223/201/345/201/232/344/270/200/346/254/241/345/260/217/344/277/256/346/224/271/__teacher__.json +41 -0
  62. package/skills/yiran-playground-template-use/templates/c100_/347/273/231/345/260/217/347/273/204/344/275/234/345/223/201/345/201/232/344/270/200/346/254/241/345/260/217/344/277/256/346/224/271/demo.html +180 -0
  63. package/skills/yiran-playground-template-use/templates/c100_/347/273/231/345/260/217/347/273/204/344/275/234/345/223/201/345/201/232/344/270/200/346/254/241/345/260/217/344/277/256/346/224/271/index.html +121 -0
  64. package/skills/yiran-playground-template-use/templates/c100_/347/273/231/345/260/217/347/273/204/344/275/234/345/223/201/345/201/232/344/270/200/346/254/241/345/260/217/344/277/256/346/224/271//345/260/217/347/273/204/345/220/211/347/245/245/347/211/251_26.png +0 -0
  65. package/skills/yiran-playground-template-use/templates/c100_/347/273/231/345/260/217/347/273/204/344/275/234/345/223/201/345/201/232/344/270/200/346/254/241/345/260/217/344/277/256/346/224/271//345/260/217/347/273/204/345/233/276/345/275/242/346/240/207/345/277/227_83.png +0 -0
  66. package/skills/yiran-playground-template-use/templates/c100_/347/273/231/345/260/217/347/273/204/344/275/234/345/223/201/345/201/232/344/270/200/346/254/241/345/260/217/344/277/256/346/224/271//347/217/255/347/272/247/345/260/217/347/273/204/345/276/275/347/253/240_47.png +0 -0
@@ -43,7 +43,9 @@
43
43
  "Bash(pkill -f \"deploy_to_workspace.py\")",
44
44
  "Bash(pkill -f \"prepare_playgrounds.py\" pkill -f \"run_playgrounds_flow.py\" pkill -f \"mc new playgrounds\" sleep 1 ps aux)",
45
45
  "Bash(mc new *)",
46
- "Bash(echo \"exit code: $?\")"
46
+ "Bash(echo \"exit code: $?\")",
47
+ "Bash(grep -r \"api/history/file\\\\|api/history\" /Users/yiran/.openclaw/workspace-yiranclaw/myclaw --include=\"*.js\" --include=\"*.py\" 2>/dev/null | head -20)",
48
+ "Bash(cp -r ~/.openclaw/skills/yiran-playground-template-use /Users/yiran/.openclaw/workspace-yiranclaw/myclaw/skills/ && cp -r ~/.openclaw/skills/yiran-course-template-pipeline /Users/yiran/.openclaw/workspace-yiranclaw/myclaw/skills/ && ls /Users/yiran/.openclaw/workspace-yiranclaw/myclaw/skills/)"
47
49
  ]
48
50
  }
49
51
  }
@@ -792,7 +792,14 @@
792
792
  'background: #fff',
793
793
  ].join(';');
794
794
 
795
- iframe.src = previewUrl + '?t=' + Date.now();
795
+ // 文本类文件走本地 server(已有 charset=utf-8),避免 CDN charset 导致中文乱码
796
+ var assetExt = (asset.path || '').split('.').pop().toLowerCase();
797
+ var TEXT_EXTS = ['md', 'txt', 'py', 'js', 'ts', 'jsx', 'tsx', 'css', 'json', 'yaml', 'yml', 'sh', 'xml', 'ini', 'toml', 'env', 'vue', 'csv'];
798
+ if (TEXT_EXTS.indexOf(assetExt) !== -1) {
799
+ iframe.src = MYCLAW_API_BASE + '/api/file?path=' + encodeURIComponent(getWorkspaceId() + '/' + asset.path) + '&t=' + Date.now();
800
+ } else {
801
+ iframe.src = previewUrl + '?t=' + Date.now();
802
+ }
796
803
 
797
804
  box.appendChild(iframe);
798
805
  overlay.appendChild(box);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiyiran/myclaw",
3
- "version": "1.1.25",
3
+ "version": "1.1.26",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -17,6 +17,16 @@
17
17
  "name": "yiran-skill-media",
18
18
  "strategy": "on",
19
19
  "description": "统一多媒体生成 skill(图片+音乐,主备切换)"
20
+ },
21
+ {
22
+ "name": "yiran-playground-template-use",
23
+ "strategy": "on",
24
+ "description": "AI Playground 课程模板库(存储、搜索、deploy 一条龙)"
25
+ },
26
+ {
27
+ "name": "yiran-course-template-pipeline",
28
+ "strategy": "on",
29
+ "description": "课程模板制作流水线(demo -> student/teacher JSON -> HTML 打包)"
20
30
  }
21
31
  ],
22
32
  "_doc_agents": "Step 3: 将 agent-list/ 下的智能体分发到 ~/.openclaw/ 并注册到 openclaw.json",
@@ -0,0 +1,127 @@
1
+ # 课程模板流水线 Skill
2
+
3
+ 这个 skill 面向中文课堂的小专题课程设计流程。
4
+
5
+ 它的目标不是只生成某一个页面,而是把一个“题目灵感 / 设计角度”逐步变成一整套可用的课程任务文件。
6
+
7
+ ---
8
+
9
+ # 当前工作流
10
+
11
+ ## 阶段一:灵感 -> demo 页面
12
+ 最开始输入的是:
13
+ - 题目灵感
14
+ - 设计角度
15
+ - 课堂上的切入想法
16
+
17
+ 这一阶段最重要的事情是:
18
+ **先做出 __demo__.html(效果演示页)**
19
+
20
+ 阶段一到阶段三的产物,统一放在:
21
+ **当前工作目录下新建的 `任务名称/` 文件夹里。**
22
+
23
+ 也就是说:
24
+ - 不先放到 templates
25
+ - 不先放到 skill 目录根部
26
+ - 而是在当前工作目录里,先建立一个任务临时文件夹,再往里写 `__demo__.html`、`__student__.json`、`__teacher__.json`
27
+
28
+ ---
29
+
30
+ ## 阶段二:生成 __student__.json
31
+ 这一阶段不要求一定已经有 __teacher__.json。
32
+ 这一阶段甚至不要求一定已经有完整作品。
33
+
34
+ 这一阶段的核心目标是:
35
+ **先把学生任务的步骤和评价结构 JSON 确立下来。**
36
+
37
+ 对应输出:
38
+ `__student__.json`
39
+
40
+ ---
41
+
42
+ ## 阶段三:生成 __teacher__.json
43
+ 在 __student__.json 已经明确后,再整理教师侧信息。
44
+
45
+ 这一阶段的核心目标是:
46
+ **明确题目设计目的、训练重点、适合学生类型,以及老师上课时如何判断和引导。**
47
+
48
+ 对应输出:
49
+ `__teacher__.json`
50
+
51
+ ---
52
+
53
+ ## 阶段四:JSON -> HTML,并按目录打包
54
+ 第4阶段现在拆成两个脚本:
55
+
56
+ ### 1)build_template_views.py
57
+ 校验通过后,在原文件夹中直接生成:
58
+ - `__student-view__.html`
59
+ - `__teacher-view__.html`
60
+ - `index.html`
61
+
62
+ 其中 `index.html` 采用固定脚本规则:
63
+ - 只展示两块内容
64
+ - 左边是“评价目标”
65
+ - 右边是“步骤”
66
+ - 不显示任务标题
67
+ - 不显示一句话说明
68
+ - 不再依赖临时提示词拼装
69
+ - 统一由脚本直接根据 `__student__.json` 渲染
70
+
71
+ ### 2)move_template_task.py
72
+ 在页面已经生成好的前提下,把整个文件夹移动到:
73
+ `yiran-playground-template-use` skill 的 `templates/`
74
+
75
+ 同时按规则改名,例如:
76
+ `a100_给依然老师设计一个AI画像`
77
+
78
+ 并且:
79
+ **move 成功后会自动触发 `yiran-playground-template-use` 的索引重建。**
80
+
81
+ ---
82
+
83
+ # 当前目录结构
84
+
85
+ - `SKILL.md`:技能总说明
86
+ - `prompts/阶段1-demo生成.md`:如何把灵感先做成 demo 页面
87
+ - `prompts/阶段2-student生成.md`:如何生成 __student__.json
88
+ - `prompts/阶段3-teacher生成.md`:如何生成 __teacher__.json
89
+ - `prompts/阶段4-打包落盘.md`:如何组织文件并调用第4阶段脚本
90
+ - `scripts/render_teacher_view.py`:把 __teacher__.json 渲染成教师查看页
91
+ - `scripts/render_student_page.py`:把 __student__.json 渲染成学生页
92
+ - `scripts/build_template_views.py`:在原目录生成 __student-view__.html 和 __teacher-view__.html
93
+ - `scripts/move_template_task.py`:移动整个任务文件夹到 templates 并改名,同时自动重建索引
94
+ - `references/teacher-fields.md`:教师侧字段设计与标签规则说明
95
+ - `references/student-fields.md`:学生侧字段说明
96
+ - `references/student-example.json`:学生侧 JSON 示例
97
+ - `references/student-scaffold.json`:学生侧 JSON 脚手架
98
+ - `references/teacher-scaffold.json`:教师侧 JSON 脚手架
99
+ - `assets/student-template.html`:独立学生页模板
100
+ - 模板库和搜索索引统一维护在 `yiran-playground-template-use` skill 中
101
+
102
+ ---
103
+
104
+ # 模板索引
105
+
106
+ 模板库和索引统一维护在 `yiran-playground-template-use` skill 中。
107
+
108
+ `move_template_task.py` 成功执行后会自动触发索引重建。如需手动重建,在 `yiran-playground-template-use` skill 中运行:
109
+
110
+ ```bash
111
+ python3 scripts/build_template_index.py
112
+ ```
113
+
114
+ ---
115
+
116
+ # 核心原则
117
+
118
+ 1. 先有灵感,再做 demo,再定 __student__.json,再定 __teacher__.json
119
+ 2. 阶段一到三的产物,统一放在当前工作目录下新建的任务文件夹里
120
+ 3. __student__.json 先解决学生任务结构
121
+ 4. __teacher__.json 再解决题目设计目的与教师判断
122
+ 5. 第4阶段拆成 build 和 move 两个独立脚本
123
+ 6. templates 作为 skill 的资产目录统一维护
124
+ 7. 模板有变化后,要重新构建索引
125
+ 8. demo 中的媒体资源优先使用 CDN 链接,不使用本地相对路径;当前固定前缀为 `https://cdn.yiranlaoshi.com/yiran/workspace-ai-demo`,后面拼接资源相对路径
126
+ 9. 模板负责布局,提示词负责填内容,脚本负责稳定输出
127
+ 10. 所有内容优先服务中文课堂和小学生阅读场景
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: yiran-course-template-pipeline
3
+ description: 面向中文课堂的小专题课程模板流水线。适用于把一个题目灵感或设计角度,先生成 demo 页面,再先后整理成 __student__.json 和 __teacher__.json,最后通过脚本生成页面、整理目录、沉淀模板资产并构建模板索引。
4
+ ---
5
+
6
+ # 课程模板流水线
7
+
8
+ 这个 skill 支持的是一条完整工作流,而不是单点产出。
9
+
10
+ ## 四阶段流程
11
+
12
+ ### 1)灵感 -> demo 页面
13
+ 当用户先给出题目灵感、设计角度或课堂切入点时,优先生成 demo 页面。
14
+
15
+ 这一阶段优先使用:
16
+ - `prompts/阶段1-demo生成.md`
17
+
18
+ ### 2)生成 __student__.json
19
+ 这个阶段最重要的目标是:
20
+ 先把学生任务的步骤和评价结构 JSON 确立下来。
21
+
22
+ 这一阶段优先使用:
23
+ - `prompts/阶段2-student生成.md`
24
+ - `references/student-fields.md`
25
+ - `references/student-example.json`
26
+ - `references/student-scaffold.json`
27
+
28
+ ### 3)生成 __teacher__.json
29
+ 在 __student__.json 已经明确后,再整理教师侧信息。
30
+
31
+ 这一阶段优先使用:
32
+ - `prompts/阶段3-teacher生成.md`
33
+ - `references/teacher-fields.md`
34
+ - `references/teacher-scaffold.json`
35
+
36
+ ### 阶段一到三的工作目录规则
37
+ 阶段一到阶段三产出的文件,统一放在:
38
+ **当前工作目录下新建的 `任务名称/` 文件夹里。**
39
+
40
+ 也就是说,这几个中间产物先写在当前工作目录的任务文件夹内:
41
+ - `__demo__.html`
42
+ - `__student__.json`
43
+ - `__teacher__.json`
44
+
45
+ ### 4)JSON -> HTML,并按目录打包
46
+ 第4阶段拆成两个独立脚本:
47
+ - `scripts/build_template_views.py`
48
+ - `scripts/move_template_task.py`
49
+
50
+ 其中:
51
+ - build 负责在原目录生成 `__student-view__.html`、`__teacher-view__.html` 和 `index.html`
52
+ - `index.html` 采用固定脚本规则:左边展示“评价目标”,右边展示“步骤”,不显示任务标题和一句话说明
53
+ - move 负责把任务文件夹移动到 `yiran-playground-template-use` skill 的 `templates/`,并自动触发索引重建
54
+
55
+ ## 原则
56
+
57
+ - 先做 demo
58
+ - 再定 __student__.json
59
+ - 再定 __teacher__.json
60
+ - 阶段一到三先在当前工作目录的任务文件夹里完成
61
+ - demo 中的媒体资源优先使用 CDN 链接,不使用本地相对路径;当前固定前缀为 `https://cdn.yiranlaoshi.com/yiran/workspace-ai-demo`,后面拼接资源相对路径
62
+ - 第4阶段拆成 build 和 move 两个独立脚本
63
+ - templates 作为 skill 的资产目录统一维护
64
+ - 模板有变化后,要重新构建索引
65
+ - 全部内容优先中文
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>A100 · 给依然老师设计一个AI画像</title>
7
+ <style>
8
+ * { box-sizing: border-box; }
9
+ body { margin: 0; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: #f4f7fb; color: #24324a; }
10
+ .page { max-width: 1200px; margin: 0 auto; padding: 20px; }
11
+ .hero { background: linear-gradient(135deg,#5f82ff 0%,#8c74ff 100%); color: #fff; border-radius: 24px; padding: 22px 24px; box-shadow: 0 16px 36px rgba(92,108,192,.22); }
12
+ .hero h1 { margin: 0; font-size: 28px; }
13
+ .hero p { margin: 8px 0 0; opacity: .92; font-size: 14px; }
14
+ .view { margin-top: 18px; display: grid; gap: 16px; }
15
+ .top { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; }
16
+ .card { background: #fff; border: 1px solid #e7eefc; border-radius: 20px; padding: 18px; box-shadow: 0 10px 24px rgba(100,122,166,.08); }
17
+ .card h2 { margin: 0 0 12px; font-size: 18px; color: #314a96; }
18
+ .meta-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
19
+ .meta-item { background: #f8faff; border: 1px solid #e7eefc; border-radius: 14px; padding: 12px; }
20
+ .meta-item .label { font-size: 12px; color: #7a89ad; margin-bottom: 6px; }
21
+ .meta-item .value { font-size: 14px; color: #24324a; font-weight: 700; }
22
+ .tags { display: flex; flex-wrap: wrap; gap: 8px; }
23
+ .tag { display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 999px; background: #edf2ff; color: #4c65c3; font-size: 13px; font-weight: 700; }
24
+ .section-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
25
+ .list { display: grid; gap: 10px; }
26
+ .list-item { background: #f8faff; border: 1px solid #e7eefc; border-radius: 14px; padding: 12px; line-height: 1.7; font-size: 14px; color: #60708b; }
27
+ .issue { border-left: 4px solid #8c74ff; background: #faf8ff; }
28
+ .issue strong { color: #314a96; display: block; margin: 6px 0; }
29
+ @media (max-width: 900px) { .top, .section-grid, .meta-grid { grid-template-columns: 1fr; } }
30
+ </style>
31
+ </head>
32
+ <body>
33
+ <div class="page">
34
+ <section class="hero">
35
+ <h1>A100 · 给依然老师设计一个AI画像</h1>
36
+ <p>这是根据教师 JSON 自动生成的可视化查看页,方便老师快速扫读与判断。</p>
37
+ </section>
38
+
39
+ <section class="view">
40
+ <div class="top">
41
+ <div class="card">
42
+ <h2>基础信息</h2>
43
+ <div class="meta-grid">
44
+ <div class="meta-item"><div class="label">主能力标签</div><div class="value">表达构建</div></div>
45
+ <div class="meta-item"><div class="label">任务类型标签</div><div class="value">视听表达</div></div>
46
+ </div>
47
+ </div>
48
+ <div class="card">
49
+ <h2>适合学生类型</h2>
50
+ <div class="tags"><span class="tag">初次接触</span><span class="tag">需要明确目标</span><span class="tag">持续迭代</span></div>
51
+ </div>
52
+ </div>
53
+
54
+ <div class="section-grid">
55
+ <div class="card"><h2>训练重点</h2><div class="list"><div class="list-item">围绕明确对象生成形象</div><div class="list-item">把人物图片放进网页中完成展示</div><div class="list-item">通过小幅修改让作品逐步变好</div></div></div>
56
+ <div class="card"><h2>可拓展方向</h2><div class="list"><div class="list-item">给画像加背景音乐</div><div class="list-item">加入点击切换不同版本画像</div><div class="list-item">给人物加一句语音介绍</div></div></div>
57
+ </div>
58
+
59
+ <div class="section-grid">
60
+ <div class="card"><h2>卡点和解决方案</h2><div class="list"><div class="list-item issue"><strong>卡点</strong>学生不知道要画谁,描述很泛<strong>解决方案</strong>先让学生说清楚对象是谁,再从发型、衣服、表情这些具体点开始描述</div><div class="list-item issue"><strong>卡点</strong>学生一次改太多,看不出变化<strong>解决方案</strong>提醒学生每次只改一个地方,比如先改头发,再改表情</div></div></div>
61
+ <div class="card"><h2>课后作业</h2><div class="list"><div class="list-item">回家把老师画像再优化一版,至少改一个地方,并说明你改了什么</div><div class="list-item">给网页再加入一张新版本图片,展示前后变化</div></div></div>
62
+ </div>
63
+ </section>
64
+ </div>
65
+ </body>
66
+ </html>
@@ -0,0 +1,64 @@
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>{{任务标题}}</title>
7
+ <style>
8
+ * { box-sizing: border-box; }
9
+ body { margin: 0; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: #f4f7fb; color: #24324a; }
10
+ .page { max-width: 1440px; margin: 0 auto; padding: 20px 20px 48px; }
11
+ .header-bar { background: linear-gradient(135deg,#5f82ff 0%,#8c74ff 100%); border-radius: 24px; padding: 20px 24px; box-shadow: 0 16px 36px rgba(92,108,192,.24); }
12
+ .header-left h1 { margin: 0; font-size: 26px; line-height: 1.3; color: #fff; font-weight: 800; }
13
+ .header-left .subtitle { margin: 8px 0 0; font-size: 13px; line-height: 1.8; color: rgba(255,255,255,.88); }
14
+ .main-section { margin-top: 18px; }
15
+ .block { background: #fff; border-radius: 24px; padding: 22px; box-shadow: 0 10px 28px rgba(100,122,166,.12); }
16
+ .content-layout { display: grid; grid-template-columns: 220px minmax(0,1fr) 220px; gap: 14px; align-items: stretch; }
17
+ .task-panel, .goal-panel { background: #f8faff; border: 1px solid #e7eefc; border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
18
+ .panel-group h3 { margin: 0 0 10px; color: #334d98; font-size: 17px; }
19
+ .task-item { margin-bottom: 10px; }
20
+ .task-item:last-child { margin-bottom: 0; }
21
+ .item-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: #7a89ad; }
22
+ .item-body { background: #fff; border: 1px solid #e7eefc; border-radius: 12px; padding: 10px 12px; font-size: 13px; color: #60708b; line-height: 1.7; }
23
+ .task-item .num { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: #edf2ff; color: #7a89ad; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
24
+ .star-item .num { background: #fff7dc; color: #b89a4f; }
25
+ .sample-frame-wrap { background: #f8faff; border: 1px solid #e7eefc; border-radius: 20px; padding: 14px; min-width: 0; }
26
+ .sample-frame-head { display: flex; justify-content: flex-start; align-items: center; gap: 10px; margin-bottom: 12px; }
27
+ .sample-frame-head h3 { margin: 0; color: #334d98; font-size: 17px; }
28
+ iframe { width: 100%; height: 560px; border: 1px solid #dfe7fb; border-radius: 16px; background: #fff; display: block; }
29
+ @media (max-width: 960px) { .page { padding: 14px 12px 32px; } .header-bar { padding: 16px 18px; } .header-left h1 { font-size: 22px; } .header-left .subtitle { font-size: 12px; } .content-layout { grid-template-columns: 1fr; } .task-panel, .goal-panel, .sample-frame-wrap { padding: 14px; } iframe { height: 360px; } }
30
+ </style>
31
+ </head>
32
+ <body>
33
+ <div class="page">
34
+ <header class="header-bar">
35
+ <div class="header-left">
36
+ <h1>{{任务标题}}</h1>
37
+ <p class="subtitle">{{一句话说明}}</p>
38
+ </div>
39
+ </header>
40
+ <div class="main-section">
41
+ <section class="block">
42
+ <div class="content-layout">
43
+ <div class="task-panel">
44
+ <div class="panel-group">
45
+ <h3>步骤</h3>
46
+ {{步骤区域}}
47
+ </div>
48
+ </div>
49
+ <div class="sample-frame-wrap">
50
+ <div class="sample-frame-head"><h3>{{示例区标题}}</h3></div>
51
+ <iframe src="{{示例页面文件}}" title="{{示例区标题}}"></iframe>
52
+ </div>
53
+ <div class="goal-panel">
54
+ <div class="panel-group">
55
+ <h3>评价目标</h3>
56
+ {{评价目标区域}}
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </section>
61
+ </div>
62
+ </div>
63
+ </body>
64
+ </html>
@@ -0,0 +1,105 @@
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>小专题模板 Demo</title>
7
+ <style>
8
+ * { box-sizing: border-box; }
9
+ body { margin: 0; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: #f4f7fb; color: #24324a; }
10
+ .page { max-width: 1440px; margin: 0 auto; padding: 20px 20px 48px; }
11
+ .header-bar { background: linear-gradient(135deg, #5f82ff 0%, #8c74ff 100%); border-radius: 24px; padding: 20px 24px; box-shadow: 0 16px 36px rgba(92, 108, 192, 0.24); }
12
+ .header-left h1 { margin: 0; font-size: 26px; line-height: 1.3; color: #fff; font-weight: 800; }
13
+ .header-left .subtitle { margin: 8px 0 0; font-size: 13px; line-height: 1.8; color: rgba(255,255,255,0.88); }
14
+ .main-section { margin-top: 18px; display: grid; gap: 18px; }
15
+ .block, .teacher-section { background: #fff; border-radius: 24px; padding: 22px; box-shadow: 0 10px 28px rgba(100, 122, 166, 0.12); }
16
+ .content-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr) 220px; gap: 14px; align-items: stretch; }
17
+ .task-panel, .goal-panel { background: #f8faff; border: 1px solid #e7eefc; border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
18
+ .panel-group h3 { margin: 0 0 10px; color: #334d98; font-size: 17px; }
19
+ .task-item { margin-bottom: 10px; }
20
+ .task-item:last-child { margin-bottom: 0; }
21
+ .item-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: #7a89ad; }
22
+ .item-body { background: #fff; border: 1px solid #e7eefc; border-radius: 12px; padding: 10px 12px; font-size: 13px; color: #60708b; line-height: 1.7; }
23
+ .task-item .num { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: #edf2ff; color: #7a89ad; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
24
+ .star-item .num { background: #fff7dc; color: #b89a4f; }
25
+ .sample-frame-wrap { background: #f8faff; border: 1px solid #e7eefc; border-radius: 20px; padding: 14px; min-width: 0; }
26
+ .sample-frame-head { display: flex; justify-content: flex-start; align-items: center; gap: 10px; margin-bottom: 12px; }
27
+ .sample-frame-head h3 { margin: 0; color: #334d98; font-size: 17px; }
28
+ iframe { width: 100%; height: 560px; border: 1px solid #dfe7fb; border-radius: 16px; background: #fff; display: block; }
29
+ .block-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
30
+ .block-title h2 { margin: 0; font-size: 24px; color: #2d438c; }
31
+ .badge { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
32
+ .badge-teacher { background: #f1edff; color: #7156c8; }
33
+ .teacher-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
34
+ .teacher-card { background: #f8faff; border: 1px solid #e7eefc; border-radius: 18px; padding: 16px; }
35
+ .teacher-card h3 { margin: 0 0 8px; color: #334d98; font-size: 16px; }
36
+ .teacher-card p, .teacher-card li { margin: 0; color: #60708b; line-height: 1.85; font-size: 13px; }
37
+ .teacher-card ul { padding-left: 18px; margin: 0; }
38
+ .teacher-note { margin-top: 14px; background: #f6f8ff; border: 1px dashed #cfdcff; border-radius: 18px; padding: 14px 16px; }
39
+ .teacher-note h3 { margin: 0 0 7px; color: #334d98; font-size: 16px; }
40
+ .teacher-note p { margin: 0; color: #60708b; line-height: 1.85; font-size: 13px; }
41
+ .footer-note { margin-top: 12px; text-align: center; font-size: 13px; color: #7a879f; }
42
+ @media (max-width: 960px) {
43
+ .page { padding: 14px 12px 32px; }
44
+ .header-bar { padding: 16px 18px; }
45
+ .header-left h1 { font-size: 22px; }
46
+ .header-left .subtitle { font-size: 12px; white-space: normal; }
47
+ .content-layout, .teacher-grid { grid-template-columns: 1fr; }
48
+ .task-panel, .goal-panel, .sample-frame-wrap, .teacher-section { padding: 14px; }
49
+ iframe { height: 360px; }
50
+ }
51
+ </style>
52
+ </head>
53
+ <body>
54
+ <div class="page">
55
+ <header class="header-bar">
56
+ <div class="header-left">
57
+ <h1>【任务标题】</h1>
58
+ <p class="subtitle">【一句话任务说明:先做什么,再放到网页里,重点练什么】</p>
59
+ </div>
60
+ </header>
61
+
62
+ <div class="main-section">
63
+ <section class="block">
64
+ <div class="content-layout">
65
+ <div class="task-panel">
66
+ <div class="panel-group">
67
+ <h3>步骤</h3>
68
+ <div class="task-item"><div class="item-top"><span class="num">1</span><span>【步骤短标题】</span></div><div class="item-body">【学生真正要读的简短说明】</div></div>
69
+ <div class="task-item"><div class="item-top"><span class="num">2</span><span>【步骤短标题】</span></div><div class="item-body">【学生真正要读的简短说明】</div></div>
70
+ <div class="task-item"><div class="item-top"><span class="num">3</span><span>【步骤短标题】</span></div><div class="item-body">【学生真正要读的简短说明】</div></div>
71
+ <div class="task-item"><div class="item-top"><span class="num">4</span><span>【步骤短标题】</span></div><div class="item-body">【学生真正要读的简短说明】</div></div>
72
+ </div>
73
+ </div>
74
+
75
+ <div class="sample-frame-wrap">
76
+ <div class="sample-frame-head"><h3>示范样例</h3></div>
77
+ <iframe src="./example.html" title="示范样例"></iframe>
78
+ </div>
79
+
80
+ <div class="goal-panel">
81
+ <div class="panel-group">
82
+ <h3>评价目标</h3>
83
+ <div class="task-item star-item"><div class="item-top"><span class="num">★</span><span>一星</span></div><div class="item-body">【完成最基础的一步】</div></div>
84
+ <div class="task-item star-item"><div class="item-top"><span class="num">★★</span><span>二星</span></div><div class="item-body">【比基础要求再多完成一点】</div></div>
85
+ <div class="task-item star-item"><div class="item-top"><span class="num">★★★</span><span>三星</span></div><div class="item-body">【完成进阶挑战,展示更多变化】</div></div>
86
+ </div>
87
+ </div>
88
+ </div>
89
+ </section>
90
+ </div>
91
+
92
+ <section class="teacher-section">
93
+ <div class="block-title"><h2>下半区:给老师看</h2><span class="badge badge-teacher">教师区</span></div>
94
+ <div class="teacher-grid">
95
+ <div class="teacher-card"><h3>为什么这样设计</h3><p>上半区直接给学生使用,文字短,结构清楚,中间样例突出。</p></div>
96
+ <div class="teacher-card"><h3>模板使用原则</h3><p>只把学生真正需要阅读的内容放到白卡片里,编号和星级放在卡片外面,做出主次关系。</p></div>
97
+ <div class="teacher-card"><h3>上半区写法</h3><p>步骤和评价目标都要短句化,面向小学生,避免长句和抽象词。</p></div>
98
+ <div class="teacher-card"><h3>示例区原则</h3><p>中间 iframe 永远是视觉中心,具体项目案例放在 example.html 或外部链接里。</p></div>
99
+ </div>
100
+ <div class="teacher-note"><h3>模板提示</h3><p>后续换专题时,优先替换任务标题、一句话说明、步骤、评价目标和 iframe 地址,不要先改结构。</p></div>
101
+ <div class="footer-note">这个文件已经同步了新的上半区结构,可作为后续模板继续复用。</div>
102
+ </section>
103
+ </div>
104
+ </body>
105
+ </html>
@@ -0,0 +1,110 @@
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>教师任务查看页</title>
7
+ <style>
8
+ * { box-sizing: border-box; }
9
+ body { margin: 0; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: #f4f7fb; color: #24324a; }
10
+ .page { max-width: 1200px; margin: 0 auto; padding: 20px; }
11
+ .hero { background: linear-gradient(135deg,#5f82ff 0%,#8c74ff 100%); color: #fff; border-radius: 24px; padding: 22px 24px; box-shadow: 0 16px 36px rgba(92,108,192,.22); }
12
+ .hero h1 { margin: 0; font-size: 28px; }
13
+ .hero p { margin: 8px 0 0; opacity: .92; font-size: 14px; }
14
+ .toolbar { margin-top: 16px; display: grid; gap: 12px; }
15
+ textarea { width: 100%; min-height: 240px; border: 1px solid #d9e2fb; border-radius: 16px; padding: 14px; font-size: 13px; line-height: 1.7; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #fff; color: #24324a; }
16
+ button { width: fit-content; border: none; border-radius: 999px; background: #5f82ff; color: #fff; padding: 10px 18px; font-size: 14px; font-weight: 700; cursor: pointer; }
17
+ .view { margin-top: 18px; display: grid; gap: 16px; }
18
+ .top { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; }
19
+ .card { background: #fff; border: 1px solid #e7eefc; border-radius: 20px; padding: 18px; box-shadow: 0 10px 24px rgba(100,122,166,.08); }
20
+ .card h2 { margin: 0 0 12px; font-size: 18px; color: #314a96; }
21
+ .meta-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
22
+ .meta-item { background: #f8faff; border: 1px solid #e7eefc; border-radius: 14px; padding: 12px; }
23
+ .meta-item .label { font-size: 12px; color: #7a89ad; margin-bottom: 6px; }
24
+ .meta-item .value { font-size: 14px; color: #24324a; font-weight: 700; }
25
+ .tags { display: flex; flex-wrap: wrap; gap: 8px; }
26
+ .tag { display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 999px; background: #edf2ff; color: #4c65c3; font-size: 13px; font-weight: 700; }
27
+ .section-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
28
+ .list { display: grid; gap: 10px; }
29
+ .list-item { background: #f8faff; border: 1px solid #e7eefc; border-radius: 14px; padding: 12px; line-height: 1.7; font-size: 14px; color: #60708b; }
30
+ .issue { border-left: 4px solid #8c74ff; background: #faf8ff; }
31
+ .issue strong { color: #314a96; display: block; margin-bottom: 6px; }
32
+ @media (max-width: 900px) {
33
+ .top, .section-grid, .meta-grid { grid-template-columns: 1fr; }
34
+ }
35
+ </style>
36
+ </head>
37
+ <body>
38
+ <div class="page">
39
+ <section class="hero">
40
+ <h1>教师任务查看页</h1>
41
+ <p>把结构化 JSON 粘贴进来,就能渲染成给老师快速扫读的可视化页面。</p>
42
+ </section>
43
+
44
+ <section class="toolbar">
45
+ <textarea id="jsonInput">{
46
+ "任务类别": "A",
47
+ "任务编号": "100",
48
+ "任务名称": "给依然老师设计一个AI画像",
49
+ "主能力标签": "表达构建",
50
+ "任务类型标签": "视听表达",
51
+ "适合学生类型": ["初次接触", "需要明确目标", "持续迭代"],
52
+ "训练重点": ["围绕明确对象生成形象", "把人物图片放进网页中完成展示", "通过小幅修改让作品逐步变好"],
53
+ "卡点和解决方案": [
54
+ {"卡点": "学生不知道要画谁,描述很泛", "解决方案": "先说清楚对象是谁,再从发型、衣服、表情这些具体点开始描述"},
55
+ {"卡点": "学生一次改太多,看不出变化", "解决方案": "提醒学生每次只改一个地方,比如先改头发,再改表情"}
56
+ ],
57
+ "可拓展方向": ["给画像加背景音乐", "加入点击切换不同版本画像", "给人物加一句语音介绍"],
58
+ "课后作业": ["回家把老师画像再优化一版,至少改一个地方,并说明你改了什么", "给网页再加入一张新版本图片,展示前后变化"]
59
+ }</textarea>
60
+ <button onclick="renderView()">渲染教师页</button>
61
+ </section>
62
+
63
+ <section class="view" id="view"></section>
64
+ </div>
65
+
66
+ <script>
67
+ function renderList(arr = []) {
68
+ return `<div class="list">${arr.map(item => `<div class="list-item">${item}</div>`).join('')}</div>`;
69
+ }
70
+ function renderIssues(arr = []) {
71
+ return `<div class="list">${arr.map(item => `<div class="list-item issue"><strong>卡点</strong>${item.卡点 || ''}<strong>解决方案</strong>${item.解决方案 || ''}</div>`).join('')}</div>`;
72
+ }
73
+ function renderTags(arr = []) {
74
+ return `<div class="tags">${arr.map(item => `<span class="tag">${item}</span>`).join('')}</div>`;
75
+ }
76
+ function renderView() {
77
+ const view = document.getElementById('view');
78
+ try {
79
+ const data = JSON.parse(document.getElementById('jsonInput').value);
80
+ view.innerHTML = `
81
+ <div class="top">
82
+ <div class="card">
83
+ <h2>${data.任务类别 || ''}${data.任务编号 || ''} · ${data.任务名称 || ''}</h2>
84
+ <div class="meta-grid">
85
+ <div class="meta-item"><div class="label">主能力标签</div><div class="value">${data.主能力标签 || '—'}</div></div>
86
+ <div class="meta-item"><div class="label">任务类型标签</div><div class="value">${data.任务类型标签 || '—'}</div></div>
87
+ </div>
88
+ </div>
89
+ <div class="card">
90
+ <h2>适合学生类型</h2>
91
+ ${renderTags(data.适合学生类型 || [])}
92
+ </div>
93
+ </div>
94
+ <div class="section-grid">
95
+ <div class="card"><h2>训练重点</h2>${renderList(data.训练重点 || [])}</div>
96
+ <div class="card"><h2>可拓展方向</h2>${renderList(data.可拓展方向 || [])}</div>
97
+ </div>
98
+ <div class="section-grid">
99
+ <div class="card"><h2>卡点和解决方案</h2>${renderIssues(data['卡点和解决方案'] || [])}</div>
100
+ <div class="card"><h2>课后作业</h2>${renderList(data.课后作业 || [])}</div>
101
+ </div>
102
+ `;
103
+ } catch (err) {
104
+ view.innerHTML = `<div class="card"><h2>JSON 解析失败</h2><div class="list-item">${err.message}</div></div>`;
105
+ }
106
+ }
107
+ renderView();
108
+ </script>
109
+ </body>
110
+ </html>