feat: 討滅戦ページのロール別立ち回りをアコーディオン化し一覧リンクを分離
This commit is contained in:
1 parent
0690e4c92b
commit
c3759d1c8e
80 files changed
+1139
-658
No files matched your search
@@ -684,3 +684,35 @@ ul.wiki-list li, ol.wiki-list li {
|
||||
@media (max-width: 600px) {
|
||||
.xhb-cluster-container { grid-template-columns: 1fr; }
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
ロール別アコーディオン(details/summary ベース)
|
||||
trials などの討滅戦ページで使用
|
||||
============================================================ */
|
||||
.wiki-acc-item {
|
||||
border: 1px solid #dcdfe3;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 8px;
|
||||
background: #ffffff;
|
||||
}
|
||||
.wiki-acc-summary {
|
||||
cursor: pointer;
|
||||
padding: 10px 14px;
|
||||
font-weight: bold;
|
||||
color: #2b2f36;
|
||||
background: #f7f9fa;
|
||||
border-left: 4px solid #7a8a99;
|
||||
list-style: none;
|
||||
position: relative;
|
||||
}
|
||||
.wiki-acc-summary::-webkit-details-marker { display: none; }
|
||||
.wiki-acc-summary::after {
|
||||
content: "+";
|
||||
position: absolute;
|
||||
right: 14px;
|
||||
}
|
||||
.wiki-acc-item[open] > .wiki-acc-summary::after { content: "-"; }
|
||||
.wiki-acc-item > ul {
|
||||
margin: 0;
|
||||
padding: 12px 14px 12px 32px;
|
||||
}
|
||||
@@ -734,4 +734,16 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
renderFooter();
|
||||
|
||||
// ロール別アコーディオン:同時に1つだけ開く
|
||||
document.querySelectorAll('[data-accordion="single"]').forEach(function (box) {
|
||||
box.querySelectorAll('details').forEach(function (d) {
|
||||
d.addEventListener('toggle', function () {
|
||||
if (!d.open) return;
|
||||
box.querySelectorAll('details').forEach(function (o) {
|
||||
if (o !== d) o.open = false;
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
Reference in new issue
Block a user