htmlgen-mcp 0.3.3__py3-none-any.whl → 0.3.4__py3-none-any.whl

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.

Potentially problematic release.


This version of htmlgen-mcp might be problematic. Click here for more details.

@@ -2,8 +2,9 @@
2
2
  # -*- coding: utf-8 -*-
3
3
  """快速单页网站生成器 - 优化生成速度"""
4
4
 
5
- from typing import Dict, Any, Optional, List
5
+ from typing import Dict, Any, List
6
6
  import json
7
+ import textwrap
7
8
 
8
9
 
9
10
  class QuickSiteGenerator:
@@ -61,7 +62,11 @@ class QuickSiteGenerator:
61
62
  "tool": "create_html_file",
62
63
  "params": {
63
64
  "file_path": "index.html",
64
- "title": f"{project_name} - 首页"
65
+ "title": f"{project_name} - 首页",
66
+ "style": "ultra_modern",
67
+ "sections": QuickSiteGenerator._get_sections(
68
+ site_type, project_name, description
69
+ )
65
70
  },
66
71
  "description": "创建单页面网站主文件",
67
72
  "rationale": "生成包含所有内容的单页面"
@@ -77,17 +82,6 @@ class QuickSiteGenerator:
77
82
  },
78
83
  {
79
84
  "step": 6,
80
- "tool": "create_responsive_navbar",
81
- "params": {
82
- "file_path": "index.html",
83
- "brand_name": project_name,
84
- "nav_items": QuickSiteGenerator._get_nav_items(site_type)
85
- },
86
- "description": "创建导航栏",
87
- "rationale": "页面内导航锚点"
88
- },
89
- {
90
- "step": 7,
91
85
  "tool": "inject_images",
92
86
  "params": {
93
87
  "file_path": "index.html",
@@ -100,7 +94,7 @@ class QuickSiteGenerator:
100
94
  "rationale": "添加视觉内容"
101
95
  },
102
96
  {
103
- "step": 8,
97
+ "step": 7,
104
98
  "tool": "open_in_browser",
105
99
  "params": {
106
100
  "file_path": "index.html"
@@ -122,52 +116,455 @@ class QuickSiteGenerator:
122
116
  "estimated_time": "2-3分钟",
123
117
  "tools_sequence": base_steps
124
118
  }
125
-
119
+
126
120
  @staticmethod
127
- def _get_nav_items(site_type: str) -> List[Dict[str, str]]:
128
- """根据网站类型返回导航项(锚点链接)"""
129
-
130
- nav_templates = {
131
- "咖啡店": [
132
- {"name": "首页", "link": "#hero"},
133
- {"name": "菜单", "link": "#menu"},
134
- {"name": "关于", "link": "#about"},
135
- {"name": "联系", "link": "#contact"}
136
- ],
137
- "企业": [
138
- {"name": "首页", "link": "#hero"},
139
- {"name": "服务", "link": "#services"},
140
- {"name": "关于", "link": "#about"},
141
- {"name": "联系", "link": "#contact"}
142
- ],
143
- "作品集": [
144
- {"name": "首页", "link": "#hero"},
145
- {"name": "作品", "link": "#portfolio"},
146
- {"name": "技能", "link": "#skills"},
147
- {"name": "联系", "link": "#contact"}
148
- ],
149
- "餐厅": [
150
- {"name": "首页", "link": "#hero"},
151
- {"name": "菜单", "link": "#menu"},
152
- {"name": "预约", "link": "#booking"},
153
- {"name": "位置", "link": "#location"}
154
- ]
155
- }
156
-
157
- # 默认导航
158
- default = [
159
- {"name": "首页", "link": "#hero"},
160
- {"name": "介绍", "link": "#about"},
161
- {"name": "服务", "link": "#services"},
162
- {"name": "联系", "link": "#contact"}
163
- ]
164
-
165
- # 查找最匹配的类型
166
- for key in nav_templates:
167
- if key in site_type:
168
- return nav_templates[key]
169
-
170
- return default
121
+ def _get_sections(site_type: str, project_name: str, description: str) -> List[str]:
122
+ """根据网站类型生成单页面的内容区块"""
123
+ pretty_name = project_name.replace("-", " ").strip().title() or project_name
124
+ lower_type = site_type.lower()
125
+ is_cafe = any(keyword in lower_type for keyword in ["咖啡", "餐厅", "cafe", "coffee", "restaurant"])
126
+ is_mall = any(keyword in lower_type for keyword in ["购物", "商场", "mall", "plaza", "retail"])
127
+
128
+ summary = (description or "").strip().replace("\n", " ")
129
+ if len(summary) > 120:
130
+ summary = summary[:117] + "..."
131
+
132
+ primary_cta = "了解亮点"
133
+ secondary_cta = "预约参观"
134
+ if is_cafe:
135
+ hero_topic = "artisanal coffee shop interior, warm light, cozy atmosphere"
136
+ default_intro = "精品烘焙、当季风味与沉浸式空间,让每一杯咖啡都成为值得记录的瞬间。"
137
+ primary_cta = "查看菜单"
138
+ secondary_cta = "预订座位"
139
+ elif is_mall:
140
+ hero_topic = "luxury shopping mall atrium at night, cinematic lighting, people shopping"
141
+ default_intro = "星光购物中心集合潮流品牌、餐饮娱乐与沉浸式体验,一站式点亮城市生活。"
142
+ primary_cta = "了解亮点"
143
+ secondary_cta = "预约参观"
144
+ else:
145
+ hero_topic = "modern creative studio, gradient lighting, professional team"
146
+ default_intro = "以策略、设计与工程为驱动,为品牌打造兼具审美与增长的数字体验。"
147
+ primary_cta = "查看服务"
148
+ secondary_cta = "联系团队"
149
+
150
+ hero_section = textwrap.dedent(
151
+ f"""
152
+ <header id="hero" class="hero hero-ultra hero-overlay section text-center" data-bg-topic="{hero_topic}" data-parallax="0.22">
153
+ <div class="overlay"></div>
154
+ <div class="container hero-inner">
155
+ <span class="badge badge-soft mb-3">全新体验上线</span>
156
+ <h1 class="display-5 mb-3">{pretty_name}</h1>
157
+ <p class="section-lead mx-auto">{summary or default_intro}</p>
158
+ <div class="d-flex justify-content-center gap-3 flex-wrap mt-4">
159
+ <a class="btn btn-gradient btn-lg px-4" href="#services">{primary_cta}</a>
160
+ <a class="btn btn-outline-light btn-lg px-4" href="#contact">{secondary_cta}</a>
161
+ </div>
162
+ </div>
163
+ </header>
164
+ """
165
+ ).strip()
166
+
167
+ sections: List[str] = [hero_section]
168
+
169
+ if is_mall:
170
+ sections.append(
171
+ textwrap.dedent(
172
+ """
173
+ <section id="services" class="section">
174
+ <div class="container">
175
+ <div class="row g-4 align-items-stretch">
176
+ <div class="col-md-4">
177
+ <div class="feature-card glass h-100 p-4 reveal" data-tilt>
178
+ <div class="icon-badge bg-warning mb-3">🌃</div>
179
+ <h2 class="h5 mb-2">夜色生活目的地</h2>
180
+ <p class="text-muted small mb-0">精选网红餐饮、酒吧与夜市市集,营业至深夜,打造不夜城市心脏。</p>
181
+ </div>
182
+ </div>
183
+ <div class="col-md-4">
184
+ <div class="feature-card glass h-100 p-4 reveal" data-tilt>
185
+ <div class="icon-badge bg-primary mb-3">🛍️</div>
186
+ <h2 class="h5 mb-2">国际潮流品牌矩阵</h2>
187
+ <p class="text-muted small mb-0">集合 200+ 国际与设计师品牌,提供季节限定快闪与 VIP 专属体验。</p>
188
+ </div>
189
+ </div>
190
+ <div class="col-md-4">
191
+ <div class="feature-card glass h-100 p-4 reveal" data-tilt>
192
+ <div class="icon-badge bg-success mb-3">🎡</div>
193
+ <h2 class="h5 mb-2">家庭娱乐社交场</h2>
194
+ <p class="text-muted small mb-0">沉浸式亲子乐园、艺术展演与影院集群,同步举办主题活动与周末市集。</p>
195
+ </div>
196
+ </div>
197
+ </div>
198
+ </div>
199
+ </section>
200
+ """
201
+ ).strip()
202
+ )
203
+
204
+ sections.append(
205
+ textwrap.dedent(
206
+ """
207
+ <section id="flagship" class="section section-alt">
208
+ <div class="container">
209
+ <h2 class="h3 text-center mb-4">主力店铺</h2>
210
+ <p class="section-lead text-center text-muted mb-5">精选品牌旗舰店与主题街区,打造全景式消费体验。</p>
211
+ <div class="row g-4">
212
+ <article class="col-lg-4">
213
+ <div class="card h-100 p-4 shadow-soft reveal" data-tilt>
214
+ <img data-topic="luxury fashion flagship store interior, soft lighting" alt="星光旗舰时尚馆" class="rounded-4 shadow-sm mb-3">
215
+ <h3 class="h6 mb-2">星光旗舰时尚馆</h3>
216
+ <ul class="text-muted small list-unstyled vstack gap-1">
217
+ <li>• 集结 30+ 国际轻奢品牌</li>
218
+ <li>• 私享试衣间与造型顾问</li>
219
+ <li>• 独家联名限量系列</li>
220
+ </ul>
221
+ </div>
222
+ </article>
223
+ <article class="col-lg-4">
224
+ <div class="card h-100 p-4 shadow-soft reveal" data-tilt>
225
+ <img data-topic="gourmet food court night market, neon lighting" alt="夜焰美食街区" class="rounded-4 shadow-sm mb-3">
226
+ <h3 class="h6 mb-2">夜焰美食街区</h3>
227
+ <ul class="text-muted small list-unstyled vstack gap-1">
228
+ <li>• 40+ 全球料理与主理人餐厅</li>
229
+ <li>• 24 小时营业,夜间限定菜单</li>
230
+ <li>• Live 音乐与沉浸式主题演出</li>
231
+ </ul>
232
+ </div>
233
+ </article>
234
+ <article class="col-lg-4">
235
+ <div class="card h-100 p-4 shadow-soft reveal" data-tilt>
236
+ <img data-topic="family entertainment center with interactive games, bright colors" alt="星空亲子探索乐园" class="rounded-4 shadow-sm mb-3">
237
+ <h3 class="h6 mb-2">星空亲子探索乐园</h3>
238
+ <ul class="text-muted small list-unstyled vstack gap-1">
239
+ <li>• 3000㎡ 沉浸式互动儿童乐园</li>
240
+ <li>• 每周主题教育与艺术工作坊</li>
241
+ <li>• 家庭影院与休闲书吧</li>
242
+ </ul>
243
+ </div>
244
+ </article>
245
+ </div>
246
+ </div>
247
+ </section>
248
+ """
249
+ ).strip()
250
+ )
251
+
252
+ sections.append(
253
+ textwrap.dedent(
254
+ """
255
+ <section id="membership" class="section">
256
+ <div class="container">
257
+ <h2 class="h3 text-center mb-4">会员礼遇</h2>
258
+ <p class="section-lead text-center text-muted mb-5">尊享专属权益,体验尊贵服务与生活方式福利。</p>
259
+ <div class="row g-4">
260
+ <div class="col-md-4">
261
+ <div class="membership-card shadow-soft h-100 p-4 border-gradient">
262
+ <h3 class="h6 mb-3">星耀卡 · ¥699 / 年</h3>
263
+ <ul class="small text-muted list-unstyled vstack gap-1">
264
+ <li>• 免费停车 120 小时</li>
265
+ <li>• 生日专属礼包与积分翻倍</li>
266
+ <li>• 合作品牌限时优惠券</li>
267
+ <li>• 活动优先报名席位</li>
268
+ </ul>
269
+ <a class="btn btn-gradient w-100 mt-3" href="#contact">立即办理</a>
270
+ </div>
271
+ </div>
272
+ <div class="col-md-4">
273
+ <div class="membership-card shadow-soft h-100 p-4 border-gradient highlight">
274
+ <h3 class="h6 mb-3">星耀黑金卡 · ¥1999 / 年</h3>
275
+ <ul class="small text-muted list-unstyled vstack gap-1">
276
+ <li>• 私人购物顾问与专属休息室</li>
277
+ <li>• 家庭影厅 / 艺术沙龙优先预约</li>
278
+ <li>• 免费代客泊车与礼宾服务</li>
279
+ <li>• 限量快闪及首发活动专属邀请</li>
280
+ </ul>
281
+ <a class="btn btn-dark-gradient w-100 mt-3" href="#contact">预约办理</a>
282
+ </div>
283
+ </div>
284
+ <div class="col-md-4">
285
+ <div class="membership-card shadow-soft h-100 p-4 border-gradient">
286
+ <h3 class="h6 mb-3">星悦家庭卡 · ¥1299 / 年</h3>
287
+ <ul class="small text-muted list-unstyled vstack gap-1">
288
+ <li>• 亲子乐园畅玩与课程折扣</li>
289
+ <li>• 周末家庭影院专属包场</li>
290
+ <li>• 健康管理&运动社群活动</li>
291
+ <li>• 节日专属定制惊喜</li>
292
+ </ul>
293
+ <a class="btn btn-outline-primary w-100 mt-3" href="#contact">了解详情</a>
294
+ </div>
295
+ </div>
296
+ </div>
297
+ </div>
298
+ </section>
299
+ """
300
+ ).strip()
301
+ )
302
+
303
+ sections.append(
304
+ textwrap.dedent(
305
+ """
306
+ <section id="stories" class="section section-alt">
307
+ <div class="container">
308
+ <h2 class="h3 text-center mb-4">顾客见证</h2>
309
+ <div class="row g-4">
310
+ <article class="col-md-6">
311
+ <div class="testimonial-card glass h-100 p-4">
312
+ <div class="d-flex align-items-center gap-3 mb-3">
313
+ <img data-topic="fashion influencer woman portrait, studio lighting" alt="顾客" class="avatar rounded-circle shadow-sm">
314
+ <div>
315
+ <div class="fw-semibold">刘倩 · 时尚博主</div>
316
+ <small class="text-muted">常驻 VIP 会员</small>
317
+ </div>
318
+ </div>
319
+ <p class="text-muted small mb-0">“星光购物中心不仅是购物目的地,更是城市生活方式的策展地。每月都有新惊喜。”</p>
320
+ </div>
321
+ </article>
322
+ <article class="col-md-6">
323
+ <div class="testimonial-card glass h-100 p-4">
324
+ <div class="d-flex align-items-center gap-3 mb-3">
325
+ <img data-topic="happy asian family portrait lifestyle" alt="家庭用户" class="avatar rounded-circle shadow-sm">
326
+ <div>
327
+ <div class="fw-semibold">周末家庭 · 城市新锐</div>
328
+ <small class="text-muted">星悦家庭卡会员</small>
329
+ </div>
330
+ </div>
331
+ <p class="text-muted small mb-0">“孩子最喜欢亲子探索乐园,周末打卡电影院与艺术工坊,已经成为我们的固定行程。”</p>
332
+ </div>
333
+ </article>
334
+ </div>
335
+ </div>
336
+ </section>
337
+ """
338
+ ).strip()
339
+ )
340
+
341
+ elif is_cafe:
342
+ sections.append(
343
+ textwrap.dedent(
344
+ """
345
+ <section id="menu" class="section">
346
+ <div class="container">
347
+ <h2 class="h3 text-center mb-4">招牌菜单</h2>
348
+ <p class="section-lead text-center text-muted mb-5">慢火烘焙、手工调制与限定甜点,在这里相遇。</p>
349
+ <div class="row g-4">
350
+ <article class="col-md-4">
351
+ <div class="glass p-4 h-100 reveal" data-tilt>
352
+ <img data-topic="signature latte art with croissant" alt="手工拿铁" class="rounded shadow-sm mb-3">
353
+ <h3 class="h6 mb-1">手工拿铁</h3>
354
+ <p class="text-muted small mb-0">自家烘焙豆搭配丝滑绵密奶泡,入口香气层层绽放。</p>
355
+ </div>
356
+ </article>
357
+ <article class="col-md-4">
358
+ <div class="glass p-4 h-100 reveal" data-tilt>
359
+ <img data-topic="pour over coffee minimal setup" alt="单品手冲" class="rounded shadow-sm mb-3">
360
+ <h3 class="h6 mb-1">单品手冲</h3>
361
+ <p class="text-muted small mb-0">严选产区豆种与手冲曲线,呈现清晰果酸与花香层次。</p>
362
+ </div>
363
+ </article>
364
+ <article class="col-md-4">
365
+ <div class="glass p-4 h-100 reveal" data-tilt>
366
+ <img data-topic="dessert display minimal cafe" alt="限定甜品" class="rounded shadow-sm mb-3">
367
+ <h3 class="h6 mb-1">限定甜品</h3>
368
+ <p class="text-muted small mb-0">每日新鲜出炉的法式甜点,与咖啡香气打造完美平衡。</p>
369
+ </div>
370
+ </article>
371
+ </div>
372
+ </div>
373
+ </section>
374
+ """
375
+ ).strip()
376
+ )
377
+
378
+ sections.append(
379
+ textwrap.dedent(
380
+ """
381
+ <section id="about" class="section section-alt">
382
+ <div class="container">
383
+ <div class="row g-4 align-items-center">
384
+ <div class="col-lg-6">
385
+ <img data-topic="coffee shop barista team smiling" alt="咖啡师团队" class="rounded-4 shadow-lg w-100">
386
+ </div>
387
+ <div class="col-lg-6">
388
+ <h2 class="h3 mb-3">关于我们 · 一杯咖啡的旅程</h2>
389
+ <p class="text-muted">从产地杯测、烘焙曲线到杯中呈现,我们坚持手作与温度,打造城市中最松弛的第三生活空间。</p>
390
+ <ul class="list-unstyled vstack gap-2 text-muted small mb-0">
391
+ <li>✔️ SCA 认证咖啡师与烘焙师团队</li>
392
+ <li>✔️ 直采可持续农场豆种,月度主题更新</li>
393
+ <li>✔️ 定制音乐与香氛,营造层次丰富的沉浸体验</li>
394
+ </ul>
395
+ </div>
396
+ </div>
397
+ </div>
398
+ </section>
399
+ """
400
+ ).strip()
401
+ )
402
+
403
+ sections.append(
404
+ textwrap.dedent(
405
+ """
406
+ <section id="services" class="section">
407
+ <div class="container">
408
+ <div class="row g-4">
409
+ <div class="col-lg-5">
410
+ <h2 class="h3 mb-3">空间亮点</h2>
411
+ <p class="text-muted">无论是独处阅读、灵感共创还是快闪活动,我们都为你准备好了理想场景。</p>
412
+ <div class="d-flex flex-column gap-3 text-muted small">
413
+ <div class="glass p-3 rounded-4">🌿 原木系家具与植物搭配,营造自然呼吸感</div>
414
+ <div class="glass p-3 rounded-4">⚡ 全场高速 Wi-Fi 与充电座,随时投入创作</div>
415
+ <div class="glass p-3 rounded-4">🎧 低语音控制 + 细分区域,兼顾独处与社交</div>
416
+ </div>
417
+ </div>
418
+ <div class="col-lg-7">
419
+ <img data-topic="cozy cafe interior with plants" alt="店内环境" class="rounded-4 shadow-lg w-100">
420
+ </div>
421
+ </div>
422
+ </div>
423
+ </section>
424
+ """
425
+ ).strip()
426
+ )
427
+ else:
428
+ sections.append(
429
+ textwrap.dedent(
430
+ f"""
431
+ <section id="about" class="section">
432
+ <div class="container">
433
+ <div class="row g-4 align-items-center">
434
+ <div class="col-lg-5">
435
+ <h2 class="h3 mb-3">关于我们 · Strategy × Design × Tech</h2>
436
+ <p class="text-muted">服务来自科技、消费、企业服务等多个行业的伙伴,擅长以系统化方法论驱动品牌增长。</p>
437
+ <ul class="list-unstyled vstack gap-2 text-muted small mb-0">
438
+ <li>✔️ 8+ 年数字化品牌建设经验</li>
439
+ <li>✔️ 120+ 成功案例覆盖 12 个细分领域</li>
440
+ <li>✔️ 与 {pretty_name} 一同打造可持续的体验资产</li>
441
+ </ul>
442
+ </div>
443
+ <div class="col-lg-7">
444
+ <img data-topic="modern creative studio teamwork" alt="团队协作" class="rounded-4 shadow-lg w-100">
445
+ </div>
446
+ </div>
447
+ </div>
448
+ </section>
449
+ """
450
+ ).strip()
451
+ )
452
+
453
+ sections.append(
454
+ textwrap.dedent(
455
+ """
456
+ <section id="services" class="section section-alt">
457
+ <div class="container">
458
+ <h2 class="h3 text-center mb-3">核心服务</h2>
459
+ <p class="section-lead text-center text-muted mb-5">用一体化团队,将商业目标转化为可感知的用户体验。</p>
460
+ <div class="row g-4">
461
+ <div class="col-md-4">
462
+ <div class="glass p-4 h-100 reveal" data-tilt>
463
+ <img data-topic="brand strategy workshop" alt="品牌策略" class="rounded shadow-sm mb-3">
464
+ <h3 class="h6 mb-1">品牌策略</h3>
465
+ <p class="text-muted small mb-0">市场洞察、价值主张、用户旅程梳理与品牌调性定义。</p>
466
+ </div>
467
+ </div>
468
+ <div class="col-md-4">
469
+ <div class="glass p-4 h-100 reveal" data-tilt>
470
+ <img data-topic="design system ui kit" alt="设计系统" class="rounded shadow-sm mb-3">
471
+ <h3 class="h6 mb-1">设计系统</h3>
472
+ <p class="text-muted small mb-0">多端统一的组件资产、主题配色、动效规范与文档体系。</p>
473
+ </div>
474
+ </div>
475
+ <div class="col-md-4">
476
+ <div class="glass p-4 h-100 reveal" data-tilt>
477
+ <img data-topic="web development collaboration" alt="工程交付" class="rounded shadow-sm mb-3">
478
+ <h3 class="h6 mb-1">工程交付</h3>
479
+ <p class="text-muted small mb-0">高性能 Web 前端、可视化内容管理与持续迭代支持。</p>
480
+ </div>
481
+ </div>
482
+ </div>
483
+ </div>
484
+ </section>
485
+ """
486
+ ).strip()
487
+ )
488
+
489
+ sections.append(
490
+ textwrap.dedent(
491
+ """
492
+ <section id="cases" class="section">
493
+ <div class="container">
494
+ <div class="row g-4 align-items-center">
495
+ <div class="col-lg-6">
496
+ <img data-topic="business team presentation success" alt="项目成果" class="rounded-4 shadow-lg w-100">
497
+ </div>
498
+ <div class="col-lg-6">
499
+ <h2 class="h3 mb-3">客户赞誉</h2>
500
+ <p class="text-muted">我们与成长型品牌和上市公司保持长期合作,用数据验证每一次设计决策。</p>
501
+ <div class="glass p-4 rounded-4 text-muted small">
502
+ <p class="mb-2">“团队在两周内交付了全新的品牌站点,性能与转化率均超出预期。”</p>
503
+ <div class="fw-semibold">— 合作伙伴 CEO</div>
504
+ </div>
505
+ </div>
506
+ </div>
507
+ </div>
508
+ </section>
509
+ """
510
+ ).strip()
511
+ )
512
+
513
+ sections.append(
514
+ textwrap.dedent(
515
+ """
516
+ <section id="contact" class="section section-sm">
517
+ <div class="container">
518
+ <div class="row g-4 align-items-center">
519
+ <div class="col-lg-5">
520
+ <h2 class="h4 mb-3">预约体验</h2>
521
+ <p class="text-muted">填写表单或直接通过电话/邮件与我们联系,获取专属方案。</p>
522
+ <ul class="list-unstyled text-muted small mb-0">
523
+ <li>📞 电话:400-123-4567</li>
524
+ <li>📧 邮箱:hello@example.com</li>
525
+ <li>📍 地址:上海市静安区灵感路 88 号</li>
526
+ </ul>
527
+ </div>
528
+ <div class="col-lg-7">
529
+ <form class="glass p-4 rounded-4 shadow-sm row g-3">
530
+ <div class="col-md-6">
531
+ <label class="form-label">姓名</label>
532
+ <input type="text" class="form-control" placeholder="请输入姓名" required>
533
+ </div>
534
+ <div class="col-md-6">
535
+ <label class="form-label">联系方式</label>
536
+ <input type="text" class="form-control" placeholder="邮箱或手机号" required>
537
+ </div>
538
+ <div class="col-12">
539
+ <label class="form-label">需求描述</label>
540
+ <textarea class="form-control" rows="3" placeholder="请描述项目目标与时间节点"></textarea>
541
+ </div>
542
+ <div class="col-12 d-grid">
543
+ <button class="btn btn-primary" type="submit">提交信息</button>
544
+ </div>
545
+ </form>
546
+ </div>
547
+ </div>
548
+ </div>
549
+ </section>
550
+ """
551
+ ).strip()
552
+ )
553
+
554
+ sections.append(
555
+ textwrap.dedent(
556
+ f"""
557
+ <footer class="footer-creative text-center py-4">
558
+ <div class="container small text-muted">
559
+ <div>{pretty_name} · All Rights Reserved</div>
560
+ <div class="mt-1">Designed for modern single-page experiences.</div>
561
+ </div>
562
+ </footer>
563
+ """
564
+ ).strip()
565
+ )
566
+
567
+ return [section for section in sections if section]
171
568
 
172
569
  @staticmethod
173
570
  def _get_image_topics(site_type: str) -> List[str]:
@@ -179,14 +576,35 @@ class QuickSiteGenerator:
179
576
  "企业": ["modern office", "business team", "corporate building", "technology workspace"],
180
577
  "作品集": ["creative workspace", "design portfolio", "artistic studio", "digital art"],
181
578
  "电商": ["product showcase", "online shopping", "ecommerce", "shopping cart"],
182
- "博客": ["writing desk", "laptop workspace", "books and coffee", "minimal desk setup"]
579
+ "博客": ["writing desk", "laptop workspace", "books and coffee", "minimal desk setup"],
580
+ "购物": [
581
+ "luxury shopping mall atrium, cinematic lighting",
582
+ "night market food street, neon",
583
+ "family entertainment center modern",
584
+ "vip shopping lounge interior"
585
+ ],
586
+ "商场": [
587
+ "retail fashion flagship store interior",
588
+ "premium shopping mall exterior evening",
589
+ "gourmet food court lifestyle",
590
+ "interactive family entertainment zone"
591
+ ],
592
+ "mall": [
593
+ "modern shopping mall architecture",
594
+ "luxury retail display glass storefront",
595
+ "shopping mall lounge cafe",
596
+ "city shopping plaza aerial night"
597
+ ]
183
598
  }
184
-
599
+
185
600
  # 查找匹配的主题
186
601
  for key, topics in topics_map.items():
187
602
  if key in site_type:
188
603
  return topics
189
-
604
+ for key, topics in topics_map.items():
605
+ if key in site_type.lower():
606
+ return topics
607
+
190
608
  # 默认主题
191
609
  return ["modern website hero", "business concept", "technology background", "professional workspace"]
192
610
 
@@ -267,4 +685,4 @@ class QuickSiteGenerator:
267
685
  plan["tools_sequence"] = optimized_steps
268
686
  plan["estimated_time"] = "1-2分钟"
269
687
 
270
- return plan
688
+ return plan