@aiyiran/myclaw 1.1.24 → 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 (83) hide show
  1. package/.claude/settings.local.json +25 -1
  2. package/assets/myclaw-artifacts.js +1070 -126
  3. package/assets/myclaw-inject.js +913 -121
  4. package/delete_agents.js +268 -0
  5. package/index.js +361 -20
  6. package/package.json +1 -1
  7. package/patches/patch-manifest.json +10 -0
  8. package/server/sync_workspace.py +444 -14
  9. package/skills/yiran-course-template-pipeline/README.md +127 -0
  10. package/skills/yiran-course-template-pipeline/SKILL.md +65 -0
  11. package/skills/yiran-course-template-pipeline/assets/a100-teacher.example.html +66 -0
  12. package/skills/yiran-course-template-pipeline/assets/student-template.html +64 -0
  13. package/skills/yiran-course-template-pipeline/assets/teacher-portrait-demo.html +105 -0
  14. package/skills/yiran-course-template-pipeline/assets/teacher-task-view.html +110 -0
  15. package/skills/yiran-course-template-pipeline/prompts//351/230/266/346/256/2651-demo/347/224/237/346/210/220.md +92 -0
  16. package/skills/yiran-course-template-pipeline/prompts//351/230/266/346/256/2652-student/347/224/237/346/210/220.md +115 -0
  17. package/skills/yiran-course-template-pipeline/prompts//351/230/266/346/256/2653-teacher/347/224/237/346/210/220.md +131 -0
  18. 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
  19. package/skills/yiran-course-template-pipeline/references/student-example.json +38 -0
  20. package/skills/yiran-course-template-pipeline/references/student-fields.md +195 -0
  21. package/skills/yiran-course-template-pipeline/references/student-scaffold.json +34 -0
  22. package/skills/yiran-course-template-pipeline/references/teacher-fields.md +265 -0
  23. package/skills/yiran-course-template-pipeline/references/teacher-scaffold.json +25 -0
  24. package/skills/yiran-course-template-pipeline/scripts/build_template_views.py +125 -0
  25. package/skills/yiran-course-template-pipeline/scripts/move_template_task.py +59 -0
  26. package/skills/yiran-course-template-pipeline/scripts/render_student_page.py +52 -0
  27. package/skills/yiran-course-template-pipeline/scripts/render_teacher_view.py +108 -0
  28. package/skills/yiran-playground-template-use/SKILL.md +105 -0
  29. package/skills/yiran-playground-template-use/prompts/remix-handoff.txt +11 -0
  30. package/skills/yiran-playground-template-use/scripts/build_template_index.py +103 -0
  31. package/skills/yiran-playground-template-use/scripts/deploy_template.py +34 -0
  32. package/skills/yiran-playground-template-use/scripts/deploy_to_workspace.py +211 -0
  33. package/skills/yiran-playground-template-use/scripts/prepare_playgrounds.py +39 -0
  34. package/skills/yiran-playground-template-use/scripts/query_template.py +171 -0
  35. package/skills/yiran-playground-template-use/scripts/run_playgrounds_flow.py +44 -0
  36. package/skills/yiran-playground-template-use/scripts/start_tui_handoff.py +77 -0
  37. package/skills/yiran-playground-template-use/search-agent-prompt.md +39 -0
  38. package/skills/yiran-playground-template-use/template-index.json +136 -0
  39. package/skills/yiran-playground-template-use/template-index.md +38 -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/__demo__.html +140 -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/__student-view__.html +64 -0
  42. 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
  43. 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
  44. 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
  45. 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
  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/__demo__.html +131 -0
  47. 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
  48. 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
  49. 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
  50. 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
  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/__demo__.html +77 -0
  52. 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
  53. 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
  54. 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
  55. 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
  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/__demo__.html +162 -0
  57. 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
  58. 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
  59. 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
  60. 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
  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/__demo__.html +180 -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/__student-view__.html +64 -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/__student__.json +38 -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/__teacher-view__.html +52 -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/__teacher__.json +41 -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/demo.html +180 -0
  67. 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
  68. 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
  69. 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
  70. 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
  71. package/skills/yiran-skill-media/SKILL.md +6 -15
  72. package/skills/yiran-skill-media/scripts/generate.py +47 -18
  73. package/skills/yiran-skill-media/scripts/generation_log.json +1 -56
  74. package/skills/yiran-skill-media/scripts/providers/__pycache__/__init__.cpython-311.pyc +0 -0
  75. package/skills/yiran-skill-media/scripts/providers/__pycache__/__init__.cpython-37.pyc +0 -0
  76. package/skills/yiran-skill-media/scripts/providers/__pycache__/jimeng_image.cpython-37.pyc +0 -0
  77. package/skills/yiran-skill-media/scripts/providers/__pycache__/jimeng_video.cpython-311.pyc +0 -0
  78. package/skills/yiran-skill-media/scripts/providers/__pycache__/jimeng_video.cpython-37.pyc +0 -0
  79. package/skills/yiran-skill-media/scripts/providers/__pycache__/minimax_image.cpython-37.pyc +0 -0
  80. package/skills/yiran-skill-media/scripts/providers/__pycache__/minimax_music.cpython-37.pyc +0 -0
  81. package/skills/yiran-skill-media/scripts/providers/__pycache__/minimax_video.cpython-311.pyc +0 -0
  82. package/skills/yiran-skill-media/scripts/providers/__pycache__/minimax_video.cpython-37.pyc +0 -0
  83. package/skills/yiran-skill-media/scripts/providers/__pycache__/vapi_image.cpython-37.pyc +0 -0
@@ -0,0 +1,52 @@
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>B003 · 做一个介绍页面</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: 1400px; 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
+ .layout { margin-top: 18px; display: grid; grid-template-columns: 360px minmax(0,1fr); gap: 16px; align-items: start; }
15
+ .sidebar { display: grid; gap: 16px; }
16
+ .card, .preview-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, .preview-head h2 { margin: 0 0 12px; font-size: 18px; color: #314a96; }
18
+ .meta-grid { display: grid; grid-template-columns: 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
+ .list { display: grid; gap: 10px; }
25
+ .list-item { background: #f8faff; border: 1px solid #e7eefc; border-radius: 14px; padding: 12px; line-height: 1.7; font-size: 14px; color: #60708b; }
26
+ .issue { border-left: 4px solid #8c74ff; background: #faf8ff; }
27
+ .issue strong { color: #314a96; display: block; margin: 6px 0; }
28
+ iframe { width: 100%; height: 900px; border: 1px solid #dfe7fb; border-radius: 16px; background: #fff; display: block; }
29
+ .empty-box { background: #f8faff; border: 1px dashed #cfdcff; border-radius: 14px; padding: 24px; color: #7a89ad; line-height: 1.8; }
30
+ @media (max-width: 960px) { .layout { grid-template-columns: 1fr; } iframe { height: 420px; } }
31
+ </style>
32
+ </head>
33
+ <body>
34
+ <div class="page">
35
+ <section class="hero">
36
+ <h1>B003 · 做一个介绍页面</h1>
37
+ <p>这是根据教师 JSON 自动生成的可视化查看页,左边快速扫读,右边直接看作品预览。</p>
38
+ </section>
39
+ <section class="layout">
40
+ <div class="sidebar">
41
+ <div class="card"><h2>基础信息</h2><div class="meta-grid"><div class="meta-item"><div class="label">主能力标签</div><div class="value">表达构建</div></div><div class="meta-item"><div class="label">任务类型标签</div><div class="value">视听表达</div></div></div></div>
42
+ <div class="card"><h2>适合学生类型</h2><div class="tags"><span class="tag">初次接触网页制作</span><span class="tag">有一点基础想练排版</span></div></div>
43
+ <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>
44
+ <div class="card"><h2>卡点和解决方案</h2><div class="list"><div class="list-item issue"><strong>卡点</strong>学生不知道图片和文字该放什么位置,感觉放哪里都不对。<strong>解决方案</strong>引导学生先&#x27;对半分&#x27;——左边图右边文,或者上图文下图,不要一开始就追求复杂排版,先把基本结构搭起来。</div><div class="list-item issue"><strong>卡点</strong>文字写得太长或太短,比例失调。<strong>解决方案</strong>告诉学生一个简单原则:图片大约占页面的 40%~60%,文字作为补充说明,一两句话就够了,不用写成作文。</div></div></div>
45
+ <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>
46
+ <div class="card"><h2>课后作业</h2><div class="list"><div class="list-item">回家后把自己的介绍页面发给爸妈或朋友,让他们点评:哪个地方最吸引你?哪个地方可以更好?把反馈记下来,下次上课一起讨论。</div></div></div>
47
+ </div>
48
+ <div class="preview-card empty"><div class="preview-head"><h2>作品预览</h2></div><div class="empty-box">当前文件夹下没有找到 example.html / index.html / preview.html</div></div>
49
+ </section>
50
+ </div>
51
+ </body>
52
+ </html>
@@ -0,0 +1,34 @@
1
+ {
2
+ "任务类别": "A",
3
+ "任务编号": "103",
4
+ "任务名称": "做一个介绍页面",
5
+ "主能力标签": "表达构建",
6
+ "任务类型标签": "视听表达",
7
+ "适合学生类型": [
8
+ "初次接触网页制作",
9
+ "有一点基础想练排版"
10
+ ],
11
+ "训练重点": [
12
+ "图片与文字的组合方式",
13
+ "网页结构的基本层次感",
14
+ "排版的视觉优先级"
15
+ ],
16
+ "卡点和解决方案": [
17
+ {
18
+ "卡点": "学生不知道图片和文字该放什么位置,感觉放哪里都不对。",
19
+ "解决方案": "引导学生先'对半分'——左边图右边文,或者上图文下图,不要一开始就追求复杂排版,先把基本结构搭起来。"
20
+ },
21
+ {
22
+ "卡点": "文字写得太长或太短,比例失调。",
23
+ "解决方案": "告诉学生一个简单原则:图片大约占页面的 40%~60%,文字作为补充说明,一两句话就够了,不用写成作文。"
24
+ }
25
+ ],
26
+ "可拓展方向": [
27
+ "加入更多内容块:比如加入兴趣标签、联系方式、荣誉墙等,变成多区块的综合介绍页。",
28
+ "做多页面版本:首页是概括,第二页是详细自我介绍,用链接跳转。",
29
+ "加入动画:图片入场动画、文字渐显,让页面更生动。"
30
+ ],
31
+ "课后作业": [
32
+ "回家后把自己的介绍页面发给爸妈或朋友,让他们点评:哪个地方最吸引你?哪个地方可以更好?把反馈记下来,下次上课一起讨论。"
33
+ ]
34
+ }
@@ -0,0 +1,162 @@
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
+ :root {
9
+ --bg-color: #0f172a;
10
+ --card-bg: rgba(30, 41, 59, 0.7);
11
+ --primary: #8b5cf6;
12
+ --primary-glow: rgba(139, 92, 246, 0.5);
13
+ --success: #10b981;
14
+ --text: #f8fafc;
15
+ }
16
+
17
+ * {
18
+ margin: 0;
19
+ padding: 0;
20
+ box-sizing: border-box;
21
+ }
22
+
23
+ body {
24
+ font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
25
+ background-color: var(--bg-color);
26
+ background-image:
27
+ radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
28
+ radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
29
+ color: var(--text);
30
+ display: flex;
31
+ justify-content: center;
32
+ align-items: center;
33
+ min-height: 100vh;
34
+ overflow: hidden;
35
+ }
36
+
37
+ .container {
38
+ text-align: center;
39
+ background: var(--card-bg);
40
+ backdrop-filter: blur(12px);
41
+ padding: 3rem;
42
+ border-radius: 2rem;
43
+ border: 1px solid rgba(255, 255, 255, 0.1);
44
+ box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
45
+ max-width: 400px;
46
+ width: 90%;
47
+ transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
48
+ }
49
+
50
+ h1 {
51
+ font-size: 1.5rem;
52
+ margin-bottom: 1rem;
53
+ letter-spacing: -0.025em;
54
+ }
55
+
56
+ .status-text {
57
+ border: 1px solid rgba(139, 92, 246, 0.5);
58
+ font-size: 1.1rem;
59
+ color: #94a3b8;
60
+ margin-bottom: 2.5rem;
61
+ height: 1.5rem;
62
+ transition: all 0.3s ease;
63
+ }
64
+
65
+ .main-button {
66
+ background: var(--primary);
67
+ color: white;
68
+ border: none;
69
+ padding: 1.2rem 2.5rem;
70
+ font-size: 1.2rem;
71
+ font-weight: 600;
72
+ border-radius: 1rem;
73
+ cursor: pointer;
74
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
75
+ position: relative;
76
+ overflow: hidden;
77
+ box-shadow: 0 0 20px var(--primary-glow);
78
+ }
79
+
80
+ .main-button:hover {
81
+ transform: scale(1.05);
82
+ filter: brightness(1.1);
83
+ box-shadow: 0 0 30px var(--primary-glow);
84
+ }
85
+
86
+ .main-button:active {
87
+ transform: scale(0.95);
88
+ }
89
+
90
+ /* 状态改变后的样式 */
91
+ body.active {
92
+ background-color: #020617;
93
+ }
94
+
95
+ body.active .container {
96
+ border-color: var(--success);
97
+ box-shadow: 0 0 40px rgba(16, 185, 129, 0.2);
98
+ }
99
+
100
+ body.active .main-button {
101
+ background: var(--success);
102
+ box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
103
+ }
104
+
105
+ body.active .status-text {
106
+ color: var(--success);
107
+ font-weight: bold;
108
+ }
109
+
110
+ /* 呼吸动画 */
111
+ @keyframes pulse {
112
+ 0% { transform: scale(1); opacity: 1; }
113
+ 50% { transform: scale(1.05); opacity: 0.8; }
114
+ 100% { transform: scale(1); opacity: 1; }
115
+ }
116
+
117
+ .animating {
118
+ animation: pulse 2s infinite ease-in-out;
119
+ }
120
+
121
+ /* 提示词角落 */
122
+ .hint {
123
+ position: fixed;
124
+ bottom: 20px;
125
+ font-size: 0.8rem;
126
+ opacity: 0.4;
127
+ }
128
+ </style>
129
+ </head>
130
+ <body>
131
+ <div class="container" id="app">
132
+ <h1 id="title">交互结构练习</h1>
133
+ <div class="status-text" id="status">等待指令中...</div>
134
+ <button class="main-button" id="btn" onclick="handleClick()">点我一下!</button>
135
+ </div>
136
+
137
+ <div class="hint">训练重点:点击事件 -> 数据变化 -> 视觉更新</div>
138
+
139
+ <script>
140
+ let isActive = false;
141
+
142
+ function handleClick() {
143
+ isActive = !isActive;
144
+ const btn = document.getElementById('btn');
145
+ const status = document.getElementById('status');
146
+ const body = document.body;
147
+
148
+ if (isActive) {
149
+ body.classList.add('active');
150
+ btn.innerText = '变色啦!';
151
+ status.innerText = '✨ 状态已激活 ✨';
152
+ btn.classList.add('animating');
153
+ } else {
154
+ body.classList.remove('active');
155
+ btn.innerText = '点我一下!';
156
+ status.innerText = '等待指令中...';
157
+ btn.classList.remove('animating');
158
+ }
159
+ }
160
+ </script>
161
+ </body>
162
+ </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
+ <div class="task-item"><div class="item-top"><span class="num">1</span><span>创造交互按钮</span></div><div class="item-body">在 HTML 里添加一个 button 按钮,并给它起个响亮的名字。</div></div><div class="task-item"><div class="item-top"><span class="num">2</span><span>美化按钮外表</span></div><div class="item-body">用 CSS 给按钮涂上喜欢的颜色,调整大小,让它看起来想让人点一下。</div></div><div class="task-item"><div class="item-top"><span class="num">3</span><span>编写交互灵魂</span></div><div class="item-body">编写一小段 JavaScript 代码,让按钮在被点击时能切换颜色和文字。</div></div>
47
+ </div>
48
+ </div>
49
+ <div class="sample-frame-wrap">
50
+ <div class="sample-frame-head"><h3>示范样例:神奇的互动按钮</h3></div>
51
+ <iframe src="demo.html" title="示范样例:神奇的互动按钮"></iframe>
52
+ </div>
53
+ <div class="goal-panel">
54
+ <div class="panel-group">
55
+ <h3>评价目标</h3>
56
+ <div class="task-item star-item"><div class="item-top"><span class="num">一星</span><span>一星</span></div><div class="item-body">页面上出现了一个完整的按钮,且排版正常。</div></div><div class="task-item star-item"><div class="item-top"><span class="num">二星</span><span>二星</span></div><div class="item-body">点击按钮后,页面的颜色或文字成功发生了改变。</div></div><div class="task-item star-item"><div class="item-top"><span class="num">三星</span><span>三星</span></div><div class="item-body">交互过程伴随平滑的过渡效果,点击反馈清晰且有趣。</div></div>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </section>
61
+ </div>
62
+ </div>
63
+ </body>
64
+ </html>
@@ -0,0 +1,34 @@
1
+ {
2
+ "任务标题": "做一个按钮页面",
3
+ "一句话说明": "亲手做一个会“变魔术”的按钮,学习网页是如何接收指令并产生变化的。",
4
+ "步骤": [
5
+ {
6
+ "标题": "创造交互按钮",
7
+ "说明": "在 HTML 里添加一个 button 按钮,并给它起个响亮的名字。"
8
+ },
9
+ {
10
+ "标题": "美化按钮外表",
11
+ "说明": "用 CSS 给按钮涂上喜欢的颜色,调整大小,让它看起来想让人点一下。"
12
+ },
13
+ {
14
+ "标题": "编写交互灵魂",
15
+ "说明": "编写一小段 JavaScript 代码,让按钮在被点击时能切换颜色和文字。"
16
+ }
17
+ ],
18
+ "评价目标": [
19
+ {
20
+ "等级": "一星",
21
+ "说明": "页面上出现了一个完整的按钮,且排版正常。"
22
+ },
23
+ {
24
+ "等级": "二星",
25
+ "说明": "点击按钮后,页面的颜色或文字成功发生了改变。"
26
+ },
27
+ {
28
+ "等级": "三星",
29
+ "说明": "交互过程伴随平滑的过渡效果,点击反馈清晰且有趣。"
30
+ }
31
+ ],
32
+ "示例区标题": "示范样例:神奇的互动按钮",
33
+ "示例页面文件": "__demo__.html"
34
+ }
@@ -0,0 +1,52 @@
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>B100 · 做一个按钮页面</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: 1400px; 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
+ .layout { margin-top: 18px; display: grid; grid-template-columns: 360px minmax(0,1fr); gap: 16px; align-items: start; }
15
+ .sidebar { display: grid; gap: 16px; }
16
+ .card, .preview-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, .preview-head h2 { margin: 0 0 12px; font-size: 18px; color: #314a96; }
18
+ .meta-grid { display: grid; grid-template-columns: 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
+ .list { display: grid; gap: 10px; }
25
+ .list-item { background: #f8faff; border: 1px solid #e7eefc; border-radius: 14px; padding: 12px; line-height: 1.7; font-size: 14px; color: #60708b; }
26
+ .issue { border-left: 4px solid #8c74ff; background: #faf8ff; }
27
+ .issue strong { color: #314a96; display: block; margin: 6px 0; }
28
+ iframe { width: 100%; height: 900px; border: 1px solid #dfe7fb; border-radius: 16px; background: #fff; display: block; }
29
+ .empty-box { background: #f8faff; border: 1px dashed #cfdcff; border-radius: 14px; padding: 24px; color: #7a89ad; line-height: 1.8; }
30
+ @media (max-width: 960px) { .layout { grid-template-columns: 1fr; } iframe { height: 420px; } }
31
+ </style>
32
+ </head>
33
+ <body>
34
+ <div class="page">
35
+ <section class="hero">
36
+ <h1>B100 · 做一个按钮页面</h1>
37
+ <p>这是根据教师 JSON 自动生成的可视化查看页,左边快速扫读,右边直接看作品预览。</p>
38
+ </section>
39
+ <section class="layout">
40
+ <div class="sidebar">
41
+ <div class="card"><h2>基础信息</h2><div class="meta-grid"><div class="meta-item"><div class="label">主能力标签</div><div class="value">表达构建</div></div><div class="meta-item"><div class="label">任务类型标签</div><div class="value">游戏机制</div></div></div></div>
42
+ <div class="card"><h2>适合学生类型</h2><div class="tags"><span class="tag">喜欢做项目</span><span class="tag">需要明确目标</span></div></div>
43
+ <div class="card"><h2>训练重点</h2><div class="list"><div class="list-item">掌握基础的 JavaScript 点击事件绑定</div><div class="list-item">理解 HTML/CSS/JS 三者如何协作完成交互</div><div class="list-item">学习利用 CSS Class 切换来实现视觉变化</div></div></div>
44
+ <div class="card"><h2>卡点和解决方案</h2><div class="list"><div class="list-item issue"><strong>卡点</strong>学生容易漏写 onclick 属性中的括号,导致函数不执行。<strong>解决方案</strong>提示学生检查 onclick=&quot;handleClick()&quot; 是否完整,特别是后面的小括号。</div><div class="list-item issue"><strong>卡点</strong>CSS 选择器写错,导致点击后 Class 切换了但样式没变。<strong>解决方案</strong>引导学生检查 .active 类的作用范围,确保它写在了正确的选择器之后。</div></div></div>
45
+ <div class="card"><h2>可拓展方向</h2><div class="list"><div class="list-item">尝试添加 transition 实现颜色的平滑过渡效果</div><div class="list-item">加入 transform: scale() 实现点击时的弹跳动画</div><div class="list-item">尝试添加 audio 标签,实现点击时的音效反馈</div></div></div>
46
+ <div class="card"><h2>课后作业</h2><div class="list"><div class="list-item">尝试制作一个“灯泡”页面,点击按钮可以让灯泡发光或者熄灭。</div></div></div>
47
+ </div>
48
+ <div class="preview-card"><div class="preview-head"><h2>作品预览</h2></div><iframe src="demo.html" title="作品预览"></iframe></div>
49
+ </section>
50
+ </div>
51
+ </body>
52
+ </html>
@@ -0,0 +1,34 @@
1
+ {
2
+ "任务类别": "B",
3
+ "任务编号": "100",
4
+ "任务名称": "做一个按钮页面",
5
+ "主能力标签": "表达构建",
6
+ "任务类型标签": "游戏机制",
7
+ "适合学生类型": [
8
+ "喜欢做项目",
9
+ "需要明确目标"
10
+ ],
11
+ "训练重点": [
12
+ "掌握基础的 JavaScript 点击事件绑定",
13
+ "理解 HTML/CSS/JS 三者如何协作完成交互",
14
+ "学习利用 CSS Class 切换来实现视觉变化"
15
+ ],
16
+ "卡点和解决方案": [
17
+ {
18
+ "卡点": "学生容易漏写 onclick 属性中的括号,导致函数不执行。",
19
+ "解决方案": "提示学生检查 onclick=\"handleClick()\" 是否完整,特别是后面的小括号。"
20
+ },
21
+ {
22
+ "卡点": "CSS 选择器写错,导致点击后 Class 切换了但样式没变。",
23
+ "解决方案": "引导学生检查 .active 类的作用范围,确保它写在了正确的选择器之后。"
24
+ }
25
+ ],
26
+ "可拓展方向": [
27
+ "尝试添加 transition 实现颜色的平滑过渡效果",
28
+ "加入 transform: scale() 实现点击时的弹跳动画",
29
+ "尝试添加 audio 标签,实现点击时的音效反馈"
30
+ ],
31
+ "课后作业": [
32
+ "尝试制作一个“灯泡”页面,点击按钮可以让灯泡发光或者熄灭。"
33
+ ]
34
+ }
@@ -0,0 +1,180 @@
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 {
10
+ margin: 0;
11
+ font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
12
+ background: #f5f7fb;
13
+ color: #1f2937;
14
+ }
15
+ .wrap {
16
+ max-width: 1380px;
17
+ margin: 0 auto;
18
+ padding: 14px 14px 18px;
19
+ height: 100vh;
20
+ display: flex;
21
+ flex-direction: column;
22
+ gap: 12px;
23
+ }
24
+ .hero {
25
+ background: #fff;
26
+ border: 1px solid #e5ebf5;
27
+ border-radius: 18px;
28
+ padding: 12px 16px;
29
+ display: flex;
30
+ align-items: center;
31
+ justify-content: space-between;
32
+ gap: 12px;
33
+ flex: 0 0 auto;
34
+ }
35
+ .hero h1 {
36
+ margin: 0 0 4px;
37
+ font-size: 24px;
38
+ }
39
+ .hero p {
40
+ margin: 0;
41
+ color: #5b6b7c;
42
+ font-size: 14px;
43
+ }
44
+ .steps {
45
+ display: flex;
46
+ gap: 8px;
47
+ flex-wrap: wrap;
48
+ justify-content: flex-end;
49
+ }
50
+ .step {
51
+ background: #edf4ff;
52
+ color: #2457c5;
53
+ border-radius: 999px;
54
+ padding: 6px 10px;
55
+ font-size: 12px;
56
+ font-weight: 700;
57
+ white-space: nowrap;
58
+ }
59
+ .grid {
60
+ display: grid;
61
+ grid-template-columns: repeat(3, minmax(0, 1fr));
62
+ gap: 12px;
63
+ flex: 1 1 auto;
64
+ min-height: 0;
65
+ }
66
+ .card {
67
+ background: #fff;
68
+ border: 1px solid #e5ebf5;
69
+ border-radius: 18px;
70
+ padding: 12px;
71
+ display: flex;
72
+ flex-direction: column;
73
+ min-height: 0;
74
+ box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
75
+ }
76
+ .title {
77
+ margin: 0 0 4px;
78
+ font-size: 18px;
79
+ }
80
+ .image-wrap {
81
+ flex: 1 1 auto;
82
+ min-height: 0;
83
+ display: flex;
84
+ align-items: center;
85
+ justify-content: center;
86
+ margin-bottom: 8px;
87
+ }
88
+ img {
89
+ width: 100%;
90
+ max-height: 100%;
91
+ aspect-ratio: 1 / 1;
92
+ object-fit: contain;
93
+ border-radius: 14px;
94
+ background: #f2f5fb;
95
+ display: block;
96
+ }
97
+ .observe {
98
+ background: #f8fbff;
99
+ border: 1px solid #e3ecfb;
100
+ border-radius: 14px;
101
+ padding: 10px 12px;
102
+ font-size: 13px;
103
+ color: #39506a;
104
+ flex: 0 0 auto;
105
+ }
106
+ .observe strong {
107
+ display: block;
108
+ margin-bottom: 6px;
109
+ font-size: 14px;
110
+ color: #29476b;
111
+ }
112
+ .observe ul {
113
+ margin: 0;
114
+ padding-left: 18px;
115
+ }
116
+ .observe li { margin-bottom: 4px; }
117
+ </style>
118
+ </head>
119
+ <body>
120
+ <div class="wrap">
121
+ <section class="hero">
122
+ <div>
123
+ <h1>微调挑战</h1>
124
+ </div>
125
+ <div class="steps">
126
+ <div class="step">① 先看</div>
127
+ <div class="step">② 选一点</div>
128
+ <div class="step">③ 再去改</div>
129
+ </div>
130
+ </section>
131
+
132
+ <section class="grid">
133
+ <article class="card">
134
+ <h2 class="title">班级小组徽章</h2>
135
+ <div class="image-wrap">
136
+ <img src="https://cdn.yiranlaoshi.com/yiran/workspace-ai-demo/%E7%8F%AD%E7%BA%A7%E5%B0%8F%E7%BB%84%E5%BE%BD%E7%AB%A0Logo%E4%BC%98%E5%8C%96%E7%89%88_1024x1024_20260421_185141.png" alt="班级小组徽章">
137
+ </div>
138
+ <div class="observe">
139
+ <strong>先想一想</strong>
140
+ <ul>
141
+ <li>哪里已经不错了?</li>
142
+ <li>哪一小处还想再改?</li>
143
+ <li>先改哪一点最容易?</li>
144
+ </ul>
145
+ </div>
146
+ </article>
147
+
148
+ <article class="card">
149
+ <h2 class="title">小组吉祥物</h2>
150
+ <div class="image-wrap">
151
+ <img src="https://cdn.yiranlaoshi.com/yiran/workspace-ai-demo/%E5%B0%8F%E7%BB%84%E5%90%89%E7%A5%A5%E7%89%A9%E7%AC%AC%E4%B8%80%E7%89%88_1024x1024_20260421_173654.png" alt="小组吉祥物">
152
+ </div>
153
+ <div class="observe">
154
+ <strong>先想一想</strong>
155
+ <ul>
156
+ <li>哪里不像你想的?</li>
157
+ <li>先改表情还是动作?</li>
158
+ <li>哪个小改动最有用?</li>
159
+ </ul>
160
+ </div>
161
+ </article>
162
+
163
+ <article class="card">
164
+ <h2 class="title">小组标志</h2>
165
+ <div class="image-wrap">
166
+ <img src="https://cdn.yiranlaoshi.com/yiran/workspace-ai-demo/%E5%B0%8F%E7%BB%84%E6%A0%87%E5%BF%97%E7%AC%AC%E4%B8%80%E7%89%88-%E4%B8%AD%E7%AD%89_1024x1024_20260421_175402.png" alt="小组标志">
167
+ </div>
168
+ <div class="observe">
169
+ <strong>先想一想</strong>
170
+ <ul>
171
+ <li>你一眼能看懂它吗?</li>
172
+ <li>哪一小块有点多?</li>
173
+ <li>先简化哪里更合适?</li>
174
+ </ul>
175
+ </div>
176
+ </article>
177
+ </section>
178
+ </div>
179
+ </body>
180
+ </html>