-
Notifications
You must be signed in to change notification settings - Fork 0
/
video.html
251 lines (217 loc) · 9.36 KB
/
video.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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Clickable Widgets</title>
<link rel="stylesheet" href="style.css">
<style>
/* style.css */
.title {
animation: colorChange 5s infinite; /* Change '5s' to the duration you want */
}
body {
background-color: #CCC; /* Set the background color to black */
background-size: cover; /* Adjust as needed */
}
.container {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
margin: 0 auto;
width: 90%;
}
.title-container {
display: flex; /* Make the container flex */
align-items: center; /* Center the items vertically */
justify-content: center; /* Center the items horizontally */
margin: 20px 0; /* Add margin for spacing */
}
.logo {
width: 50px; /* Adjust the width of the logo as needed */
height: auto;
margin-right: 10px; /* Adjust the margin between the logo and the title */
}
.title {
text-align: center;
font-size: 2em;
color: #333;
margin-top: 20px;
perspective: 1000px; /* Set the perspective value based on your preference */
transition: transform 0.3s ease-in-out;
}
.title::before {
content: "";
position: absolute;
bottom: 0;
left: 50%;
width: 0;
height: 2px;
background-color: #333;
transition: all 0.3s ease;
}
.title:hover::before {
width: 100%;
left: 0;
}
.title:hover {
transform: translateZ(20px); /* Adjust the translateZ value for the desired perspective effect */
}
/* ... (rest of your styles) ... */
.widget {
width: calc(48% - 20px);
box-sizing: border-box;
margin: 10px;
border: 1px solid #ddd;
border-radius: 5px;
text-align: center;
padding: 10px;
background-color: #F0F8FF;
display: flex;
flex-direction: column;
transition: transform 0.2s ease-in-out, background-color 0.3s ease;
}
.widget img {
width: 100%;
height: auto;
margin-bottom: 10px;
object-fit: cover; /* Ensure the image covers the container */
}
.widget p {
margin-top: auto;
font-weight: bold;
}
.widget .play-button {
padding: 5px 10px;
background-color: #008CBA;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
}
.widget:hover {
transform: scale(1.05);
background-color: #D3E7FF;
}
.widget:hover .play-button {
background-color: #005F7F;
}
</style>
</head>
<body>
<div class="title-container">
<img class="logo" src="https://github.com/Ansh-Yadav-maths-lover/Ansh-Books/blob/main/ansh.png?raw=true"
alt="Ansh Books Logo">
<a href="https://anshbooks.weebly.com" target="_blank">
<h2 class="title">Ansh Books</h2>
</a>
</div>
<!-- ... (rest of your HTML) ... -->
<div class="container">
<div class="widget">
<a href="#" data-target="https://api.devjisu.com/?v=https://d1d34p8vz63oiq.cloudfront.net/6a9708df-0043-4a51-b20e-eaf5782ccb63/master.mpd">
<img src="https://d2bps9p1kiy4ka.cloudfront.net/5eb393ee95fab7468a79d189/6224bea9-5e7f-497b-8354-c07be6e78e72.png" alt="Image 1">
<p>Motion:1 Distance and Displacements</p>
<button class="play-button">Play Lecture</button>
</a>
</div>
<div class="widget">
<a href="#" data-target="https://api.devjisu.com/?v=https://d1d34p8vz63oiq.cloudfront.net/1fa5e3c7-0bfb-4e78-91ad-6a44206a2ff1/master.mpd">
<img src="https://d2bps9p1kiy4ka.cloudfront.net/5eb393ee95fab7468a79d189/b68ed4a4-d64b-477e-a7ea-51b5b3ed8786.png" alt="Image 2">
<p>Motion:2 Speed and Velocity</p>
<button class="play-button">Play Lecture</button>
</a>
</div>
<!-- Add more widget divs as needed -->
<div class="widget">
<a href="#" data-target="https://api.devjisu.com/?v=https://d1d34p8vz63oiq.cloudfront.net/260fc428-4e0b-4a69-82f6-35c1ade6f570/master.mpd">
<img src="https://d2bps9p1kiy4ka.cloudfront.net/5eb393ee95fab7468a79d189/38856d8b-84b7-4a6e-899b-aaf0f3068241.png" alt="Image 3">
<p>Motion:3 Uniformly Accelerated Motion</p>
<button class="play-button">Play Lecture</button>
</a>
</div>
<div class="widget">
<a href="#" data-target="https://api.devjisu.com/?v=https://d1d34p8vz63oiq.cloudfront.net/90aa48af-eb62-473e-b4dc-fb962ef1e067/master.mpd">
<img src="https://d2bps9p1kiy4ka.cloudfront.net/5eb393ee95fab7468a79d189/f8083fe3-855c-430c-9b32-daf7a958b2d4.png" alt="Image 4">
<p>Motion:4 Equations Of Motion Practice Class</p>
<button class="play-button">Play Lecture</button>
</a>
</div>
<!-- Add more widget divs as needed -->
<div class="widget">
<a href="#" data-target="https://api.devjisu.com/?v=https://d1d34p8vz63oiq.cloudfront.net/ccf31dfe-446f-4006-8248-5d89a88786f5/master.mpd">
<img src="https://d2bps9p1kiy4ka.cloudfront.net/5eb393ee95fab7468a79d189/a33537bb-0362-420f-8e06-e47d2d11bebd.png" alt="Image 5">
<p>Motion:5 Graphical Representation Of Motion</p>
<button class="play-button">Play Lecture</button>
</a>
</div>
<div class="widget">
<a href="#" data-target="https://api.devjisu.com/?v=https://d1d34p8vz63oiq.cloudfront.net/bac7feaa-8c3d-4135-a39d-bd6c94d2dc07/master.mpd">
<img src="https://d2bps9p1kiy4ka.cloudfront.net/5eb393ee95fab7468a79d189/65d31fc3-e9bc-4bc3-bb07-02af7788e9a7.png" alt="Image 6">
<p>Motion:6 Equations Of Motion Derivation (Graphical)</p>
<button class="play-button">Play Lecture</button>
</a>
</div>
<!-- Add more widget divs as needed -->
<div class="widget">
<a href="#" data-target="https://api.devjisu.com/?v=https://d1d34p8vz63oiq.cloudfront.net/984e6d99-827f-4621-975a-f447aa25318d/master.mpd">
<img src="https://d2bps9p1kiy4ka.cloudfront.net/5eb393ee95fab7468a79d189/10328080-85e8-4584-b63d-cc2f71194b21.png" alt="Image 6">
<p>Motion:7 One Shot Revision</p>
<button class="play-button">Play Lecture</button>
</a>
</div>
<div class="widget">
<a href="#" data-target="https://api.devjisu.com/?v=https://d1d34p8vz63oiq.cloudfront.net/fe17b3c3-ca79-4058-a690-ce28fa0a1d50/master.mpd">
<img src="https://d2bps9p1kiy4ka.cloudfront.net/5eb393ee95fab7468a79d189/8421eaa1-7668-42b6-bd90-a70ac2d92dad.png" alt="Image 6">
<p>Motion:8 One Shot Revision (Part 2)</p>
<button class="play-button">Play Lecture</button>
</a>
</div>
<div class="widget">
<a href="#" data-target="https://api.devjisu.com/?v=https://d1d34p8vz63oiq.cloudfront.net/2e234095-c87a-4100-b8d3-4314e533d625/master.mpd">
<img src="https://d2bps9p1kiy4ka.cloudfront.net/5eb393ee95fab7468a79d189/cac0ba3e-11f1-406c-9ff4-9999d0fb330d.png" alt="Image 6">
<p>Motion:9 NCERT Discussion</p>
<button class="play-button">Play Lecture</button>
</a>
</div>
<div class="widget">
<a href="#" data-target="https://api.devjisu.com/?v=https://d1d34p8vz63oiq.cloudfront.net/3968ba79-1c82-4094-9eed-c869fa790bb0/master.mpd">
<img src="https://d2bps9p1kiy4ka.cloudfront.net/5eb393ee95fab7468a79d189/c1689386-6a7b-4445-a519-80be0c3dc591.png" alt="Image 6">
<p>Motion:10 NCERT Discussion (Part 2)</p>
<button class="play-button">Play Lecture</button>
</a>
</div>
<div class="widget">
<a href="#" data-target="https://anshbooks.weebly.com">
<img src="ansh.png" alt="Image 6">
<p>ANSH BOOKS</p>
<button class="play-button">Visit Parent Site</button>
</a>
</div>
<script>
// Your existing script.js code
document.addEventListener('DOMContentLoaded', function () {
// Array of image URLs
const imageUrls = [
'https://anshishere.w3spaces.com/2.png'
];
// Function to set a random background image
function setRandomBackgroundImage() {
const randomImageUrl = imageUrls[Math.floor(Math.random() * imageUrls.length)];
document.body.style.backgroundImage = `url('${randomImageUrl}')`;
}
// Set random background image on page load
setRandomBackgroundImage();
// Your existing click event listener
const widgets = document.querySelectorAll('.widget');
widgets.forEach(widget => {
widget.addEventListener('click', (event) => {
event.preventDefault();
const targetUrl = widget.querySelector('a').getAttribute('data-target');
window.open(targetUrl, '_blank'); // Opens in a new tab
});
});
});
</script>
</body>
</html>