Skip to content

Commit c9f0e26

Browse files
author
cadenza
committed
mod list page 色づげ
1 parent af0b083 commit c9f0e26

1 file changed

Lines changed: 33 additions & 2 deletions

File tree

docs/modlist.html

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,33 @@
6060
@media (max-width: 420px){
6161
.toolbar{grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));}
6262
}
63+
64+
/* 値バッジ(高コントラスト気味) */
65+
.badge{
66+
display:inline-block;
67+
padding:.1rem .45rem;
68+
border-radius:999px;
69+
font-weight:700;
70+
font-size:.85rem;
71+
line-height:1.2;
72+
border:1px solid transparent;
73+
}
74+
.badge-ok{
75+
color:#166534; /* 緑系テキスト */
76+
background:#dcfce7; /* 薄緑背景 */
77+
border-color:#86efac; /* 緑系枠 */
78+
}
79+
.badge-warn{
80+
color:#92400e; /* オレンジ系テキスト */
81+
background:#fef3c7; /* 薄オレンジ背景 */
82+
border-color:#fcd34d; /* オレンジ系枠 */
83+
}
84+
.badge-ng{
85+
color:#991b1b; /* 赤系テキスト */
86+
background:#fee2e2; /* 薄赤背景 */
87+
border-color:#fca5a5; /* 赤系枠 */
88+
}
89+
6390
</style>
6491

6592
</head>
@@ -243,11 +270,15 @@ <h1>
243270
tdLic.className = "small";
244271

245272
const tdRights = document.createElement("td");
246-
tdRights.textContent = m.shouldRightsNotation ? "必要" : "不要";
273+
tdRights.innerHTML = m.shouldRightsNotation
274+
? `<span class="badge badge-warn">必要</span>`
275+
: `<span class="badge badge-ok">不要</span>`;
247276
tdRights.className = "small";
248277

249278
const tdSecondary = document.createElement("td");
250-
tdSecondary.textContent = m.canSecondaryDistribution ? "許可" : "不許可";
279+
tdSecondary.innerHTML = m.canSecondaryDistribution
280+
? `<span class="badge badge-ok">許可</span>`
281+
: `<span class="badge badge-ng">不可</span>`;
251282
tdSecondary.className = "small";
252283

253284
const tdURL = document.createElement("td");

0 commit comments

Comments
 (0)