Lashtw commited on
Commit
acf954f
·
verified ·
1 Parent(s): 9ab20fc

Upload index.html

Browse files
Files changed (1) hide show
  1. index.html +16 -6
index.html CHANGED
@@ -260,10 +260,6 @@
260
  <div id="historyChips" style="display: flex; gap: 0.5rem; flex-wrap: wrap;"></div>
261
  </div>
262
 
263
- <!-- 名人堂開啟按鈕 -->
264
- <button class="btn" id="openHofBtn" style="background: rgba(30, 25, 15, 0.8); border: 1px solid rgba(252, 211, 77, 0.6); color: #fcd34d; margin-bottom: 1rem; padding: 0.5rem; font-size: 1.1rem; border-radius: 0.5rem;">
265
- 👑 閱覽歷屆神諭名人堂
266
- </button>
267
  <button class="btn" id="startRoomBtn">進入教室</button>
268
 
269
  <div id="systemWarning" style="color: #ef4444; background: rgba(239, 68, 68, 0.1); padding: 1rem; border-radius: 0.5rem; margin-top: 1.5rem; display: none; text-align: left;">
@@ -277,7 +273,10 @@
277
  <div class="header-left">
278
  <div id="qrcodeArea" style="display: none;"></div>
279
  <div class="room-info">
280
- <h1>教室代碼:<span id="displayRoomCode" style="padding: 0.2rem 1rem; background: rgba(0,0,0,0.3); border-radius: 0.5rem; border: 1px solid rgba(255,255,255,0.2);"></span></h1>
 
 
 
281
  <p>這間教室已設定為尋找 <strong id="displayDigitLength" style="color: #34d399;">X</strong> 位數字。</p>
282
  <p id="qrHintText" style="color: #fbbf24; display: none;">👉 請讓學生用平板或手機掃描左側條碼加入</p>
283
  <p style="font-size: 0.9rem; color: #6b7280; display: none;" id="urlPContainer">連線網址:<span id="studentUrlDisplay" style="font-family: monospace;"></span></p>
@@ -539,6 +538,17 @@
539
  }
540
  });
541
 
 
 
 
 
 
 
 
 
 
 
 
542
  // 匯入 champ.xlsx 名單
543
  const importChampBtn = document.getElementById('importChampBtn');
544
  const champExcelFile = document.getElementById('champExcelFile');
@@ -567,7 +577,7 @@
567
  number: String(row['所選號碼'] || ''),
568
  resultVal: Number(row['圓周率中的位置']),
569
  year: Number(row['參加年度'] || new Date().getFullYear()),
570
- isNew: true // 註記一下是新載
571
  });
572
  }
573
  }
 
260
  <div id="historyChips" style="display: flex; gap: 0.5rem; flex-wrap: wrap;"></div>
261
  </div>
262
 
 
 
 
 
263
  <button class="btn" id="startRoomBtn">進入教室</button>
264
 
265
  <div id="systemWarning" style="color: #ef4444; background: rgba(239, 68, 68, 0.1); padding: 1rem; border-radius: 0.5rem; margin-top: 1.5rem; display: none; text-align: left;">
 
273
  <div class="header-left">
274
  <div id="qrcodeArea" style="display: none;"></div>
275
  <div class="room-info">
276
+ <h1>教室代碼:<span id="displayRoomCode" style="padding: 0.2rem 1rem; background: rgba(0,0,0,0.3); border-radius: 0.5rem; border: 1px solid rgba(255,255,255,0.2);"></span>
277
+ <button class="btn" id="openHofBtn" style="width: auto; background: rgba(30, 25, 15, 0.8); border: 1px solid rgba(252, 211, 77, 0.6); color: #fcd34d; padding: 0.3rem 0.6rem; font-size: 1rem; border-radius: 0.3rem; margin-left: 1rem; cursor: pointer; vertical-align: middle; box-shadow: none;">👑 名人堂</button>
278
+ <button class="btn" id="muteBtn" style="width: auto; background: rgba(75, 85, 99, 0.8); border: 1px solid rgba(156, 163, 175, 0.5); color: white; padding: 0.3rem 0.6rem; font-size: 1rem; border-radius: 0.3rem; margin-left: 0.5rem; cursor: pointer; vertical-align: middle; box-shadow: none;">🔊 靜音</button>
279
+ </h1>
280
  <p>這間教室已設定為尋找 <strong id="displayDigitLength" style="color: #34d399;">X</strong> 位數字。</p>
281
  <p id="qrHintText" style="color: #fbbf24; display: none;">👉 請讓學生用平板或手機掃描左側條碼加入</p>
282
  <p style="font-size: 0.9rem; color: #6b7280; display: none;" id="urlPContainer">連線網址:<span id="studentUrlDisplay" style="font-family: monospace;"></span></p>
 
538
  }
539
  });
540
 
541
+ // 靜音按鈕
542
+ let isMuted = false;
543
+ document.getElementById('muteBtn').addEventListener('click', (e) => {
544
+ isMuted = !isMuted;
545
+ audioDrift.muted = isMuted;
546
+ audioDawn.muted = isMuted;
547
+ e.target.innerText = isMuted ? '🔇 取消靜音' : '🔊 靜音';
548
+ e.target.style.background = isMuted ? 'rgba(239, 68, 68, 0.8)' : 'rgba(75, 85, 99, 0.8)';
549
+ e.target.style.borderColor = isMuted ? 'rgba(248, 113, 113, 0.5)' : 'rgba(156, 163, 175, 0.5)';
550
+ });
551
+
552
  // 匯入 champ.xlsx 名單
553
  const importChampBtn = document.getElementById('importChampBtn');
554
  const champExcelFile = document.getElementById('champExcelFile');
 
577
  number: String(row['所選號碼'] || ''),
578
  resultVal: Number(row['圓周率中的位置']),
579
  year: Number(row['參加年度'] || new Date().getFullYear()),
580
+ isNew: false // 預設歷史匯為 false,刷新後才會有 NEW (若打破紀錄)
581
  });
582
  }
583
  }