-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
156 lines (133 loc) · 4.36 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
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Truth or Dare Game</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<h1>Truth or Dare Game</h1>
<div id="nameInput">
<label for="name">Enter Name:</label>
<input type="text" id="name" placeholder="Type a name...">
<button onclick="addNameToList()"><i class="fas fa-plus"></i> Add Name</button>
</div>
<ul id="nameList"></ul>
<button id="spinButton" onclick="spinTheBottle()"><i class="fas fa-dice"></i> Spin the Bottle</button>
<p id="result"></p>
</div>
<script src="script.js"></script>
<script>
// Create the badge element
const badge = document.createElement('div');
badge.id = 'badge_843219';
badge.className = 'badge_219843';
// Create the logo element
const logo = document.createElement('img');
logo.id = 'logo_982134';
logo.className = 'logo_412983';
logo.src = 'https://cdn.githubraw.com/harshitj183/harshitj183/main/badge/profileLOgo.png';
logo.alt = 'Google logo';
// Create the text element
const text = document.createElement('div');
text.id = 'text_654321';
text.className = 'text_123654';
// Create the partner element
const partner = document.createElement('span');
partner.id = 'partner_765432';
partner.className = 'partner_345678';
partner.textContent = '@harshitj183';
// Create the fullName element
const fullName = document.createElement('span');
fullName.id = 'fullName_987654';
fullName.className = 'full-name_567890';
fullName.textContent = 'Harshit Jaiswal';
// Create the developedByText element
const developedByText = document.createElement('span');
developedByText.id = 'developedByText_456789';
developedByText.className = 'developed-by-text_890123';
developedByText.textContent = 'Developed by';
// Append the elements to the page
text.appendChild(developedByText);
text.appendChild(partner);
text.appendChild(fullName);
badge.appendChild(logo);
badge.appendChild(text);
document.body.appendChild(badge);
// Add the CSS styles
const styles = `
#badge_843219 {
position: fixed;
bottom: 10px;
right: 10px;
display: flex;
align-items: center;
padding: 2px;
background-color: #4285f4;
border: 1px solid #4285f4;
border-radius: 3px;
font-size: 10px;
color: #fff;
width: 120px;
height: 30px;
animation: trending 2s infinite;
}
#logo_982134 {
position: absolute;
top: -10px;
left: -10px;
width: 50px;
height: 50px;
border-radius: 25%;
border: 2px solid #fff;
border-bottom: 2px solid #4285f4;
border-radius: 50% 50% 50% 50%/60% 60% 40% 40%;
transition: transform 0.2s ease-in-out;
}
#logo_982134:hover {
transform: rotate(360deg) scale(1.1);
}
#text_654321 {
display: flex;
flex-direction: column;
align-items: flex-start;
margin-left: 50px;
}
#partner_765432 {
color: #fff;
font-weight: bold;
display: block;
}
#fullName_987654 {
display: none;
}
@keyframes trending {
0% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
100% {
transform: scale(1);
}
}
`;
const styleSheet = document.createElement('style');
styleSheet.textContent = styles;
document.head.appendChild(styleSheet);
// Add hover effect to badge
badge.addEventListener('mouseover', () => {
developedByText.style.display = 'none';
fullName.style.display = 'block';
});
badge.addEventListener('mouseout', () => {
developedByText.style.display = 'block';
fullName.style.display = 'none';
});
</script>
</body>
</html>