Youngger9765 commited on
Commit
0a1821d
·
1 Parent(s): 698390e

更新 index.html 模板,重構頁面結構與樣式

Browse files

- 修改標題顯示為主標題與主題的組合
- 調整頁面樣式,改善排版與顏色搭配
- 新增活動辦法、報名說明、評選條件等區塊,並優化內容呈現
- 更新 JSON 配置,增加獎勵辦法與注意事項的設定
- 改善響應式設計,確保在不同裝置上顯示良好

這次更新旨在提升使用者體驗與視覺效果,並確保內容的清晰易讀。

Files changed (1) hide show
  1. templates/index.html +749 -464
templates/index.html CHANGED
@@ -141,491 +141,709 @@
141
  <head>
142
  <meta charset="UTF-8">
143
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
144
- <title>{{ title }}</title>
145
- <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&display=swap" rel="stylesheet">
146
  <style>
147
  * {
148
  margin: 0;
149
  padding: 0;
150
  box-sizing: border-box;
151
  }
152
-
153
  body {
154
- font-family: 'Noto Sans TC', sans-serif;
155
- background: #f0f4f3;
156
- color: #333;
157
  line-height: 1.6;
 
 
158
  }
159
-
160
  .container {
161
- max-width: 1400px;
162
  margin: 0 auto;
163
- background: white;
164
- box-shadow: 0 0 20px rgba(0,0,0,0.1);
165
- }
166
-
167
- /* Hero Section */
168
- .hero {
169
- background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
170
- padding: 60px 40px;
171
- position: relative;
172
- overflow: hidden;
173
  }
174
-
175
- .hero::after {
176
- content: '';
177
- position: absolute;
178
- right: -100px;
179
- top: -100px;
180
- width: 300px;
181
- height: 300px;
182
- background: rgba(255,255,255,0.3);
183
- border-radius: 50%;
184
  }
185
-
186
- .hero-content {
187
- position: relative;
188
- z-index: 1;
189
- display: flex;
190
- justify-content: space-between;
191
- align-items: center;
192
- gap: 40px;
193
  }
194
-
195
- .hero-text h1 {
196
- font-size: 48px;
197
- color: #2e7d32;
198
  margin-bottom: 20px;
199
- font-weight: 700;
 
200
  }
201
-
202
- .hero-text h2 {
203
- font-size: 36px;
204
- color: #388e3c;
205
  margin-bottom: 30px;
206
- font-weight: 500;
207
- }
208
-
209
- .hero-description {
210
- font-size: 18px;
211
- color: #555;
212
  line-height: 1.8;
213
- margin-bottom: 30px;
214
  }
215
-
216
- .hero-buttons {
217
  display: flex;
218
  gap: 20px;
 
 
219
  }
220
-
221
  .btn {
222
  padding: 15px 30px;
223
- border-radius: 30px;
 
 
 
224
  text-decoration: none;
225
- font-weight: 500;
226
  transition: all 0.3s ease;
227
- display: inline-block;
228
  }
229
-
230
  .btn-primary {
231
- background: #4caf50;
232
  color: white;
233
  }
234
-
235
- .btn-primary:hover {
236
- background: #45a049;
237
- transform: translateY(-2px);
238
- box-shadow: 0 5px 15px rgba(76,175,80,0.3);
239
- }
240
-
241
  .btn-secondary {
242
- background: white;
243
- color: #4caf50;
244
- border: 2px solid #4caf50;
245
- }
246
-
247
- .btn-secondary:hover {
248
- background: #4caf50;
249
  color: white;
 
250
  }
251
-
252
- .hero-image {
253
- flex-shrink: 0;
 
254
  }
255
-
256
- .hero-image img {
257
- max-width: 500px;
258
- width: 100%;
259
- height: auto;
260
  border-radius: 20px;
 
 
 
 
261
  }
262
-
263
- /* Info Cards Section */
264
- .info-section {
265
- padding: 60px 40px;
266
  }
267
-
268
- .section-title {
269
- font-size: 32px;
270
- color: #2e7d32;
271
- text-align: center;
272
- margin-bottom: 50px;
273
- font-weight: 600;
274
  }
275
-
276
- .info-cards {
277
- display: grid;
278
- grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
279
- gap: 30px;
280
- margin-bottom: 60px;
281
  }
282
-
283
- .info-card {
 
284
  background: #f8f9fa;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
285
  padding: 30px;
286
- border-radius: 15px;
287
- box-shadow: 0 5px 20px rgba(0,0,0,0.08);
288
- transition: transform 0.3s ease;
 
289
  }
290
-
291
- .info-card:hover {
292
  transform: translateY(-5px);
 
293
  }
294
-
295
- .info-card h3 {
296
- color: #4caf50;
297
- font-size: 24px;
298
- margin-bottom: 15px;
299
  display: flex;
300
  align-items: center;
301
- gap: 10px;
 
 
302
  }
303
-
304
- .info-card .icon {
305
- width: 30px;
306
- height: 30px;
307
- background: #4caf50;
 
308
  border-radius: 50%;
309
- display: inline-flex;
310
  align-items: center;
311
  justify-content: center;
312
- color: white;
313
- font-size: 16px;
 
 
 
314
  }
315
-
316
- .highlight-box {
317
- background: #fff3cd;
318
- border-left: 4px solid #ffc107;
319
- padding: 20px;
320
- margin: 20px 0;
321
- border-radius: 5px;
322
  }
323
-
324
- .highlight-box strong {
325
- color: #ff9800;
 
 
 
326
  }
327
-
328
- /* Categories Section */
329
- .categories-section {
330
- background: #f5f5f5;
331
- padding: 60px 40px;
 
 
 
332
  }
333
-
334
- .category-grid {
335
- display: grid;
336
- grid-template-columns: repeat(2, 1fr);
337
- gap: 40px;
338
- max-width: 1000px;
339
- margin: 0 auto;
340
  }
341
-
342
- .category-card {
343
- background: white;
344
- padding: 40px;
345
- border-radius: 15px;
 
 
 
 
 
 
 
 
 
346
  text-align: center;
347
- box-shadow: 0 5px 20px rgba(0,0,0,0.08);
348
- transition: all 0.3s ease;
 
 
349
  }
350
-
351
- .category-card:hover {
352
- transform: translateY(-5px);
353
- box-shadow: 0 10px 30px rgba(0,0,0,0.15);
 
 
 
 
 
354
  }
355
-
356
- .category-icon {
357
- width: 80px;
358
- height: 80px;
359
- margin: 0 auto 20px;
360
- background: #e8f5e9;
361
- border-radius: 50%;
 
 
 
 
 
 
 
 
 
 
 
 
 
362
  display: flex;
363
  align-items: center;
364
  justify-content: center;
365
- font-size: 40px;
 
 
366
  }
367
-
368
- .category-card h3 {
369
- color: #2e7d32;
370
- font-size: 28px;
371
- margin-bottom: 20px;
 
372
  }
373
-
374
- /* Scoring Table */
375
- .scoring-section {
376
- padding: 60px 40px;
 
 
 
 
 
 
 
 
377
  }
378
-
379
- .scoring-table {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
380
  width: 100%;
381
- max-width: 800px;
382
- margin: 0 auto;
383
  border-collapse: collapse;
384
  background: white;
385
- box-shadow: 0 5px 20px rgba(0,0,0,0.08);
386
  border-radius: 10px;
387
  overflow: hidden;
 
388
  }
389
-
390
- .scoring-table th,
391
- .scoring-table td {
392
- padding: 20px;
393
  text-align: left;
394
- border-bottom: 1px solid #e0e0e0;
395
  }
396
-
397
- .scoring-table th {
398
- background: #4caf50;
399
  color: white;
400
- font-weight: 500;
401
  }
402
-
403
- .scoring-table tr:hover {
404
- background: #f5f5f5;
405
  }
406
-
407
- .scoring-table td:first-child {
408
- font-weight: 500;
409
- color: #2e7d32;
 
 
410
  }
411
-
412
- /* Timeline Section */
413
- .timeline-section {
414
- background: #e8f5e9;
415
- padding: 60px 40px;
 
416
  }
417
-
418
- .timeline {
419
- max-width: 800px;
420
- margin: 0 auto;
 
 
421
  }
422
-
 
 
 
 
 
 
 
423
  .timeline-item {
424
- background: white;
425
- padding: 30px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
426
  border-radius: 10px;
427
- margin-bottom: 20px;
428
- box-shadow: 0 3px 10px rgba(0,0,0,0.08);
429
- border-left: 4px solid #4caf50;
430
  }
431
-
432
- .timeline-date {
433
- color: #4caf50;
434
- font-weight: 600;
435
- font-size: 18px;
436
- margin-bottom: 10px;
437
  }
438
-
439
- /* Footer */
440
- .footer {
441
- background: #2e7d32;
 
 
 
 
 
 
 
 
 
 
 
442
  color: white;
443
  padding: 40px;
 
444
  text-align: center;
445
  }
446
-
447
- .footer a {
448
- color: #81c784;
449
- text-decoration: none;
 
 
450
  }
451
-
452
- .footer a:hover {
453
- color: #a5d6a7;
454
- text-decoration: underline;
 
 
455
  }
456
-
457
- /* Responsive */
458
  @media (max-width: 768px) {
459
- .hero-content {
 
 
 
 
 
 
 
 
460
  flex-direction: column;
 
461
  }
462
-
463
- .hero-text h1 {
464
- font-size: 36px;
 
465
  }
466
-
467
- .hero-text h2 {
468
- font-size: 28px;
 
469
  }
470
-
471
- .category-grid {
472
- grid-template-columns: 1fr;
 
473
  }
474
-
475
- .info-cards {
476
- grid-template-columns: 1fr;
 
 
 
 
 
 
477
  }
478
  }
479
  </style>
480
  </head>
481
  <body>
482
  <div class="container">
483
- <!-- Hero Section -->
484
- <section class="hero">
485
- <div class="hero-content">
486
- <div class="hero-text">
487
- <h1>{{ year }}{{ eventType }}</h1>
488
- <h2>{{ theme }}</h2>
489
- <p class="hero-description">
490
- {{ description }}
491
- </p>
492
- <div class="hero-buttons">
493
- <a href="#register" class="btn btn-primary">個人報名</a>
494
- <a href="#register" class="btn btn-secondary">學校報名</a>
495
- </div>
496
- </div>
497
- {% if heroImage %}
498
- <div class="hero-image">
499
- <img src="{{ heroImage }}" alt="活動主視覺">
500
- </div>
501
- {% endif %}
502
  </div>
503
- </section>
504
-
505
- <!-- Activity Info Section -->
506
- <section class="info-section">
507
- <h2 class="section-title">活動辦法</h2>
508
 
509
- <div class="info-cards">
510
- <div class="info-card">
511
- <h3><span class="icon">👥</span> 參加對象</h3>
512
- <p>{{ participants }}</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
513
  </div>
514
 
515
- <div class="info-card">
516
- <h3><span class="icon">📝</span> 進行方式</h3>
517
- <p>{{ method }}</p>
518
- {% if methodHighlight %}
519
- <div class="highlight-box">
520
- <strong>第一關:</strong>{{ methodStep1 }}<br>
521
- <strong>活動期間:</strong>{{ activityPeriod }}
522
- </div>
523
- {% endif %}
524
  </div>
525
 
526
- <div class="info-card">
527
- <h3><span class="icon">🏆</span> 積分獎</h3>
528
- <p>{{ scoringInfo }}</p>
529
- {% if scoringHighlight %}
530
- <div class="highlight-box">
531
- {{ scoringHighlight }}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
532
  </div>
533
- {% endif %}
534
  </div>
535
  </div>
 
 
 
 
 
536
 
537
- {% if stage2Info %}
538
- <div class="info-cards">
539
- <div class="info-card">
540
- <h3><span class="icon">✍️</span> 第二關:{{ stage2Title }}</h3>
541
- <p><strong>活動期間:</strong>{{ stage2Period }}</p>
542
- <p>{{ stage2Description }}</p>
543
  </div>
544
 
545
- <div class="info-card">
546
- <h3><span class="icon">🎁</span> {{ stage2AwardTitle }}</h3>
547
- <p>{{ stage2AwardInfo }}</p>
548
  </div>
549
  </div>
550
- {% endif %}
551
- </section>
552
-
553
- <!-- Categories Section -->
554
- {% if hasCategories %}
555
- <section class="categories-section">
556
- <h2 class="section-title">報名說明</h2>
557
 
558
- <div class="category-grid">
559
- <div class="category-card">
560
- <div class="category-icon">👤</div>
561
- <h3>個人報名</h3>
562
- <p>{{ individualSignup }}</p>
563
- </div>
564
-
565
- <div class="category-card">
566
- <div class="category-icon">🏫</div>
567
- <h3>學校報名</h3>
568
- <p>{{ schoolSignup }}</p>
569
  </div>
 
570
  </div>
571
- </section>
572
  {% endif %}
573
-
574
- <!-- Scoring Table -->
575
  {% if scoringCriteria %}
576
- <section class="scoring-section">
577
- <h2 class="section-title">評分標準</h2>
 
578
 
579
- <table class="scoring-table">
580
- <thead>
581
- <tr>
582
- <th>評分項目</th>
583
- <th>評分占比</th>
584
- <th>內容說明</th>
585
- </tr>
586
- </thead>
587
- <tbody>
588
- {% for criteria in scoringCriteria %}
589
- <tr>
590
- <td>{{ criteria.item }}</td>
591
- <td>{{ criteria.percentage }}</td>
592
- <td>{{ criteria.description }}</td>
593
- </tr>
594
- {% endfor %}
595
- </tbody>
596
- </table>
597
- </section>
 
 
598
  {% endif %}
599
-
600
- <!-- Timeline Section -->
601
- {% if timeline %}
602
- <section class="timeline-section">
603
- <h2 class="section-title">重要日期與聯絡方式</h2>
604
 
605
- <div class="timeline">
606
- {% for event in timeline %}
607
- <div class="timeline-item">
608
- <div class="timeline-date">{{ event.date }}</div>
609
- <div class="timeline-content">{{ event.description }}</div>
610
  </div>
611
  {% endfor %}
612
  </div>
613
- </section>
614
  {% endif %}
615
-
616
- <!-- Footer -->
617
- <footer class="footer">
618
- <h3>{{ footerTitle }}</h3>
619
- {% if websiteUrl %}
620
- <p>活動網頁:<a href="{{ websiteUrl }}" target="_blank">{{ websiteUrl }}</a></p>
621
- {% endif %}
622
- {% if facebookUrl %}
623
- <p>Facebook:<a href="{{ facebookUrl }}" target="_blank">{{ facebookUrl }}</a></p>
624
- {% endif %}
625
- {% if contactInfo %}
626
- <p class="contact-info">{{ contactInfo }}</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
627
  {% endif %}
628
- </footer>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
629
  </div>
630
  </body>
631
  </html>{% endraw %}</textarea>
@@ -660,60 +878,71 @@
660
 
661
  <!-- Form Mode -->
662
  <div id="variables-form" class="space-y-4">
663
- <!-- 基本資訊 -->
664
  <div class="bg-gray-50 p-4 rounded-lg mb-4">
665
- <h4 class="text-sm font-semibold text-gray-700 mb-3">基本資訊</h4>
666
  <div class="space-y-3">
667
  <div>
668
- <label class="block text-sm font-medium text-gray-700 mb-1">網頁標題</label>
669
- <input type="text" id="var-title" value="2025聯發科技公益活動" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
670
  </div>
671
  <div>
672
- <label class="block text-sm font-medium text-gray-700 mb-1">年份</label>
673
- <input type="text" id="var-year" value="2025" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
674
  </div>
675
  <div>
676
- <label class="block text-sm font-medium text-gray-700 mb-1">活動類型</label>
677
- <input type="text" id="var-eventType" value="聯發科技公益活動" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
678
  </div>
679
  <div>
680
- <label class="block text-sm font-medium text-gray-700 mb-1">活動主題</label>
681
- <input type="text" id="var-theme" value="世界觀察員計畫" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
682
  </div>
683
  <div>
684
- <label class="block text-sm font-medium text-gray-700 mb-1">活動描述</label>
685
- <textarea id="var-description" rows="3" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">讓孩子透過文字探索自然,成為真正的世界觀察員!樂寫公益學習網誠摯邀請全國國小學生,參加『自然書寫徵文比賽』,展現你獨特的觀察力與創意思維。</textarea>
686
  </div>
687
  </div>
688
  </div>
689
 
690
- <!-- 活動資訊 -->
691
  <div class="bg-gray-50 p-4 rounded-lg mb-4">
692
- <h4 class="text-sm font-semibold text-gray-700 mb-3">活動資訊</h4>
693
  <div class="space-y-3">
694
  <div>
695
  <label class="block text-sm font-medium text-gray-700 mb-1">參加對象</label>
696
- <input type="text" id="var-participants" value="全國公私立國小學生(本屆小六畢業生亦可參加)。" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
697
  </div>
698
  <div>
699
- <label class="block text-sm font-medium text-gray-700 mb-1">進行方式</label>
700
- <textarea id="var-method" rows="2" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">本活動分為兩關兩獎進行,讓學生循序漸進培養寫作能力</textarea>
701
  </div>
 
 
 
 
 
 
 
702
  <div>
703
- <label class="block text-sm font-medium text-gray-700 mb-1">第一關說明</label>
704
- <input type="text" id="var-methodStep1" value="平台陪練寫作積分" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
705
  </div>
706
  <div>
707
  <label class="block text-sm font-medium text-gray-700 mb-1">活動期間</label>
708
- <textarea id="var-activityPeriod" rows="2" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">報名至2025年8月30日截止,於樂寫公益平台發表至少三篇文章,累積寫作經驗。</textarea>
709
  </div>
710
  <div>
711
- <label class="block text-sm font-medium text-gray-700 mb-1">積分獎說明</label>
712
- <input type="text" id="var-scoringInfo" value="企業參訪體驗" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
 
 
 
 
713
  </div>
714
  <div>
715
- <label class="block text-sm font-medium text-gray-700 mb-1">積分獎重點</label>
716
- <textarea id="var-scoringHighlight" rows="2" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">從報名活動到2025年8月31日前,於樂寫公益學習平台積分最高的前三十名得主,可獲得聯發科技企業參訪活動體驗資格</textarea>
717
  </div>
718
  </div>
719
  </div>
@@ -727,12 +956,12 @@
727
  <input type="text" id="var-stage2Title" value="徵文比賽" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
728
  </div>
729
  <div>
730
- <label class="block text-sm font-medium text-gray-700 mb-1">第二關期間</label>
731
- <input type="text" id="var-stage2Period" value="2025年9月1日至9月30" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
732
  </div>
733
  <div>
734
- <label class="block text-sm font-medium text-gray-700 mb-1">第二關說明</label>
735
- <textarea id="var-stage2Description" rows="2" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">通過第一關的學員將於8月31日收到徵文比賽邀請通知及徵文題目。</textarea>
736
  </div>
737
  <div>
738
  <label class="block text-sm font-medium text-gray-700 mb-1">徵文獎標題</label>
@@ -740,68 +969,98 @@
740
  </div>
741
  <div>
742
  <label class="block text-sm font-medium text-gray-700 mb-1">徵文獎說明</label>
743
- <textarea id="var-stage2AwardInfo" rows="3" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">初審入圍前一百名者可獲得電子獎狀一幅,複審前三十名者:榮獲流臨聯發科技頒獎,現場公布得獎獎項。</textarea>
744
  </div>
745
  </div>
746
  </div>
747
 
748
- <!-- 報名資訊 -->
749
  <div class="bg-gray-50 p-4 rounded-lg mb-4">
750
- <h4 class="text-sm font-semibold text-gray-700 mb-3">報名資訊</h4>
751
  <div class="space-y-3">
752
  <div>
753
  <label class="block text-sm font-medium text-gray-700 mb-1">個人報名說明</label>
754
- <textarea id="var-individualSignup" rows="3" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">請先填寫線上表單進行報名,平台會寄送確認信件開通您的帳號。完成報名後,即可開始在樂寫公益平台發表文章,累積寫作積分。</textarea>
755
  </div>
756
  <div>
757
- <label class="block text-sm font-medium text-gray-700 mb-1">學校報名說明</label>
758
- <textarea id="var-schoolSignup" rows="3" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">以學校或班級為單位填寫表單報名,樂寫專員將主動與校方聯繫,協助學生集體開通帳號,讓老師能夠更便利帶領全班參與這次有意義的寫作活動。</textarea>
759
  </div>
760
  </div>
761
  </div>
762
 
763
- <!-- 評分與時程 -->
764
  <div class="bg-gray-50 p-4 rounded-lg mb-4">
765
- <h4 class="text-sm font-semibold text-gray-700 mb-3">評分與時程</h4>
766
  <div class="space-y-3">
 
 
 
 
 
 
 
 
767
  <div>
768
  <label class="block text-sm font-medium text-gray-700 mb-1">評分標準 (JSON 格式)</label>
769
  <textarea id="var-scoringCriteria" rows="6" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent font-mono text-xs">[
770
  {"item": "內容與結構", "percentage": "25%", "description": "切合題旨,思想積極健康,論點合理,文字生動;結構嚴謹,行文流暢,兼具廣度與深度。"},
771
  {"item": "邏輯與修辭", "percentage": "25%", "description": "邏輯分明,條理清晰,敘事明白;用字遣詞合宜,修辭靈活優美。"},
772
  {"item": "創意與觀察", "percentage": "20%", "description": "富含想像力,觀察微小細節,洞悉人性幽微。"},
773
- {"item": "平台練習積分", "percentage": "20%", "description": "2025.5.1~2025.8.30期間,練習篇數與教練評分會影響最終積分。"},
774
  {"item": "標點符號與字詞正確", "percentage": "10%", "description": "標點符號運用得宜,詞能達義,無錯別字。"}
775
  ]</textarea>
776
  </div>
777
  <div>
778
- <label class="block text-sm font-medium text-gray-700 mb-1">時間線 (JSON 格式)</label>
779
- <textarea id="var-timeline" rows="3" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent font-mono text-xs">[
780
- {"date": "2025年11月17日(星期一)", "description": "於聯發科技總部舉行盛大頒獎典禮,並於當日公告最終得獎名單。得獎者將獲邀參加,一同分享寫作的喜悅與成果!"}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
781
  ]</textarea>
782
  </div>
 
 
 
 
783
  </div>
784
  </div>
785
 
786
  <!-- 聯絡資訊 -->
787
  <div class="bg-gray-50 p-4 rounded-lg mb-4">
788
- <h4 class="text-sm font-semibold text-gray-700 mb-3">聯絡資訊</h4>
789
  <div class="space-y-3">
790
  <div>
791
- <label class="block text-sm font-medium text-gray-700 mb-1">頁尾標題</label>
792
- <input type="text" id="var-footerTitle" value="活動資訊與聯絡方式" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
793
  </div>
794
  <div>
795
  <label class="block text-sm font-medium text-gray-700 mb-1">活動網頁</label>
796
  <input type="url" id="var-websiteUrl" value="https://www.colearn30.com/" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
797
  </div>
798
- <div>
799
- <label class="block text-sm font-medium text-gray-700 mb-1">Facebook 頁面</label>
800
- <input type="url" id="var-facebookUrl" value="https://www.facebook.com/CoWrite30" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
801
- </div>
802
  <div>
803
  <label class="block text-sm font-medium text-gray-700 mb-1">聯絡說明</label>
804
- <textarea id="var-contactInfo" rows="2" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">如有任何問題,歡迎透過樂寫公益學習臉書聯繫我們</textarea>
805
  </div>
806
  </div>
807
  </div>
@@ -817,43 +1076,65 @@
817
 
818
  <!-- JSON Mode -->
819
  <div id="variables-json" class="hidden">
820
- <textarea id="variables" class="w-full h-96 p-4 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent font-mono text-sm" placeholder='{"title": "標題", "subtitle": "副標題"}'>
821
  {
822
- "title": "2025聯發科技公益活動",
823
- "year": "2025",
824
- "eventType": "聯發科技公益活動",
825
  "theme": "世界觀察員計畫",
826
- "description": "讓孩子透過文字探索自然,成為真正的世界觀察員!樂寫公益學習網誠摯邀請全國國小學生,參加『自然書寫徵文比賽』,展現你獨特的觀察力與創意思維。",
827
- "participants": "全國公私立國小學生(本屆小六畢業生亦可參加)。",
828
- "method": "本活動分為兩關兩獎進行,讓學生循序漸進培養寫作能力",
829
- "methodStep1": "平台陪練寫作積分",
830
- "activityPeriod": "報名至2025年8月30日截止,於樂寫公益平台發表至少三篇文章,累積寫作經驗。",
831
- "scoringInfo": "企業參訪體驗",
832
- "scoringHighlight": "從報名活動到2025年8月31日前,於樂寫公益學習平台積分最高的前三十名得主,可獲得聯發科技企業參訪活動體驗資格",
833
- "methodHighlight": true,
834
- "stage2Info": true,
 
835
  "stage2Title": "徵文比賽",
836
- "stage2Period": "2025年9月1日至9月30",
837
- "stage2Description": "通過第一關的學員將於8月31日收到徵文比賽邀請通知及徵文題目。",
838
  "stage2AwardTitle": "徵文獎:企業受獎殊榮",
839
- "stage2AwardInfo": "初審入圍前一百名者可獲得電子獎狀一幅,複審前三十名者:榮獲流臨聯發科技頒獎,現場公布得獎獎項。",
840
- "hasCategories": true,
841
- "individualSignup": "請先填寫線上表單進行報名,平台會寄送確認信件開通您的帳號。完成報名後,即可開始在樂寫公益平台發表文章,累積寫作積分。",
842
- "schoolSignup": "以學校或班級為單位填寫表單報名,樂寫專員將主動與校方聯繫,協助學生集體開通帳號,讓老師能夠更便利帶領全班參與這次有意義的寫作活動。",
 
 
 
 
843
  "scoringCriteria": [
844
  {"item": "內容與結構", "percentage": "25%", "description": "切合題旨,思想積極健康,��點合理,文字生動;結構嚴謹,行文流暢,兼具廣度與深度。"},
845
  {"item": "邏輯與修辭", "percentage": "25%", "description": "邏輯分明,條理清晰,敘事明白;用字遣詞合宜,修辭靈活優美。"},
846
  {"item": "創意與觀察", "percentage": "20%", "description": "富含想像力,觀察微小細節,洞悉人性幽微。"},
847
- {"item": "平台練習積分", "percentage": "20%", "description": "2025.5.1~2025.8.30期間,練習篇數與教練評分會影響最終積分。"},
848
  {"item": "標點符號與字詞正確", "percentage": "10%", "description": "標點符號運用得宜,詞能達義,無錯別字。"}
849
  ],
850
- "timeline": [
851
- {"date": "2025年11月17日(星期一)", "description": "於聯發科技總部舉行盛大頒獎典禮,並於當日公告最終得獎名單。得獎者將獲邀參加,一同分享寫作的喜悅與成果!"}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
852
  ],
853
- "footerTitle": "活動資訊與聯絡方式",
 
854
  "websiteUrl": "https://www.colearn30.com/",
855
- "facebookUrl": "https://www.facebook.com/CoWrite30",
856
- "contactInfo": "如有任何問題,歡迎透過樂寫公益學習臉書聯繫我們"
857
  }</textarea>
858
  </div>
859
  </div>
@@ -1133,30 +1414,18 @@
1133
  }
1134
  });
1135
 
1136
- // Add boolean flags
1137
- variables.methodHighlight = true;
1138
- variables.stage2Info = true;
1139
- variables.hasCategories = true;
1140
-
1141
- // Parse scoring criteria from JSON if exists
1142
- try {
1143
- const scoringElement = document.getElementById('var-scoringCriteria');
1144
- if (scoringElement && scoringElement.value) {
1145
- variables.scoringCriteria = JSON.parse(scoringElement.value);
1146
- }
1147
- } catch (e) {
1148
- console.error('Error parsing scoring criteria:', e);
1149
- }
1150
-
1151
- // Parse timeline from JSON if exists
1152
- try {
1153
- const timelineElement = document.getElementById('var-timeline');
1154
- if (timelineElement && timelineElement.value) {
1155
- variables.timeline = JSON.parse(timelineElement.value);
1156
  }
1157
- } catch (e) {
1158
- console.error('Error parsing timeline:', e);
1159
- }
1160
 
1161
  // Add custom variables
1162
  const customVars = document.querySelectorAll('[id^="custom-var-"]');
@@ -1210,12 +1479,11 @@
1210
 
1211
  // Add event listeners for form inputs
1212
  const formFields = [
1213
- 'title', 'year', 'eventType', 'theme', 'description',
1214
- 'participants', 'method', 'methodStep1', 'activityPeriod',
1215
- 'scoringInfo', 'scoringHighlight', 'stage2Title', 'stage2Period',
1216
- 'stage2Description', 'stage2AwardTitle', 'stage2AwardInfo',
1217
- 'individualSignup', 'schoolSignup', 'footerTitle',
1218
- 'websiteUrl', 'facebookUrl', 'contactInfo'
1219
  ];
1220
 
1221
  // Remove auto-update listeners - only sync form to JSON when switching modes
@@ -1329,16 +1597,33 @@
1329
  // Store generated HTML globally
1330
  let generatedHTML = '';
1331
 
1332
- // Preview HTML in new window
1333
  function previewHTML() {
1334
  if (!generatedHTML) {
1335
  showToast('請先生成 HTML', 'error');
1336
  return;
1337
  }
1338
 
1339
- const previewWindow = window.open('', '_blank');
1340
- previewWindow.document.write(generatedHTML);
1341
- previewWindow.document.close();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1342
  }
1343
 
1344
  // Copy HTML to clipboard
 
141
  <head>
142
  <meta charset="UTF-8">
143
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
144
+ <title>{{ mainTitle }} - {{ theme }}</title>
 
145
  <style>
146
  * {
147
  margin: 0;
148
  padding: 0;
149
  box-sizing: border-box;
150
  }
151
+
152
  body {
153
+ font-family: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
 
 
154
  line-height: 1.6;
155
+ color: #333;
156
+ background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
157
  }
158
+
159
  .container {
160
+ max-width: 1200px;
161
  margin: 0 auto;
162
+ padding: 20px;
 
 
 
 
 
 
 
 
 
163
  }
164
+
165
+ .header {
166
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
167
+ color: white;
168
+ text-align: center;
169
+ padding: 60px 20px;
170
+ border-radius: 20px;
171
+ margin-bottom: 30px;
172
+ box-shadow: 0 20px 40px rgba(0,0,0,0.1);
 
173
  }
174
+
175
+ .header h1 {
176
+ font-size: 2.5rem;
177
+ margin-bottom: 15px;
178
+ font-weight: 700;
 
 
 
179
  }
180
+
181
+ .header h2 {
182
+ font-size: 1.8rem;
 
183
  margin-bottom: 20px;
184
+ font-weight: 400;
185
+ opacity: 0.9;
186
  }
187
+
188
+ .header p {
189
+ font-size: 1.2rem;
 
190
  margin-bottom: 30px;
191
+ opacity: 0.8;
 
 
 
 
 
192
  line-height: 1.8;
 
193
  }
194
+
195
+ .buttons {
196
  display: flex;
197
  gap: 20px;
198
+ justify-content: center;
199
+ flex-wrap: wrap;
200
  }
201
+
202
  .btn {
203
  padding: 15px 30px;
204
+ border: none;
205
+ border-radius: 50px;
206
+ font-size: 1.1rem;
207
+ font-weight: 600;
208
  text-decoration: none;
 
209
  transition: all 0.3s ease;
210
+ cursor: pointer;
211
  }
212
+
213
  .btn-primary {
214
+ background: #438951;
215
  color: white;
216
  }
217
+
 
 
 
 
 
 
218
  .btn-secondary {
219
+ background: transparent;
 
 
 
 
 
 
220
  color: white;
221
+ border: 2px solid white;
222
  }
223
+
224
+ .btn:hover {
225
+ transform: translateY(-3px);
226
+ box-shadow: 0 10px 25px rgba(0,0,0,0.2);
227
  }
228
+
229
+ .card {
230
+ background: white;
 
 
231
  border-radius: 20px;
232
+ padding: 40px;
233
+ margin-bottom: 30px;
234
+ box-shadow: 0 15px 35px rgba(0,0,0,0.1);
235
+ transition: transform 0.3s ease;
236
  }
237
+
238
+ .card:hover {
239
+ transform: translateY(-5px);
 
240
  }
241
+
242
+ .card h2 {
243
+ color: #333;
244
+ font-size: 2rem;
245
+ margin-bottom: 25px;
246
+ border-bottom: 3px solid #438951;
247
+ padding-bottom: 10px;
248
  }
249
+
250
+ .highlight {
251
+ color: #F44444;
252
+ font-weight: bold;
 
 
253
  }
254
+
255
+ /* Flow Design Styles */
256
+ .target-section, .method-section {
257
  background: #f8f9fa;
258
+ padding: 20px;
259
+ border-radius: 10px;
260
+ margin-bottom: 25px;
261
+ border-left: 5px solid #438951;
262
+ }
263
+
264
+ .target-section h3, .method-section h3 {
265
+ color: #438951;
266
+ margin: 0 0 10px 0;
267
+ font-size: 1.3rem;
268
+ }
269
+
270
+ .flow-container {
271
+ margin-top: 30px;
272
+ position: relative;
273
+ }
274
+
275
+ .flow-section {
276
+ background: white;
277
+ border: 2px solid #e9ecef;
278
+ border-radius: 20px;
279
  padding: 30px;
280
+ margin-bottom: 40px;
281
+ box-shadow: 0 10px 30px rgba(0,0,0,0.1);
282
+ transition: all 0.3s ease;
283
+ position: relative;
284
  }
285
+
286
+ .flow-section:hover {
287
  transform: translateY(-5px);
288
+ box-shadow: 0 20px 40px rgba(0,0,0,0.15);
289
  }
290
+
291
+ .flow-header {
 
 
 
292
  display: flex;
293
  align-items: center;
294
+ margin-bottom: 25px;
295
+ padding-bottom: 15px;
296
+ border-bottom: 2px solid #f1f3f4;
297
  }
298
+
299
+ .stage-number {
300
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
301
+ color: white;
302
+ width: 80px;
303
+ height: 80px;
304
  border-radius: 50%;
305
+ display: flex;
306
  align-items: center;
307
  justify-content: center;
308
+ font-weight: bold;
309
+ font-size: 1rem;
310
+ margin-right: 20px;
311
+ flex-shrink: 0;
312
+ box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
313
  }
314
+
315
+ .flow-header h3 {
316
+ color: #333;
317
+ margin: 0;
318
+ font-size: 1.8rem;
319
+ font-weight: 600;
 
320
  }
321
+
322
+ .flow-details {
323
+ background: #f8f9fa;
324
+ border-radius: 15px;
325
+ padding: 25px;
326
+ margin-bottom: 20px;
327
  }
328
+
329
+ .detail-item {
330
+ display: flex;
331
+ justify-content: space-between;
332
+ align-items: flex-start;
333
+ margin-bottom: 15px;
334
+ padding: 10px 0;
335
+ border-bottom: 1px solid #e9ecef;
336
  }
337
+
338
+ .detail-item:last-child {
339
+ border-bottom: none;
340
+ margin-bottom: 0;
 
 
 
341
  }
342
+
343
+ .detail-label {
344
+ font-weight: 600;
345
+ color: #495057;
346
+ min-width: 100px;
347
+ margin-right: 15px;
348
+ }
349
+
350
+ .detail-value {
351
+ flex: 1;
352
+ text-align: right;
353
+ }
354
+
355
+ .flow-arrow {
356
  text-align: center;
357
+ font-size: 2rem;
358
+ color: #438951;
359
+ margin: 15px 0;
360
+ font-weight: bold;
361
  }
362
+
363
+ .reward-box {
364
+ background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
365
+ color: white;
366
+ border-radius: 15px;
367
+ padding: 25px;
368
+ display: flex;
369
+ align-items: center;
370
+ box-shadow: 0 5px 20px rgba(67, 233, 123, 0.3);
371
  }
372
+
373
+ .reward-icon {
374
+ font-size: 3rem;
375
+ margin-right: 20px;
376
+ flex-shrink: 0;
377
+ }
378
+
379
+ .reward-content h4 {
380
+ margin: 0 0 10px 0;
381
+ font-size: 1.4rem;
382
+ font-weight: 600;
383
+ }
384
+
385
+ .reward-content p {
386
+ margin: 0;
387
+ opacity: 0.95;
388
+ line-height: 1.5;
389
+ }
390
+
391
+ .stage-connector {
392
  display: flex;
393
  align-items: center;
394
  justify-content: center;
395
+ margin: -20px 0;
396
+ position: relative;
397
+ z-index: 10;
398
  }
399
+
400
+ .connector-line {
401
+ width: 3px;
402
+ height: 40px;
403
+ background: linear-gradient(to bottom, #438951, #28a745);
404
+ position: relative;
405
  }
406
+
407
+ .connector-line::after {
408
+ content: '';
409
+ position: absolute;
410
+ bottom: -8px;
411
+ left: 50%;
412
+ transform: translateX(-50%);
413
+ width: 0;
414
+ height: 0;
415
+ border-left: 8px solid transparent;
416
+ border-right: 8px solid transparent;
417
+ border-top: 12px solid #28a745;
418
  }
419
+
420
+ /* Additional sections */
421
+ .registration-grid {
422
+ display: grid;
423
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
424
+ gap: 25px;
425
+ margin: 30px 0;
426
+ }
427
+
428
+ .registration-item {
429
+ background: #f8f9fa;
430
+ padding: 25px;
431
+ border-radius: 15px;
432
+ text-align: center;
433
+ border: 2px solid #e9ecef;
434
+ transition: all 0.3s ease;
435
+ }
436
+
437
+ .registration-item:hover {
438
+ border-color: #438951;
439
+ transform: translateY(-3px);
440
+ }
441
+
442
+ .registration-item img {
443
+ width: 100%;
444
+ max-width: 200px;
445
+ height: auto;
446
+ border-radius: 10px;
447
+ margin-bottom: 15px;
448
+ }
449
+
450
+ .evaluation-table {
451
+ overflow-x: auto;
452
+ margin: 25px 0;
453
+ }
454
+
455
+ table {
456
  width: 100%;
 
 
457
  border-collapse: collapse;
458
  background: white;
 
459
  border-radius: 10px;
460
  overflow: hidden;
461
+ box-shadow: 0 5px 15px rgba(0,0,0,0.1);
462
  }
463
+
464
+ th, td {
465
+ padding: 15px;
 
466
  text-align: left;
467
+ border-bottom: 1px solid #e9ecef;
468
  }
469
+
470
+ th {
471
+ background: #438951;
472
  color: white;
473
+ font-weight: 600;
474
  }
475
+
476
+ tr:hover {
477
+ background: #f8f9fa;
478
  }
479
+
480
+ .requirements-grid {
481
+ display: grid;
482
+ grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
483
+ gap: 20px;
484
+ margin: 25px 0;
485
  }
486
+
487
+ .requirement-item {
488
+ background: #e8f5e8;
489
+ padding: 20px;
490
+ border-radius: 10px;
491
+ border-left: 4px solid #438951;
492
  }
493
+
494
+ .notes-grid {
495
+ display: grid;
496
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
497
+ gap: 20px;
498
+ margin: 25px 0;
499
  }
500
+
501
+ .note-item {
502
+ background: #fff3cd;
503
+ padding: 20px;
504
+ border-radius: 10px;
505
+ border-left: 4px solid #ffc107;
506
+ }
507
+
508
  .timeline-item {
509
+ display: flex;
510
+ align-items: center;
511
+ margin-bottom: 30px;
512
+ position: relative;
513
+ }
514
+
515
+ .timeline-number {
516
+ width: 50px;
517
+ height: 50px;
518
+ background: #438951;
519
+ color: white;
520
+ border-radius: 50%;
521
+ display: flex;
522
+ align-items: center;
523
+ justify-content: center;
524
+ font-weight: bold;
525
+ font-size: 1.2rem;
526
+ margin-right: 25px;
527
+ flex-shrink: 0;
528
+ }
529
+
530
+ .timeline-content {
531
+ background: #f8f9fa;
532
+ padding: 20px;
533
  border-radius: 10px;
534
+ flex: 1;
 
 
535
  }
536
+
537
+ .awards-list {
538
+ list-style: none;
539
+ margin: 15px 0;
 
 
540
  }
541
+
542
+ .awards-list li {
543
+ padding: 8px 0;
544
+ padding-left: 20px;
545
+ position: relative;
546
+ }
547
+
548
+ .awards-list li:before {
549
+ content: "🏆";
550
+ position: absolute;
551
+ left: 0;
552
+ }
553
+
554
+ .important-dates {
555
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
556
  color: white;
557
  padding: 40px;
558
+ border-radius: 20px;
559
  text-align: center;
560
  }
561
+
562
+ .dates-grid {
563
+ display: grid;
564
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
565
+ gap: 25px;
566
+ margin-top: 25px;
567
  }
568
+
569
+ .date-item {
570
+ background: rgba(255,255,255,0.1);
571
+ padding: 20px;
572
+ border-radius: 15px;
573
+ backdrop-filter: blur(10px);
574
  }
575
+
 
576
  @media (max-width: 768px) {
577
+ .header h1 {
578
+ font-size: 2rem;
579
+ }
580
+
581
+ .header h2 {
582
+ font-size: 1.4rem;
583
+ }
584
+
585
+ .flow-header {
586
  flex-direction: column;
587
+ text-align: center;
588
  }
589
+
590
+ .stage-number {
591
+ margin-right: 0;
592
+ margin-bottom: 15px;
593
  }
594
+
595
+ .detail-item {
596
+ flex-direction: column;
597
+ align-items: flex-start;
598
  }
599
+
600
+ .detail-value {
601
+ text-align: left;
602
+ margin-top: 5px;
603
  }
604
+
605
+ .reward-box {
606
+ flex-direction: column;
607
+ text-align: center;
608
+ }
609
+
610
+ .reward-icon {
611
+ margin-right: 0;
612
+ margin-bottom: 15px;
613
  }
614
  }
615
  </style>
616
  </head>
617
  <body>
618
  <div class="container">
619
+ <!-- Header -->
620
+ <div class="header">
621
+ <h1>{{ mainTitle }}</h1>
622
+ <h2>{{ theme }}</h2>
623
+ <p>{{ headerDescription }}</p>
624
+
625
+ <div class="buttons">
626
+ <a href="{{ personalRegUrl }}" class="btn btn-primary">個人報名</a>
627
+ <a href="{{ schoolRegUrl }}" class="btn btn-secondary">學校報名</a>
 
 
 
 
 
 
 
 
 
 
628
  </div>
629
+ </div>
630
+
631
+ <!-- 活動辦法 -->
632
+ <div class="card">
633
+ <h2>活動辦法</h2>
634
 
635
+ <div class="target-section">
636
+ <h3>🎯 參加對象</h3>
637
+ <p>{{ participants }}</p>
638
+ </div>
639
+
640
+ <div class="method-section">
641
+ <h3>🚀 進行方式</h3>
642
+ <p>{{ methodIntro }}</p>
643
+ </div>
644
+
645
+ <div class="flow-container">
646
+ <!-- 第一階段 -->
647
+ <div class="flow-section">
648
+ <div class="flow-header">
649
+ <div class="stage-number">第一關</div>
650
+ <h3>{{ stage1Title }}</h3>
651
+ </div>
652
+
653
+ <div class="flow-content">
654
+ <div class="flow-details">
655
+ <div class="detail-item">
656
+ <span class="detail-label">活動期間</span>
657
+ <span class="detail-value">{{ stage1Period }}</span>
658
+ </div>
659
+ <div class="detail-item">
660
+ <span class="detail-label">任務要求</span>
661
+ <span class="detail-value">{{ stage1Requirements }}</span>
662
+ </div>
663
+ </div>
664
+
665
+ <div class="flow-arrow">↓</div>
666
+
667
+ <div class="reward-box">
668
+ <div class="reward-icon">🏆</div>
669
+ <div class="reward-content">
670
+ <h4>{{ stage1AwardTitle }}</h4>
671
+ <p>{{ stage1AwardDesc }}</p>
672
+ </div>
673
+ </div>
674
+ </div>
675
  </div>
676
 
677
+ <!-- 連接線 -->
678
+ <div class="stage-connector">
679
+ <div class="connector-line"></div>
 
 
 
 
 
 
680
  </div>
681
 
682
+ <!-- 第二階段 -->
683
+ <div class="flow-section">
684
+ <div class="flow-header">
685
+ <div class="stage-number">第二關</div>
686
+ <h3>{{ stage2Title }}</h3>
687
+ </div>
688
+
689
+ <div class="flow-content">
690
+ <div class="flow-details">
691
+ <div class="detail-item">
692
+ <span class="detail-label">活動期間</span>
693
+ <span class="detail-value">{{ stage2Period }}</span>
694
+ </div>
695
+ <div class="detail-item">
696
+ <span class="detail-label">邀請通知</span>
697
+ <span class="detail-value">{{ stage2Notice }}</span>
698
+ </div>
699
+ </div>
700
+
701
+ <div class="flow-arrow">↓</div>
702
+
703
+ <div class="reward-box">
704
+ <div class="reward-icon">🎖️</div>
705
+ <div class="reward-content">
706
+ <h4>{{ stage2AwardTitle }}</h4>
707
+ <p>{{ stage2AwardDesc }}</p>
708
+ </div>
709
+ </div>
710
  </div>
 
711
  </div>
712
  </div>
713
+ </div>
714
+
715
+ <!-- 報名說明 -->
716
+ <div class="card">
717
+ <h2>報名說明</h2>
718
 
719
+ <div class="registration-grid">
720
+ <div class="registration-item">
721
+ <h4>個人報名</h4>
722
+ <p>{{ personalRegDesc }}</p>
 
 
723
  </div>
724
 
725
+ <div class="registration-item">
726
+ <h4>團體報名</h4>
727
+ <p>{{ schoolRegDesc }}</p>
728
  </div>
729
  </div>
730
+ </div>
731
+
732
+ {% if requirements %}
733
+ <!-- 評選條件 -->
734
+ <div class="card">
735
+ <h2>評選條件</h2>
 
736
 
737
+ <div class="requirements-grid">
738
+ {% for req in requirements %}
739
+ <div class="requirement-item">
740
+ <h4>{{ req.title }}</h4>
741
+ <p>{{ req.content }}</p>
 
 
 
 
 
 
742
  </div>
743
+ {% endfor %}
744
  </div>
745
+ </div>
746
  {% endif %}
747
+
 
748
  {% if scoringCriteria %}
749
+ <!-- 評分標準 -->
750
+ <div class="card">
751
+ <h2>評分標準</h2>
752
 
753
+ <div class="evaluation-table">
754
+ <table>
755
+ <thead>
756
+ <tr>
757
+ <th>評分項目</th>
758
+ <th>評分占比</th>
759
+ <th>內容說明</th>
760
+ </tr>
761
+ </thead>
762
+ <tbody>
763
+ {% for criteria in scoringCriteria %}
764
+ <tr>
765
+ <td>{{ criteria.item }}</td>
766
+ <td>{{ criteria.percentage }}</td>
767
+ <td>{{ criteria.description }}</td>
768
+ </tr>
769
+ {% endfor %}
770
+ </tbody>
771
+ </table>
772
+ </div>
773
+ </div>
774
  {% endif %}
775
+
776
+ {% if notes %}
777
+ <!-- 注意事項與評審辦法 -->
778
+ <div class="card">
779
+ <h2>注意事項與評審辦法</h2>
780
 
781
+ <div class="notes-grid">
782
+ {% for note in notes %}
783
+ <div class="note-item">
784
+ <h4>{{ note.title }}</h4>
785
+ <p>{{ note.content }}</p>
786
  </div>
787
  {% endfor %}
788
  </div>
789
+ </div>
790
  {% endif %}
791
+
792
+ {% if awards %}
793
+ <!-- 獎勵辦法 -->
794
+ <div class="card">
795
+ <h2>獎勵辦法</h2>
796
+
797
+ <div class="awards-timeline">
798
+ {% for award in awards %}
799
+ <div class="timeline-item">
800
+ <div class="timeline-number">{{ loop.index }}</div>
801
+ <div class="timeline-content">
802
+ <h4>{{ award.title }}</h4>
803
+ <p>{{ award.description }}</p>
804
+ {% if 'items' in award %}
805
+ <ul class="awards-list">
806
+ {% for item in award['items'] %}
807
+ <li>{{ item }}</li>
808
+ {% endfor %}
809
+ </ul>
810
+ {% endif %}
811
+ </div>
812
+ </div>
813
+ {% endfor %}
814
+ </div>
815
+
816
+ {% if awardNote %}
817
+ <div style="text-align: center; margin-top: 30px; padding: 20px; background: #e8f5e8; border-radius: 10px;">
818
+ <h3 style="color: #438951;">{{ awardNote }}</h3>
819
+ </div>
820
  {% endif %}
821
+ </div>
822
+ {% endif %}
823
+
824
+ <!-- 重要日期與聯絡方式 -->
825
+ <div class="important-dates">
826
+ <h2>重要日期與聯絡方式</h2>
827
+
828
+ <div class="dates-grid">
829
+ {% if ceremonyDate %}
830
+ <div class="date-item">
831
+ <h4>頒獎典禮</h4>
832
+ <p>{{ ceremonyDate }}</p>
833
+ </div>
834
+ {% endif %}
835
+
836
+ <div class="date-item">
837
+ <h4>活動資訊與聯絡方式</h4>
838
+ {% if websiteUrl %}
839
+ <p>活動網頁:<a href="{{ websiteUrl }}" style="color: #fff;">{{ websiteUrl }}</a></p>
840
+ {% endif %}
841
+ {% if contactInfo %}
842
+ <p>{{ contactInfo }}</p>
843
+ {% endif %}
844
+ </div>
845
+ </div>
846
+ </div>
847
  </div>
848
  </body>
849
  </html>{% endraw %}</textarea>
 
878
 
879
  <!-- Form Mode -->
880
  <div id="variables-form" class="space-y-4">
881
+ <!-- 標題區塊 -->
882
  <div class="bg-gray-50 p-4 rounded-lg mb-4">
883
+ <h4 class="text-sm font-semibold text-gray-700 mb-3">標題區塊</h4>
884
  <div class="space-y-3">
885
  <div>
886
+ <label class="block text-sm font-medium text-gray-700 mb-1">主標題</label>
887
+ <input type="text" id="var-mainTitle" value="2025聯發科技公益活動" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
888
  </div>
889
  <div>
890
+ <label class="block text-sm font-medium text-gray-700 mb-1">活動主題</label>
891
+ <input type="text" id="var-theme" value="世界觀察員計畫" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
892
  </div>
893
  <div>
894
+ <label class="block text-sm font-medium text-gray-700 mb-1">標題描述</label>
895
+ <textarea id="var-headerDescription" rows="3" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">讓孩子透過文字探索自然,成為真正的世界觀察員!樂寫公益學習網誠摯邀請全國國小學生,參加&lt;strong&gt;自然書寫徵文比賽&lt;/strong&gt;,展現你獨特的觀察力與創意思維。</textarea>
896
  </div>
897
  <div>
898
+ <label class="block text-sm font-medium text-gray-700 mb-1">個人報名連結</label>
899
+ <input type="url" id="var-personalRegUrl" value="https://www.colearn30.com/" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
900
  </div>
901
  <div>
902
+ <label class="block text-sm font-medium text-gray-700 mb-1">學校報名連結</label>
903
+ <input type="url" id="var-schoolRegUrl" value="https://www.facebook.com/CoWrite30" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
904
  </div>
905
  </div>
906
  </div>
907
 
908
+ <!-- 活動辦法 -->
909
  <div class="bg-gray-50 p-4 rounded-lg mb-4">
910
+ <h4 class="text-sm font-semibold text-gray-700 mb-3">活動辦法</h4>
911
  <div class="space-y-3">
912
  <div>
913
  <label class="block text-sm font-medium text-gray-700 mb-1">參加對象</label>
914
+ <input type="text" id="var-participants" value="全國公私立國小學生(本屆小六畢業生亦可參加)" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
915
  </div>
916
  <div>
917
+ <label class="block text-sm font-medium text-gray-700 mb-1">進行方式說明</label>
918
+ <textarea id="var-methodIntro" rows="2" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">本活動分為&lt;span class="highlight"&gt;兩關兩獎&lt;/span&gt;進行,讓學生循序漸進培養寫作能力</textarea>
919
  </div>
920
+ </div>
921
+ </div>
922
+
923
+ <!-- 第一關資訊 -->
924
+ <div class="bg-gray-50 p-4 rounded-lg mb-4">
925
+ <h4 class="text-sm font-semibold text-gray-700 mb-3">第一關:平台陪練寫作積分</h4>
926
+ <div class="space-y-3">
927
  <div>
928
+ <label class="block text-sm font-medium text-gray-700 mb-1">第一關標題</label>
929
+ <input type="text" id="var-stage1Title" value="平台陪練寫作積分" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
930
  </div>
931
  <div>
932
  <label class="block text-sm font-medium text-gray-700 mb-1">活動期間</label>
933
+ <input type="text" id="var-stage1Period" value="報名至 &lt;span class='highlight'&gt;2025年8月30日&lt;/span&gt; 截止" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
934
  </div>
935
  <div>
936
+ <label class="block text-sm font-medium text-gray-700 mb-1">任務要求</label>
937
+ <textarea id="var-stage1Requirements" rows="2" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">於樂寫公益平台發表至少 &lt;span class="highlight"&gt;三篇文章&lt;/span&gt;,累積寫作經驗</textarea>
938
+ </div>
939
+ <div>
940
+ <label class="block text-sm font-medium text-gray-700 mb-1">積分獎標題</label>
941
+ <input type="text" id="var-stage1AwardTitle" value="積分獎:企業參訪體驗" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
942
  </div>
943
  <div>
944
+ <label class="block text-sm font-medium text-gray-700 mb-1">積分獎說明</label>
945
+ <textarea id="var-stage1AwardDesc" rows="3" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">從報名活動到 &lt;span class="highlight"&gt;2025年8月31日&lt;/span&gt; 前,於樂寫公益學習平台 &lt;span class="highlight"&gt;積分最高的前三十名&lt;/span&gt; 得主,可獲得聯發科技企業參訪活動體驗資格</textarea>
946
  </div>
947
  </div>
948
  </div>
 
956
  <input type="text" id="var-stage2Title" value="徵文比賽" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
957
  </div>
958
  <div>
959
+ <label class="block text-sm font-medium text-gray-700 mb-1">活動期間</label>
960
+ <input type="text" id="var-stage2Period" value="&lt;span class='highlight'&gt;2025年9月1日至9月30日&lt;/span&gt;" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
961
  </div>
962
  <div>
963
+ <label class="block text-sm font-medium text-gray-700 mb-1">邀請通知</label>
964
+ <textarea id="var-stage2Notice" rows="2" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">通過第一關的學員將於8月31日收到徵文比賽邀請通知及徵文題目</textarea>
965
  </div>
966
  <div>
967
  <label class="block text-sm font-medium text-gray-700 mb-1">徵文獎標題</label>
 
969
  </div>
970
  <div>
971
  <label class="block text-sm font-medium text-gray-700 mb-1">徵文獎說明</label>
972
+ <textarea id="var-stage2AwardDesc" rows="3" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">初審入圍前一百名者可獲得電子獎狀一幀,複審前三十名者,榮獲蒞臨聯發科技頒獎,現場公布得獎獎項</textarea>
973
  </div>
974
  </div>
975
  </div>
976
 
977
+ <!-- 報名說明 -->
978
  <div class="bg-gray-50 p-4 rounded-lg mb-4">
979
+ <h4 class="text-sm font-semibold text-gray-700 mb-3">報名說明</h4>
980
  <div class="space-y-3">
981
  <div>
982
  <label class="block text-sm font-medium text-gray-700 mb-1">個人報名說明</label>
983
+ <textarea id="var-personalRegDesc" rows="3" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">請先填寫線上表單進行報名,平台會寄送確認信件開通您的帳號。完成報名後,即可開始在樂寫公益平台發表文章,累積寫作積分。</textarea>
984
  </div>
985
  <div>
986
+ <label class="block text-sm font-medium text-gray-700 mb-1">團體報名說明</label>
987
+ <textarea id="var-schoolRegDesc" rows="3" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">以學校或班級為單位填寫表單報名,樂寫專員將主動與校方聯繫,協助學生集體開通帳號,讓老師能夠更便利帶領全班參與這次有意義的寫作活動。</textarea>
988
  </div>
989
  </div>
990
  </div>
991
 
992
+ <!-- 進階設定 -->
993
  <div class="bg-gray-50 p-4 rounded-lg mb-4">
994
+ <h4 class="text-sm font-semibold text-gray-700 mb-3">進階設定</h4>
995
  <div class="space-y-3">
996
+ <div>
997
+ <label class="block text-sm font-medium text-gray-700 mb-1">評選條件 (JSON 格式)</label>
998
+ <textarea id="var-requirements" rows="4" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent font-mono text-xs">[
999
+ {"title": "字數與格式要求", "content": "徵文字數至少五百字。電腦打字需使用全形符號;於樂寫公益學習網平台個人帳號上傳。"},
1000
+ {"title": "原創性要求", "content": "作品必須未曾在任何形式的平面和網路媒體(樂寫公益平台除外)發表,嚴禁抄襲及代筆(包括AI),違者取消資格。"},
1001
+ {"title": "投稿注意事項", "content": "稿件送出前,請確認內容正確性(包含錯字、斷行、特殊字、空格等)。為公平起見,投稿後不可再修改文章。"}
1002
+ ]</textarea>
1003
+ </div>
1004
  <div>
1005
  <label class="block text-sm font-medium text-gray-700 mb-1">評分標準 (JSON 格式)</label>
1006
  <textarea id="var-scoringCriteria" rows="6" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent font-mono text-xs">[
1007
  {"item": "內容與結構", "percentage": "25%", "description": "切合題旨,思想積極健康,論點合理,文字生動;結構嚴謹,行文流暢,兼具廣度與深度。"},
1008
  {"item": "邏輯與修辭", "percentage": "25%", "description": "邏輯分明,條理清晰,敘事明白;用字遣詞合宜,修辭靈活優美。"},
1009
  {"item": "創意與觀察", "percentage": "20%", "description": "富含想像力,觀察微小細節,洞悉人性幽微。"},
1010
+ {"item": "平台練習積分", "percentage": "20%", "description": "2025.5.1-2025.8.30期間,練習篇數與教練評分會影響最終積分。"},
1011
  {"item": "標點符號與字詞正確", "percentage": "10%", "description": "標點符號運用得宜,詞能達義,無錯別字。"}
1012
  ]</textarea>
1013
  </div>
1014
  <div>
1015
+ <label class="block text-sm font-medium text-gray-700 mb-1">注意事項 (JSON 格式)</label>
1016
+ <textarea id="var-notes" rows="3" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent font-mono text-xs">[
1017
+ {"title": "創作注意事項", "content": "作文以白話文寫作,不得使用文言文、詩歌、韻文寫作;使用標準字體,並詳加全形標點符號;內文不得書寫姓名、校名等個人資訊"},
1018
+ {"title": "評審辦法", "content": "本比賽採初審、複審、決審三輪制,聘請樂寫平台資深志工教練群、知名作家、專家學者、與聯發科技長官共同參與評比,確保評選過程公平公正。"}
1019
+ ]</textarea>
1020
+ </div>
1021
+ <div>
1022
+ <label class="block text-sm font-medium text-gray-700 mb-1">獎勵辦法 (JSON 格式)</label>
1023
+ <textarea id="var-awards" rows="8" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent font-mono text-xs">[
1024
+ {
1025
+ "title": "勤筆獎勵—企業參訪體驗",
1026
+ "description": "從報名活動到8/31前,於樂寫公益學習平台積分最高的前三十名得主,可獲得聯發科技��業參訪活動體驗資格。"
1027
+ },
1028
+ {
1029
+ "title": "徵文比賽大獎",
1030
+ "description": "本屆徵文比賽前三十名表現優異者獲「大使獎」殊榮",
1031
+ "items": [
1032
+ "世界觀察大使獎:本屆文學獎總表現第一名",
1033
+ "觀察善思大使獎:善於觀察,描寫人事物具體詳細,能在平凡中見不凡",
1034
+ "永續發展大使獎:關懷社會議題,對於弱勢富有同理心,對於土地願意思考如何更好",
1035
+ "勤筆精修大使獎:在樂寫平台願意多次修改文章,志工教練認可勤寫精修的作者",
1036
+ "真誠感動大使獎:表達真實情感,運用富有感情的文字打動人",
1037
+ "創意巧思大使獎:展現創造力,勇於發表個人獨特見解"
1038
+ ]
1039
+ }
1040
  ]</textarea>
1041
  </div>
1042
+ <div>
1043
+ <label class="block text-sm font-medium text-gray-700 mb-1">獎勵備註</label>
1044
+ <input type="text" id="var-awardNote" value="得獎者將獲頒獎盃一座,並成為聯發科技「世界觀察員」推廣大使!" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
1045
+ </div>
1046
  </div>
1047
  </div>
1048
 
1049
  <!-- 聯絡資訊 -->
1050
  <div class="bg-gray-50 p-4 rounded-lg mb-4">
1051
+ <h4 class="text-sm font-semibold text-gray-700 mb-3">重要日期與聯絡方式</h4>
1052
  <div class="space-y-3">
1053
  <div>
1054
+ <label class="block text-sm font-medium text-gray-700 mb-1">頒獎典禮</label>
1055
+ <textarea id="var-ceremonyDate" rows="2" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">2025年11月17日(星期一)於聯發科技總部舉行盛大頒獎典禮,並於當日公告最終得獎名單。得獎者將獲邀參加,一同分享寫作的喜悅與成果!</textarea>
1056
  </div>
1057
  <div>
1058
  <label class="block text-sm font-medium text-gray-700 mb-1">活動網頁</label>
1059
  <input type="url" id="var-websiteUrl" value="https://www.colearn30.com/" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">
1060
  </div>
 
 
 
 
1061
  <div>
1062
  <label class="block text-sm font-medium text-gray-700 mb-1">聯絡說明</label>
1063
+ <textarea id="var-contactInfo" rows="2" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent">如有任何問題,歡迎透過樂寫公益學習臉書聯繫我們:&lt;a href="https://www.facebook.com/CoWrite30" style="color: #fff;"&gt;https://www.facebook.com/CoWrite30&lt;/a&gt;</textarea>
1064
  </div>
1065
  </div>
1066
  </div>
 
1076
 
1077
  <!-- JSON Mode -->
1078
  <div id="variables-json" class="hidden">
1079
+ <textarea id="variables" class="w-full h-96 p-4 border rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent font-mono text-sm" placeholder='{"mainTitle": "主標題", "theme": "主題"}'>
1080
  {
1081
+ "mainTitle": "2025聯發科技公益活動",
 
 
1082
  "theme": "世界觀察員計畫",
1083
+ "headerDescription": "讓孩子透過文字探索自然,成為真正的世界觀察員!樂寫公益學習網誠摯邀請全國國小學生,參加<strong>自然書寫徵文比賽</strong>,展現你獨特的觀察力與創意思維。",
1084
+ "personalRegUrl": "https://www.colearn30.com/",
1085
+ "schoolRegUrl": "https://www.facebook.com/CoWrite30",
1086
+ "participants": "全國公私立國小學生(本屆小六畢業生亦可參加)",
1087
+ "methodIntro": "本活動分為<span class=\"highlight\">兩關兩獎</span>進行,讓學生循序漸進培養寫作能力",
1088
+ "stage1Title": "平台陪練寫作積分",
1089
+ "stage1Period": "報名至 <span class='highlight'>2025年8月30日</span> 截止",
1090
+ "stage1Requirements": "於樂寫公益平台發表至少 <span class=\"highlight\">三篇文章</span>,累積寫作經驗",
1091
+ "stage1AwardTitle": "積分獎:企業參訪體驗",
1092
+ "stage1AwardDesc": "從報名活動到 <span class=\"highlight\">2025年8月31日</span> 前,於樂寫公益學習平台 <span class=\"highlight\">積分最高的前三十名</span> 得主,可獲得聯發科技企業參訪活動體驗資格",
1093
  "stage2Title": "徵文比賽",
1094
+ "stage2Period": "<span class='highlight'>2025年9月1日至9月30日</span>",
1095
+ "stage2Notice": "通過第一關的學員將於8月31日收到徵文比賽邀請通知及徵文題目",
1096
  "stage2AwardTitle": "徵文獎:企業受獎殊榮",
1097
+ "stage2AwardDesc": "初審入圍前一百名者可獲得電子獎狀一幀,複審前三十名者,榮獲蒞臨聯發科技頒獎,現場公布得獎獎項",
1098
+ "personalRegDesc": "請先填寫線上表單進行報名,平台會寄送確認信件開通您的帳號。完成報名後,即可開始在樂寫公益平台發表文章,累積寫作積分。",
1099
+ "schoolRegDesc": "以學校或班級為單位填寫表單報名,樂寫專員將主動與校方聯繫,協助學生集體開通帳號,讓老師能夠更便利帶領全班參與這次有意義的寫作活動。",
1100
+ "requirements": [
1101
+ {"title": "字數與格式要求", "content": "徵文字數至少五百字。電腦打字需使用全形符號;於樂寫公益學習網平台個人帳號上傳。"},
1102
+ {"title": "原創性要求", "content": "作品必須未曾在任何形式的平面和網路媒體(樂寫公益平台除外)發表,嚴禁抄襲及代筆(包括AI),違者取消資格。"},
1103
+ {"title": "投稿注意事項", "content": "稿件送出前,請確認內容正確性(包含錯字、斷行、特殊字、空格等)。為公平起見,投稿後不可再修改文章。"}
1104
+ ],
1105
  "scoringCriteria": [
1106
  {"item": "內容與結構", "percentage": "25%", "description": "切合題旨,思想積極健康,��點合理,文字生動;結構嚴謹,行文流暢,兼具廣度與深度。"},
1107
  {"item": "邏輯與修辭", "percentage": "25%", "description": "邏輯分明,條理清晰,敘事明白;用字遣詞合宜,修辭靈活優美。"},
1108
  {"item": "創意與觀察", "percentage": "20%", "description": "富含想像力,觀察微小細節,洞悉人性幽微。"},
1109
+ {"item": "平台練習積分", "percentage": "20%", "description": "2025.5.1-2025.8.30期間,練習篇數與教練評分會影響最終積分。"},
1110
  {"item": "標點符號與字詞正確", "percentage": "10%", "description": "標點符號運用得宜,詞能達義,無錯別字。"}
1111
  ],
1112
+ "notes": [
1113
+ {"title": "創作注意事項", "content": "作文以白話文寫作,不得使用文言文、詩歌、韻文寫作;使用標準字體,並詳加全形標點符號;內文不得書寫姓名、校名等個人資訊"},
1114
+ {"title": "評審辦法", "content": "本比賽採初審、複審、決審三輪制,聘請樂寫平台資深志工教練群、知名作家、專家學者、與聯發科技長官共同參與評比,確保評選過程公平公正。"}
1115
+ ],
1116
+ "awards": [
1117
+ {
1118
+ "title": "勤筆獎勵—企業參訪體驗",
1119
+ "description": "從報名活動到8/31前,於樂寫公益學習平台積分最高的前三十名得主,可獲得聯發科技企業參訪活動體驗資格。"
1120
+ },
1121
+ {
1122
+ "title": "徵文比賽大獎",
1123
+ "description": "本屆徵文比賽前三十名表現優異者獲「大使獎」殊榮",
1124
+ "items": [
1125
+ "世界觀察大使獎:本屆文學獎總表現第一名",
1126
+ "觀察善思大使獎:善於觀察,描寫人事物具體詳細,能在平凡中見不凡",
1127
+ "永續發展大使獎:關懷社會議題,對於弱勢富有同理心,對於土地願意思考如何更好",
1128
+ "勤筆精修大使獎:在樂寫平台願意多次修改文章,志工教練認可勤寫精修的作者",
1129
+ "真誠感動大使獎:表達真實情感,運用富有感情的文字打動人",
1130
+ "創意巧思大使獎:展現創造力,勇於發表個人獨特見解"
1131
+ ]
1132
+ }
1133
  ],
1134
+ "awardNote": "得獎者將獲頒獎盃一座,並成為聯發科技「世界觀察員」推廣大使!",
1135
+ "ceremonyDate": "2025年11月17日(星期一)於聯發科技總部舉行盛大頒獎典禮,並於當日公告最終得獎名單。得獎者將獲邀參加,一同分享寫作的喜悅與成果!",
1136
  "websiteUrl": "https://www.colearn30.com/",
1137
+ "contactInfo": "如有任何問題,歡迎透過樂寫公益學習臉書聯繫我們:<a href=\"https://www.facebook.com/CoWrite30\" style=\"color: #fff;\">https://www.facebook.com/CoWrite30</a>"
 
1138
  }</textarea>
1139
  </div>
1140
  </div>
 
1414
  }
1415
  });
1416
 
1417
+ // Parse JSON arrays
1418
+ const jsonArrayFields = ['requirements', 'scoringCriteria', 'notes', 'awards'];
1419
+ jsonArrayFields.forEach(field => {
1420
+ try {
1421
+ const element = document.getElementById(`var-${field}`);
1422
+ if (element && element.value) {
1423
+ variables[field] = JSON.parse(element.value);
1424
+ }
1425
+ } catch (e) {
1426
+ console.error(`Error parsing ${field}:`, e);
 
 
 
 
 
 
 
 
 
 
1427
  }
1428
+ });
 
 
1429
 
1430
  // Add custom variables
1431
  const customVars = document.querySelectorAll('[id^="custom-var-"]');
 
1479
 
1480
  // Add event listeners for form inputs
1481
  const formFields = [
1482
+ 'mainTitle', 'theme', 'headerDescription', 'personalRegUrl', 'schoolRegUrl',
1483
+ 'participants', 'methodIntro', 'stage1Title', 'stage1Period', 'stage1Requirements',
1484
+ 'stage1AwardTitle', 'stage1AwardDesc', 'stage2Title', 'stage2Period', 'stage2Notice',
1485
+ 'stage2AwardTitle', 'stage2AwardDesc', 'personalRegDesc', 'schoolRegDesc',
1486
+ 'awardNote', 'ceremonyDate', 'websiteUrl', 'contactInfo'
 
1487
  ];
1488
 
1489
  // Remove auto-update listeners - only sync form to JSON when switching modes
 
1597
  // Store generated HTML globally
1598
  let generatedHTML = '';
1599
 
1600
+ // Preview HTML in popup window
1601
  function previewHTML() {
1602
  if (!generatedHTML) {
1603
  showToast('請先生成 HTML', 'error');
1604
  return;
1605
  }
1606
 
1607
+ // Calculate center position
1608
+ const width = 1200;
1609
+ const height = 800;
1610
+ const left = (window.screen.width - width) / 2;
1611
+ const top = (window.screen.height - height) / 2;
1612
+
1613
+ // Open popup window
1614
+ const previewWindow = window.open(
1615
+ '',
1616
+ 'preview_popup',
1617
+ `width=${width},height=${height},left=${left},top=${top},resizable=yes,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no,status=yes`
1618
+ );
1619
+
1620
+ if (previewWindow) {
1621
+ previewWindow.document.write(generatedHTML);
1622
+ previewWindow.document.close();
1623
+ previewWindow.document.title = '預覽 - 樂寫網徵文比賽';
1624
+ } else {
1625
+ showToast('無法開啟預覽視窗,請檢查瀏覽器的彈出視窗設定', 'error');
1626
+ }
1627
  }
1628
 
1629
  // Copy HTML to clipboard