-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.html
129 lines (110 loc) · 5.53 KB
/
contact.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact Me</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- Theme change -->
<div class="light-dark" align="right">
<button class="btn-light-dark" title="Toggle light/dark mode">
<svg class="moon" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16">
<path fill="currentColor" d="M6 .278a.768.768 0 0 1 .08.858a7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277c.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316a.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71C0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z"/>
</svg>
<svg class="sun" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 16 16">
<path fill="currentColor" d="M8 12a4 4 0 1 0 0-8a4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z"/>
</svg>
</button>
</div>
<!-- Sidebar Toggle Button -->
<button class="sidebar-toggle" id="sidebar-toggle">☰</button>
<!-- Sidebar -->
<div class="sidebar" id="sidebar">
<ul class="sidebar-nav">
<li class="heading">Menu</li>
<li class="bullet"><a href="index.html">Home</a></li>
<li class="bullet"><a href="about.html">About</a></li>
<li class="bullet"><a href="contact.html">Contact</a></li>
</ul>
</div>
<!-- Main Content -->
<div class="main-content">
<header>
<div class="logo">
<h1>My Blog</h1>
</div>
</header>
<section>
<h2>Contact Me</h2>
<p>If you have any questions, feel free to reach out to me using the form below:</p>
<form action="https://formspree.io/f/xannzdrn" method="POST">
<label for="name">Name:</label>
<input type="text" id="name" name="name" required>
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
<label for="message">Message:</label>
<textarea id="message" name="message" rows="4" required></textarea>
<button type="submit">Send Message</button>
</form>
</section>
</div>
<footer>
<!-- Socails -->
<div class="footersome">
<a target="_blank" href="https://www.linkedin.com/company/w3schools.com/" title="W3Schools on LinkedIn">
<i class="fa"></i>
</a>
<a target="_blank" href="https://github.com/YOUR_PROFILE" title="Your GitHub Profile">
<i class="fa fa-github"></i>
</a>
<a target="_blank" href="https://discord.com/invite/w3schools" title="Join the W3schools community on Discord">
<i class="fa"></i>
</a>
<a target="_blank" href="https://twitter.com/YOUR_PROFILE" title="Your Twitter Profile">
<i class="fa fa-twitter"></i>
</a>
</div>
<!-- Footer text-->
<p>© 2025 My Blog | All Rights Reserved</p>
</footer>
<script>
// Sidebar Toggle
const sidebarToggleButton = document.getElementById('sidebar-toggle');
const sidebar = document.getElementById('sidebar');
sidebarToggleButton.addEventListener('click', () => {
sidebar.classList.toggle('open');
});
// Light/Dark Theme Toggle
const themeToggleButton = document.querySelector('.btn-light-dark');
const body = document.body;
if (localStorage.getItem('dark-mode') === 'enabled') {
body.classList.add('dark-mode');
}
themeToggleButton.addEventListener('click', () => {
body.classList.toggle('dark-mode');
if (body.classList.contains('dark-mode')) {
localStorage.setItem('dark-mode', 'enabled');
} else {
localStorage.setItem('dark-mode', 'disabled');
}
});
// Function to calculate shadow direction based on cursor position
function updateShadow(e) {
const sections = document.querySelectorAll('section');
sections.forEach(section => {
const rect = section.getBoundingClientRect();
const offsetX = e.clientX - rect.left - rect.width / 2;
const offsetY = e.clientY - rect.top - rect.height / 2;
const shadowX = (offsetX / 10).toFixed(1);
const shadowY = (offsetY / 10).toFixed(1);
// Update the shadow of each section dynamically
section.style.boxShadow = `${shadowX}px ${shadowY}px 15px rgba(0, 0, 0, 0.2)`;
});
}
// Add event listener to track mouse movement
document.addEventListener('mousemove', updateShadow);
</script>
</body>
</html>