Skip to content

Commit 511c2f8

Browse files
Update index.html
1 parent 864ba7a commit 511c2f8

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

index.html

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8">
5-
<meta name="viewport" content="width=device-width,initial-scale=1.0">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<title>About Rohan Modi</title>
77
<link rel="stylesheet" href="styles.css">
8+
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
89
</head>
910

1011
<body>
@@ -13,13 +14,21 @@
1314
<section class="profile">
1415
<img src="PhotoOfMe2.png" alt="Profile photo" class="avatar">
1516
<button class="cta-button" onclick="copyText()">Copy Email</button>
16-
<script>
17+
<script>
1718
function copyText() {
1819
navigator.clipboard.writeText("r0hanmodi11111@gmail.com")
19-
.then(() => alert("Email copied!"))
20-
.catch(() => alert("Failed to copy."));
20+
.then(() => {
21+
return Swal.fire({
22+
title: "Email copied.",
23+
text: "Feel free to send me an email. I’ll respond as soon as possible.",
24+
icon: "success"
25+
});
26+
})
27+
.catch(() => {
28+
alert("Failed to copy.");
29+
});
2130
}
22-
</script>
31+
</script>
2332
<h1>Rohan Modi</h1>
2433
<p class="subtitleiguess">High School Student • Developer</p>
2534

0 commit comments

Comments
 (0)