Skip to content

Commit a080a1e

Browse files
authored
Update index.html
Added Features: 1. More beautiful ui and ux 2. Add 2 features, check if device on and check if device can open the web. 3. Add support button project
1 parent 358b929 commit a080a1e

File tree

1 file changed

+60
-12
lines changed

1 file changed

+60
-12
lines changed

index.html

Lines changed: 60 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,67 @@
11
<!DOCTYPE html>
22
<html>
3-
<body>
4-
<button id="device-button">Check My Device</button>
5-
<p id="device-status"></p>
3+
<head>
4+
<title>Device Checker</title>
5+
<style>
6+
body {
7+
font-family: Arial, sans-serif;
8+
background-color: #f0f0f0;
9+
text-align: center;
10+
display: flex;
11+
flex-direction: column;
12+
align-items: center;
13+
justify-content: center;
14+
height: 100vh;
15+
}
16+
17+
h1 {
18+
color: #333;
19+
}
20+
21+
button {
22+
background-color: #4CAF50;
23+
color: #fff;
24+
padding: 10px 20px;
25+
border: none;
26+
border-radius: 5px;
27+
cursor: pointer;
28+
margin: 10px;
29+
text-decoration: none;
30+
}
31+
32+
button:hover {
33+
background-color: #3e8e41;
34+
}
35+
36+
.github-button {
37+
background-color: #000;
38+
color: #fff;
39+
padding: 10px 20px;
40+
border-radius: 80px;
41+
cursor: pointer;
42+
margin: 10px;
43+
text-decoration: none;
44+
}
45+
46+
.github-button:hover {
47+
background-color: #0a6d;
48+
}
49+
</style>
50+
</head>
51+
<body>
52+
<h1>Device Check</h1>
53+
<button id="deviceOnButton">Is my Device on?</button>
54+
<button id="deviceCanOpenButton">Is my Device can open this web?</button>
55+
<a href="https://github.com/shabir-mp" target="_blank" class="github-button">Support My Project</a>
656

757
<script>
8-
// Get the button and status element
9-
const button = document.getElementById("device-button");
10-
const status = document.getElementById("device-status");
58+
document.getElementById("deviceOnButton").addEventListener("click", function() {
59+
alert("Yes, your device now on.");
60+
});
1161

12-
// Add an event listener to the button
13-
button.addEventListener("click", () => {
14-
// When the button is clicked, change the text of the status element
15-
status.textContent = "Your Device is On";
16-
});
62+
document.getElementById("deviceCanOpenButton").addEventListener("click", function() {
63+
alert("Yes, your device support to open this website.");
64+
});
1765
</script>
18-
</body>
66+
</body>
1967
</html>

0 commit comments

Comments
 (0)