feat 綜藝表搜尋成員節目

This commit is contained in:
2026-05-17 02:53:45 +08:00
parent bbd2369373
commit a123f89e15
+49 -25
View File
@@ -14,24 +14,36 @@
padding-bottom: 48px; padding-bottom: 48px;
} }
body.variety-shows-page .variety-shows-lead { body.variety-shows-page .search-section {
max-width: 44rem; display: flex;
margin: 0 auto 1.25rem; justify-content: center;
text-align: left; width: 100%;
color: #4a4a4a; margin: 0 0 1.25rem;
line-height: 1.75; position: relative;
z-index: 1;
} }
body.variety-shows-page .variety-shows-section { body.variety-shows-page .search-input {
margin-top: 2rem; width: min(100%, 400px);
padding: 12px 25px;
border: 2px solid #ddd;
border-radius: 30px;
font-size: 1rem;
outline: none;
transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
background-color: #fff;
color: #333;
box-sizing: border-box;
} }
body.variety-shows-page .variety-shows-section>h3 { body.variety-shows-page .search-input:hover {
margin: 0 0 0.75rem; border-color: #bbb;
font-size: 1.05rem; }
font-weight: 800;
color: #303030; body.variety-shows-page .search-input:focus {
text-align: left; border-color: #ffcc00;
box-shadow: 0 4px 15px rgba(255, 204, 0, 0.25);
transform: translateY(-2px);
} }
body.variety-shows-page .variety-wiki-table-wrap { body.variety-shows-page .variety-wiki-table-wrap {
@@ -144,15 +156,13 @@
<main class="content-container variety-page-main variety-shows-main chronicle-reader"> <main class="content-container variety-page-main variety-shows-main chronicle-reader">
<section id="variety-shows" class="variety-block" aria-labelledby="variety-shows-title"> <section id="variety-shows" class="variety-block" aria-labelledby="variety-shows-title">
<h2 class="section-title" id="variety-shows-title">大家上過的綜藝</h2> <h2 class="section-title" id="variety-shows-title">隊長帶弟弟</h2>
<p class="intro-text variety-shows-lead"> <div class="search-section">
依播出期間整理固定出演紀錄,欄位對照常見維基表格式:日期、頻道、節目、成員、集數。合併儲存格表示同一頻道/同一位成員連續多檔;其餘區塊會陸續補上。 <input type="search" id="variety-shows-search" class="search-input" placeholder="搜尋成員或節目…"
</p> autocomplete="off" aria-controls="variety-shows-table" aria-label="搜尋成員或節目">
</div>
<section class="variety-shows-section" aria-labelledby="fixed-2016-2020"> <div class="variety-wiki-table-wrap">
<h3 id="fixed-2016-2020">固定出演(20162020</h3> <table class="variety-wiki-table" id="variety-shows-table">
<div class="variety-wiki-table-wrap">
<table class="variety-wiki-table">
<thead> <thead>
<tr> <tr>
<th scope="col">播出日期</th> <th scope="col">播出日期</th>
@@ -300,8 +310,7 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<p class="variety-shows-note">資料整理自公開播出紀錄,集數與譯名若有出入以實際播出版本為準;歡迎之後逐列補上主持、嘉賓等區塊。</p> <p class="variety-shows-note">資料整理自公開播出紀錄,集數與譯名若有出入以實際播出版本為準;歡迎之後逐列補上主持、嘉賓等區塊。</p>
</section>
<a class="variety-shows-back" href="variety.html#variety"><i class="fa-solid fa-arrow-left" <a class="variety-shows-back" href="variety.html#variety"><i class="fa-solid fa-arrow-left"
aria-hidden="true"></i> 返回瘋子與天才</a> aria-hidden="true"></i> 返回瘋子與天才</a>
@@ -317,6 +326,21 @@
<script src="../assets/js/portal-nav.js"></script> <script src="../assets/js/portal-nav.js"></script>
<script src="../assets/js/particles.js"></script> <script src="../assets/js/particles.js"></script>
<script>
(function () {
const input = document.getElementById("variety-shows-search");
const rows = document.querySelectorAll("#variety-shows-table tbody tr");
if (!input || !rows.length) return;
input.addEventListener("input", () => {
const q = input.value.trim().toLowerCase();
rows.forEach((row) => {
const text = row.textContent.replace(/\s+/g, " ").trim().toLowerCase();
row.hidden = Boolean(q) && !text.includes(q);
});
});
})();
</script>
</body> </body>
</html> </html>