Skip to content

Commit 57b899d

Browse files
committed
お問い合わせフォームを削除
1 parent d8f28ce commit 57b899d

File tree

3 files changed

+3
-25
lines changed

3 files changed

+3
-25
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
.vscode/
1+
.vscode/
2+
review.html
3+
test.css

index.html

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,6 @@ <h2>ニュース</h2>
4646
</li>
4747
</ul>
4848
</section>
49-
<section id="contact">
50-
<!-- REVIEW: formspreeを使わず、直接送れないか -->
51-
<h2>お問い合わせ</h2>
52-
<form action="https://formspree.io/f/mzzpnvqw" method="POST">
53-
<input type="email" name="email" placeholder="あなたのメールアドレス" required>
54-
<textarea name="message" placeholder="メッセージ" required></textarea>
55-
<button type="submit" class="btn">送信</button>
56-
</form>
57-
</section>
5849
</main>
5950
<footer id="site-footer"></footer>
6051
<script src="../script.js"></script>

script.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,6 @@ document.addEventListener('DOMContentLoaded', (event) => {
5555
});
5656
});
5757

58-
// REVIEW: コンタクトフォームの送信処理
59-
const contactForm = document.getElementById('contact-form');
60-
contactForm.addEventListener('submit', (e) => {
61-
e.preventDefault();
62-
const email = document.getElementById('email').value;
63-
const message = document.getElementById('message').value;
64-
65-
// メール送信処理
66-
const mailtoLink = `mailto:[email protected]?subject=お問い合わせ&body=${encodeURIComponent(message)}%0A%0A送信者のメールアドレス: ${email}`;
67-
window.location.href = mailtoLink;
68-
69-
alert('お問い合わせありがとうございます。メッセージが送信されました。');
70-
contactForm.reset();
71-
});
72-
7358
// ハンバーガーメニューの開閉
7459
const hamburgerMenu = document.querySelector('.hamburger-menu');
7560
const navMenu = document.querySelector('nav ul');

0 commit comments

Comments
 (0)