-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
contact.html
76 lines (69 loc) · 2.55 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MC Simulation - Contact</title>
<link rel="icon" type="image/png" href="./Website-image/favicon.png">
<link rel="stylesheet" href="styles.css">
</head>
<main>
<header>
<div class="header-container">
<h1>Contact Me</h1>
</br>
<a href="https://arunp77.github.io/MonteCarlo-simulation/">
<img src="Website-image/MCS.png" alt="Your Image" class="profile-image">
</a>
</div>
</header>
<nav>
<ul class="navbar">
<li><a href="index.html">Home</a></li>
<li><a href="projects.html">Projects</a></li>
<li><a href="contact.html">Contact</a></li>
<li class="dropdown">
<a href="#" class="dropbtn">Social</a>
<div class="dropdown-content">
<a href="https://arunp77.github.io/">My webpage</a>
<a href="https://github.com/arunp77">GitHub</a>
</div>
</li>
</ul>
</nav>
<div class="content">
<div class="email-container">
<!-- Add an id to the email link to make it accessible via JavaScript -->
You can contact me via email at:
<a href="#" id="email-link">arunp77@gmail.com</a>
<span class="copied-message" id="copied-message">Copied</span>
</div>
</div>
<script>
// JavaScript to handle the click event
document.getElementById('email-link').addEventListener('click', function (event) {
event.preventDefault(); // Prevent the default behavior of the link
const email = 'arunp77@gmail.com';
copyToClipboard(email); // Call the function to copy the email address to the clipboard
const message = document.getElementById('copied-message');
message.style.display = 'inline-block'; // Show the message
setTimeout(function () {
message.style.display = 'none'; // Hide the message after a delay
}, 2000); // The message will disappear after 2000 milliseconds (2 seconds)
});
// Function to copy the email address to the clipboard
function copyToClipboard(text) {
const textarea = document.createElement('textarea');
textarea.value = text;
document.body.appendChild(textarea);
textarea.select();
document.execCommand('copy');
document.body.removeChild(textarea);
}
</script>
<!-- Footer -->
<footer>
© 2023 <a href="https://sites.google.com/view/aruncosmo/home" target="_blank">Arun Kumar Pandey</a>. All rights reserved.
</footer>
</main>
</html>