-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
70 lines (62 loc) · 1.79 KB
/
index.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
<meta name="Description" content="Put your description here.">
<base href="/">
<style>
html,
body {
margin: 0;
padding: 0;
font-family: sans-serif;
background-color: #ededed;
}
</style>
<title>my-card</title>
</head>
<body>
<my-card></my-card>
<script type="module" src="./src/my-card.js"></script>
<script>
document.querySelector('.btnDet').addEventListener('click', function(e) {
const detail = document.querySelector('.body')
if (detail.style.display === "none"){
detail.style.display = "block"
} else {
detail.style.display = "none";
}
});
//Details Button
document.querySelector('.btnDup').addEventListener('click', function(e) {
const copy = document.querySelector('.borders').cloneNode(true);
document.body.appendChild(copy);
});
// Duplicate
document.querySelector('#del').addEventListener('click', function(e) {
let checkDel = confirm("Do you really want to remove Nick Singleton?");
if (checkDel) {
if (document.querySelector('.borders:last-child') !== document.querySelector('.borders')) { document.querySelector('.borders:last-child').remove();
}
else {
alert("Nobody can stop the run");
}
}
});
//Delete
document.querySelector('.btnHead').addEventListener('click', function(e) {
let title = prompt("You dare change Singletons Name?!");
if (title) {
document.querySelector('.borders h2').innerText = title;
}
});
//Header
document.querySelector('.btnBack').addEventListener("click", (e) => {
color = ("Blue");
document.querySelector('.card').style.backgroundColor = color;
});
//Background Color
</script>
</body>
</html>