@aiyiran/myclaw 1.1.201 → 1.1.202

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 (35) hide show
  1. package/assets/myclaw-artifacts.js +2 -1
  2. package/package.json +1 -1
  3. package/publish.sh +6 -1
  4. package/skills/yiran-playground-template-use/SKILL.md +1 -0
  5. package/skills/yiran-playground-template-use/prompts/single-html-handoff.txt +23 -0
  6. package/skills/yiran-playground-template-use/scripts/deploy_to_workspace.py +11 -5
  7. package/skills/yiran-course-template-pipeline/README.md +0 -132
  8. package/skills/yiran-course-template-pipeline/SKILL.md +0 -74
  9. package/skills/yiran-course-template-pipeline/assets/a100-teacher.example.html +0 -66
  10. package/skills/yiran-course-template-pipeline/assets/student-template.html +0 -77
  11. package/skills/yiran-course-template-pipeline/assets/teacher-portrait-demo.html +0 -105
  12. package/skills/yiran-course-template-pipeline/assets/teacher-task-view.html +0 -110
  13. package/skills/yiran-course-template-pipeline/prompts//350/257/204/344/273/267/347/202/271/345/255/220.md +0 -107
  14. package/skills/yiran-course-template-pipeline/prompts//351/230/266/346/256/2651-demo/347/224/237/346/210/220.md +0 -121
  15. package/skills/yiran-course-template-pipeline/prompts//351/230/266/346/256/2652-student/347/224/237/346/210/220.md +0 -115
  16. package/skills/yiran-course-template-pipeline/prompts//351/230/266/346/256/2653-teacher/347/224/237/346/210/220.md +0 -144
  17. 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 +0 -130
  18. package/skills/yiran-course-template-pipeline/references/student-example.json +0 -38
  19. package/skills/yiran-course-template-pipeline/references/student-fields.md +0 -195
  20. package/skills/yiran-course-template-pipeline/references/student-scaffold.json +0 -34
  21. package/skills/yiran-course-template-pipeline/references/teacher-fields.md +0 -271
  22. package/skills/yiran-course-template-pipeline/references/teacher-scaffold.json +0 -25
  23. package/skills/yiran-course-template-pipeline/scripts/build_template_index.py +0 -150
  24. package/skills/yiran-course-template-pipeline/scripts/build_template_views.py +0 -132
  25. package/skills/yiran-course-template-pipeline/scripts/identify_template.py +0 -174
  26. package/skills/yiran-course-template-pipeline/scripts/migrate_templates.py +0 -104
  27. package/skills/yiran-course-template-pipeline/scripts/move_template_task.py +0 -107
  28. package/skills/yiran-course-template-pipeline/scripts/publish_template.py +0 -131
  29. package/skills/yiran-course-template-pipeline/scripts/release_template.py +0 -84
  30. package/skills/yiran-course-template-pipeline/scripts/render_student_page.py +0 -66
  31. package/skills/yiran-course-template-pipeline/scripts/render_teacher_view.py +0 -108
  32. package/skills/yiran-course-template-pipeline/template-index.json +0 -671
  33. package/skills/yiran-course-template-pipeline/template-index.md +0 -246
  34. package/skills/yiran-course-template-pipeline//344/270/232/345/212/241/350/203/214/346/231/257.md +0 -81
  35. package/skills/yiran-course-template-pipeline//345/272/237/345/274/203/rewrite_html_refs.py +0 -102
@@ -2905,7 +2905,8 @@
2905
2905
 
2906
2906
  rightHeader.appendChild(infoSpan);
2907
2907
  rightHeader.appendChild(openNewBtn);
2908
- previewIframe.src = TEMPLATE_CDN_BASE + '/' + encodeURIComponent(tpl['文件夹名']) + '/' + (tpl['version'] || 'v1') + '/__student-view__.html';
2908
+ var previewFile = tpl['预览文件'] || (tpl['模板格式'] === 'single-html' ? 'index.html' : '__student-view__.html');
2909
+ previewIframe.src = TEMPLATE_CDN_BASE + '/' + encodeURIComponent(tpl['文件夹名']) + '/' + (tpl['version'] || 'v1') + '/' + encodeURIComponent(previewFile);
2909
2910
  }
2910
2911
 
2911
2912
  row.onclick = setActive;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiyiran/myclaw",
3
- "version": "1.1.201",
3
+ "version": "1.1.202",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
package/publish.sh CHANGED
@@ -28,7 +28,12 @@ fi
28
28
 
29
29
  # 3. 自动更新最小版本号 (npm version patch 会自动再做一个改 package.json 的 commit 并且打上 Tag)
30
30
  echo "📈 增加 Patch 版本号..."
31
- npm version patch
31
+ if [ "$GIT_MODE" = true ]; then
32
+ npm version patch
33
+ else
34
+ # 普通发布不提交、不打 Git Tag,也允许当前工作区保留待提交修改。
35
+ npm version patch --no-git-tag-version
36
+ fi
32
37
 
33
38
  # 4. 发布到 npm
34
39
  echo "🚀 优先发布到 npm 仓库..."
@@ -89,6 +89,7 @@ python3 scripts/deploy_to_workspace.py <template_path> <workspace_path> --with-t
89
89
  - `scripts/deploy_to_workspace.py`:对外 workspace 投放脚本
90
90
  - `scripts/run_playgrounds_flow.py`:对外 playgrounds 一条龙脚本
91
91
  - `prompts/remix-handoff.txt`:交接提示词模板
92
+ - `prompts/single-html-handoff.txt`:单 HTML 模板的自动阅读与业务理解提示词
92
93
 
93
94
  ## 索引维护
94
95
 
@@ -0,0 +1,23 @@
1
+ 这是一个刚刚创建的网页模板项目。请先完整阅读当前项目文件,理解页面的业务背景和已有功能,再开始和我对话。
2
+
3
+ 项目文件夹路径:
4
+ {{FOLDER_REL_PATH}}
5
+
6
+ 网页入口文件:
7
+ {{ENTRY_REL_PATH}}
8
+
9
+ ---
10
+
11
+ ## 你的第一步
12
+
13
+ 1. 阅读入口 HTML 的结构、页面文案、样式和 JavaScript 交互。
14
+ 2. 结合页面内容,判断这个网页是做什么的、服务什么场景、用户如何使用。
15
+ 3. 检查 HTML 是否引用了同目录的其他资源;如果资源缺失,请明确指出,但先不要自行补造。
16
+ 4. 暂时不要修改任何文件,也不要直接重写代码,等待我提出具体需求。
17
+
18
+ 阅读完成后,请先简洁告诉我:
19
+
20
+ 1. 你对这个网页业务背景的理解。
21
+ 2. 当前页面已经具备哪些主要功能和交互。
22
+ 3. 当前项目是否存在缺失资源或明显运行风险。
23
+ 4. 你已经准备好,可以根据我的下一条要求继续修改。
@@ -102,6 +102,7 @@ def register_instance_files(workspace: Path, target_dir: Path):
102
102
  _register_file(artifacts_path, workspace_id, rel)
103
103
 
104
104
  PROMPT_TEMPLATE_PATH = Path(__file__).resolve().parent.parent / 'prompts' / 'remix-handoff.txt'
105
+ SIMPLE_HTML_PROMPT_TEMPLATE_PATH = Path(__file__).resolve().parent.parent / 'prompts' / 'single-html-handoff.txt'
105
106
 
106
107
 
107
108
  def fail(payload, code=1):
@@ -156,10 +157,15 @@ def build_instance_name(source_dir: Path, remix_dir: Path):
156
157
  return candidate
157
158
 
158
159
 
159
- def build_message(folder_rel_path: str, entry_rel_path: str):
160
- if not PROMPT_TEMPLATE_PATH.exists():
161
- fail({'ok': False, 'error': 'prompt_template_not_found', 'path': str(PROMPT_TEMPLATE_PATH)})
162
- prompt_template = PROMPT_TEMPLATE_PATH.read_text(encoding='utf-8')
160
+ def build_message(folder_rel_path: str, entry_rel_path: str, target_dir: Path):
161
+ is_course_package = (
162
+ (target_dir / '__student__.json').is_file()
163
+ and (target_dir / '__teacher__.json').is_file()
164
+ )
165
+ prompt_path = PROMPT_TEMPLATE_PATH if is_course_package else SIMPLE_HTML_PROMPT_TEMPLATE_PATH
166
+ if not prompt_path.exists():
167
+ fail({'ok': False, 'error': 'prompt_template_not_found', 'path': str(prompt_path)})
168
+ prompt_template = prompt_path.read_text(encoding='utf-8')
163
169
  return prompt_template.replace('{{FOLDER_REL_PATH}}', folder_rel_path).replace('{{ENTRY_REL_PATH}}', entry_rel_path)
164
170
 
165
171
 
@@ -190,7 +196,7 @@ def main():
190
196
  if do_tui:
191
197
  if not agent:
192
198
  fail({'ok': False, 'error': 'workspace_agent_not_inferable', 'message': 'workspace 路径必须形如 workspace-xxx,才能启用 --with-tui'})
193
- message = build_message(folder_rel_path, entry_rel_path)
199
+ message = build_message(folder_rel_path, entry_rel_path, target_dir)
194
200
  result = run(['mc', 'tui', agent, '--session', instance_name, '--message', message])
195
201
  if result.returncode != 0:
196
202
  fail({'ok': False, 'error': 'mc_tui_failed', 'agent': agent, 'session': instance_name, 'details': result.stderr or result.stdout})
@@ -1,132 +0,0 @@
1
- # 课程模板流水线 Skill
2
-
3
- 这个 skill 面向中文课堂的小专题课程设计流程。
4
-
5
- 它的目标不是只生成某一个页面,而是把一个“题目灵感 / 设计角度”逐步变成一整套可用的课程任务文件。
6
-
7
- ---
8
-
9
- 业务背景请统一参考:
10
- `业务背景.md`
11
-
12
- ---
13
-
14
- # 当前工作流
15
-
16
- ## 阶段一:灵感 -> demo 页面
17
- 最开始输入的是:
18
- - 题目灵感
19
- - 设计角度
20
- - 课堂上的切入想法
21
-
22
- 这一阶段最重要的事情是:
23
- **先做出 __demo__.html(效果演示页)**
24
-
25
- 阶段一到阶段三的产物,统一放在:
26
- **当前工作目录下新建的 `任务名称/` 文件夹里。**
27
-
28
- 也就是说:
29
- - 不先放到 templates
30
- - 不先放到 skill 目录根部
31
- - 而是在当前工作目录里,先建立一个任务临时文件夹,再往里写 `__demo__.html`、`__student__.json`、`__teacher__.json`
32
-
33
- ---
34
-
35
- ## 阶段二:生成 __student__.json
36
- 这一阶段不要求一定已经有 __teacher__.json。
37
- 这一阶段甚至不要求一定已经有完整作品。
38
-
39
- 这一阶段的核心目标是:
40
- **先把学生任务的步骤和评价结构 JSON 确立下来。**
41
-
42
- 对应输出:
43
- `__student__.json`
44
-
45
- ---
46
-
47
- ## 阶段三:生成 __teacher__.json
48
- 在 __student__.json 已经明确后,再整理教师侧信息。
49
-
50
- 这一阶段的核心目标是:
51
- **明确题目设计目的、训练重点、适合学生类型,以及老师上课时如何判断和引导。**
52
-
53
- 对应输出:
54
- `__teacher__.json`
55
-
56
- ---
57
-
58
- ## 阶段四:JSON -> HTML,并按目录打包
59
- 第4阶段现在拆成两个脚本:
60
-
61
- ### 1)build_template_views.py
62
- 校验通过后,在原文件夹中直接生成:
63
- - `__student-view__.html`
64
- - `__teacher-view__.html`
65
- - `index.html`
66
-
67
- 其中 `index.html` 采用固定脚本规则:
68
- - 只展示两块内容
69
- - 左边是“评价目标”
70
- - 右边是“步骤”
71
- - 不显示任务标题
72
- - 不显示一句话说明
73
- - 不再依赖临时提示词拼装
74
- - 统一由脚本直接根据 `__student__.json` 渲染
75
-
76
- ### 2)move_template_task.py
77
- 在页面已经生成好的前提下,把整个文件夹移动到:
78
- `yiran-playground-template-use` skill 的 `templates/`
79
-
80
- 同时按规则改名,例如:
81
- `a100_给依然老师设计一个AI画像`
82
-
83
- 并且:
84
- **move 成功后会自动触发 `yiran-playground-template-use` 的索引重建。**
85
-
86
- ---
87
-
88
- # 当前目录结构
89
-
90
- - `SKILL.md`:技能总说明
91
- - `prompts/阶段1-demo生成.md`:如何把灵感先做成 demo 页面
92
- - `prompts/阶段2-student生成.md`:如何生成 __student__.json
93
- - `prompts/阶段3-teacher生成.md`:如何生成 __teacher__.json
94
- - `prompts/阶段4-打包落盘.md`:如何组织文件并调用第4阶段脚本
95
- - `scripts/render_teacher_view.py`:把 __teacher__.json 渲染成教师查看页
96
- - `scripts/render_student_page.py`:把 __student__.json 渲染成学生页
97
- - `scripts/build_template_views.py`:在原目录生成 __student-view__.html 和 __teacher-view__.html
98
- - `scripts/move_template_task.py`:移动整个任务文件夹到 templates 并改名,同时自动重建索引
99
- - `references/teacher-fields.md`:教师侧字段设计与标签规则说明
100
- - `references/student-fields.md`:学生侧字段说明
101
- - `references/student-example.json`:学生侧 JSON 示例
102
- - `references/student-scaffold.json`:学生侧 JSON 脚手架
103
- - `references/teacher-scaffold.json`:教师侧 JSON 脚手架
104
- - `assets/student-template.html`:独立学生页模板
105
- - 模板库和搜索索引统一维护在 `yiran-playground-template-use` skill 中
106
-
107
- ---
108
-
109
- # 模板索引
110
-
111
- 模板库和索引统一维护在 `yiran-playground-template-use` skill 中。
112
-
113
- `move_template_task.py` 成功执行后会自动触发索引重建。如需手动重建,在 `yiran-playground-template-use` skill 中运行:
114
-
115
- ```bash
116
- python3 scripts/build_template_index.py
117
- ```
118
-
119
- ---
120
-
121
- # 核心原则
122
-
123
- 1. 先有灵感,再做 demo,再定 __student__.json,再定 __teacher__.json
124
- 2. 阶段一到三的产物,统一放在当前工作目录下新建的任务文件夹里
125
- 3. __student__.json 先解决学生任务结构
126
- 4. __teacher__.json 再解决题目设计目的与教师判断
127
- 5. 第4阶段拆成 build 和 move 两个独立脚本
128
- 6. templates 作为 skill 的资产目录统一维护
129
- 7. 模板有变化后,要重新构建索引
130
- 8. demo 中的媒体资源优先使用 CDN 链接,不使用本地相对路径;当前固定前缀为 `https://cdn.yiranlaoshi.com/yiran/workspace-ai-demo`,后面拼接资源相对路径
131
- 9. 模板负责布局,提示词负责填内容,脚本负责稳定输出
132
- 10. 所有内容优先服务中文课堂和小学生阅读场景
@@ -1,74 +0,0 @@
1
- ---
2
- name: yiran-course-template-pipeline
3
- description: 面向中文课堂的小专题课程模板流水线。适用于把一个题目灵感或设计角度,先生成 demo 页面,再先后整理成 __student__.json 和 __teacher__.json,最后通过脚本生成页面、整理目录、沉淀模板资产并构建模板索引。
4
- ---
5
-
6
- # 课程模板流水线
7
-
8
- 这个 skill 支持的是一条完整工作流,而不是单点产出。
9
-
10
-
11
- ## 四阶段流程
12
-
13
- ### 1)灵感 -> demo 页面
14
- 当用户先给出题目灵感、设计角度或课堂切入点时,优先生成 demo 页面。
15
-
16
- 这一阶段优先使用:
17
- - `prompts/阶段1-demo生成.md`
18
-
19
- ### 2)生成 __student__.json
20
- 这个阶段最重要的目标是:
21
- 先把学生任务的步骤和评价结构 JSON 确立下来。
22
-
23
- 这一阶段优先使用:
24
- - `prompts/阶段2-student生成.md`
25
- - `references/student-fields.md`
26
- - `references/student-example.json`
27
- - `references/student-scaffold.json`
28
-
29
- ### 3)生成 __teacher__.json
30
- 在 __student__.json 已经明确后,再整理教师侧信息。
31
-
32
- 这一阶段优先使用:
33
- - `prompts/阶段3-teacher生成.md`
34
- - `references/teacher-fields.md`
35
- - `references/teacher-scaffold.json`
36
-
37
- ### 阶段一到三的工作目录规则
38
- 阶段一到阶段三产出的文件,统一放在:
39
- **当前工作目录下新建的 `任务名称/` 文件夹里。**
40
-
41
- 也就是说,这几个中间产物先写在当前工作目录的任务文件夹内:
42
- - `__demo__.html`
43
- - `__student__.json`
44
- - `__teacher__.json`
45
-
46
- ### 4)JSON -> HTML,并按目录打包
47
- 第4阶段拆成三个独立脚本:
48
- - `scripts/build_template_views.py`
49
- - `scripts/move_template_task.py`
50
- - `scripts/publish_template.py`
51
-
52
- 其中:
53
- - build 负责在原目录生成 `__student-view__.html`、`__teacher-view__.html` 和 `index.html`
54
- - `index.html` 采用固定脚本规则:左边展示”评价目标”,右边展示”步骤”,不显示任务标题和一句话说明
55
- - move 负责把任务文件夹移动到 `yiran-playground-template-use` skill 的 `templates/`,并自动触发索引重建
56
- - publish 负责把模板文件夹内所有资源上传到七牛 CDN,并重写 HTML 中的资源引用为 CDN 绝对地址(见 `cdn-convention.md`)
57
-
58
- **推荐发布入口(内容确认后):**
59
- ```bash
60
- python3 scripts/release_template.py <模板目录>
61
- ```
62
- `release_template.py` 自动依次执行 build → move → publish,对新目录和已入库的 vN/ 目录均适用。
63
-
64
- ## 原则
65
-
66
- - 先做 demo
67
- - 再定 __student__.json
68
- - 再定 __teacher__.json
69
- - 阶段一到三先在当前工作目录的任务文件夹里完成
70
- - publish 脚本把模板文件夹内所有文件上传到 CDN,CDN 路径规则见 `prompts/阶段4-打包落盘.md`
71
- - 第4阶段拆成 build、move、publish 三个独立脚本
72
- - templates 作为 skill 的资产目录统一维护
73
- - 模板有变化后,要重新构建索引
74
- - 全部内容优先中文
@@ -1,66 +0,0 @@
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>
@@ -1,77 +0,0 @@
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
- .tips-block { margin-top: 16px; background: #fff; border-radius: 24px; padding: 22px; box-shadow: 0 10px 28px rgba(100,122,166,.12); }
29
- .tips-block h3 { margin: 0 0 14px; color: #334d98; font-size: 18px; }
30
- .tips-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
31
- .tip-item { background: #f8faff; border: 1px solid #e7eefc; border-radius: 16px; padding: 14px; }
32
- .tip-title { font-size: 14px; font-weight: 700; color: #334d98; margin-bottom: 8px; }
33
- .tip-desc { font-size: 13px; color: #60708b; line-height: 1.7; margin-bottom: 8px; }
34
- .tip-prompt { font-size: 12px; color: #4f5f7c; line-height: 1.8; background: #fff; border: 1px dashed #d6e2ff; border-radius: 12px; padding: 10px 12px; }
35
- iframe { width: 100%; height: 560px; border: 1px solid #dfe7fb; border-radius: 16px; background: #fff; display: block; }
36
- @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, .tips-block { padding: 14px; } .tips-list { grid-template-columns: 1fr; } iframe { height: 360px; } }
37
- </style>
38
- </head>
39
- <body>
40
- <div class="page">
41
- <header class="header-bar">
42
- <div class="header-left">
43
- <h1>{{任务标题}}</h1>
44
- <p class="subtitle">{{一句话说明}}</p>
45
- </div>
46
- </header>
47
- <div class="main-section">
48
- <section class="block">
49
- <div class="content-layout">
50
- <div class="task-panel">
51
- <div class="panel-group">
52
- <h3>步骤</h3>
53
- {{步骤区域}}
54
- </div>
55
- </div>
56
- <div class="sample-frame-wrap">
57
- <div class="sample-frame-head"><h3>{{示例区标题}}</h3></div>
58
- <iframe src="{{示例页面文件}}" title="{{示例区标题}}"></iframe>
59
- </div>
60
- <div class="goal-panel">
61
- <div class="panel-group">
62
- <h3>评价目标</h3>
63
- {{评价目标区域}}
64
- </div>
65
- </div>
66
- </div>
67
- </section>
68
- <section class="tips-block">
69
- <h3>小提示</h3>
70
- <div class="tips-list">
71
- {{小提示区域}}
72
- </div>
73
- </section>
74
- </div>
75
- </div>
76
- </body>
77
- </html>
@@ -1,105 +0,0 @@
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>