Skip to content

Commit a64206c

Browse files
Merge pull request #28 from ut-code/top2
ボックスに変更
2 parents 232d3e3 + 1aac4a7 commit a64206c

File tree

2 files changed

+43
-40
lines changed

2 files changed

+43
-40
lines changed

vulnerable-web/index.html

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,52 +15,24 @@ <h1>Browser-Hack</h1>
1515
<a href="./shopping/index.html">ミッション1~ミッション4に挑戦!</a>
1616
<a href="./reservation/index.html">最後のミッションに挑戦!</a>
1717

18-
<!-- ▼▼ ここを追加:モーダルを開くボタン ▼▼ -->
19-
<button id="openPopup" class="popup-button">注意事項</button>
20-
<!-- ▲▲ ここまで追加 ▲▲ -->
21-
</main>
22-
23-
<footer>
24-
<p>©2025 ut.code();</p>
25-
</footer>
26-
27-
<!-- ▼▼ ここを追加:モーダル本体 ▼▼ -->
28-
<div id="overlay" class="overlay">
29-
<div class="popup">
18+
19+
<div class="info-box-static">
3020
<h2>注意事項</h2>
31-
<p>このサイトではマニュアルを参照します。手元で見ながら進めましょう。</p>
21+
<p style="font-weight: bold;">このサイトではマニュアルを参照します。手元で見ながら進めましょう。</p>
22+
<br>
3223
<h2>拡張機能の開き方</h2>
3324
<p>
3425
右上の「パズルのピースのアイコン」を押し、「ブラウザハック入門ミッション」を選択してください。
3526
</p>
3627
<br>
3728
<h2>リセットの仕方</h2>
3829
<p>もし表示されたミッションがミッション1でないときは、「ミッションをリセット」を押してください。</p>
39-
40-
<button id="closePopup" class="close-button">閉じる</button>
41-
</div>
4230
</div>
43-
<!-- ▲▲ ここまで追加 ▲▲ -->
44-
45-
<!-- ▼▼ ここを追加:スクリプト ▼▼ -->
46-
<script>
47-
const openBtn = document.getElementById("openPopup");
48-
const closeBtn = document.getElementById("closePopup");
49-
const overlay = document.getElementById("overlay");
50-
51-
openBtn.addEventListener("click", () => {
52-
overlay.classList.add("active");
53-
});
31+
32+
</main>
5433

55-
closeBtn.addEventListener("click", () => {
56-
overlay.classList.remove("active");
57-
});
34+
<footer>
35+
<p>©2025 ut.code();</p>
36+
</footer>
5837

59-
overlay.addEventListener("click", (e) => {
60-
if (e.target === overlay) overlay.classList.remove("active");
61-
});
62-
</script>
63-
<!-- ▲▲ 追加ここまで ▲▲ -->
6438

65-
</body>
66-
</html>

vulnerable-web/style.css

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ footer {
7070
font-size: 0.95rem;
7171
}
7272

73-
/* ▼▼ ここから追加 ▼▼ */
73+
7474

7575
.popup-button {
7676
margin-top: 1rem;
@@ -90,7 +90,7 @@ footer {
9090
transform: translateY(-3px);
9191
}
9292

93-
/* モーダル */
93+
9494
.overlay {
9595
position: fixed;
9696
inset: 0;
@@ -138,6 +138,37 @@ footer {
138138
font-weight: bold;
139139
}
140140

141+
.info-box-static {
142+
width: 90%;
143+
max-width: 600px;
144+
padding: 1.4rem 1.6rem;
145+
background: rgba(255, 255, 255, 0.9);
146+
border-radius: 14px;
147+
box-shadow: 0 6px 14px rgba(0,0,0,0.18);
148+
backdrop-filter: blur(6px);
149+
animation: fadeIn 0.8s ease;
150+
line-height: 1.6;
151+
}
152+
153+
.info-box-static h2 {
154+
margin-top: 0;
155+
font-size: 1.4rem;
156+
color: #333;
157+
}
158+
159+
.info-box-static p {
160+
margin: 0.6rem 0;
161+
font-size: 1rem;
162+
color: #444;
163+
}
164+
165+
.info-box-static code {
166+
background: #efefef;
167+
padding: 2px 4px;
168+
border-radius: 6px;
169+
font-size: 0.9em;
170+
}
171+
141172
@keyframes popupFade {
142173
from {
143174
opacity: 0;
@@ -149,4 +180,4 @@ footer {
149180
}
150181
}
151182

152-
/* ▲▲ 追加ここまで ▲▲ */
183+

0 commit comments

Comments
 (0)