-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.html
214 lines (193 loc) · 6.61 KB
/
home.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Event management system</title>
<link rel="stylesheet" href="CSS/home.css">
<style>
/* ----------------------------- For sports ----------------------- */
/* .slider-container {
max-width: 800px;
position: relative;
margin: 0 auto;
overflow: hidden;
height: 400px;
} */
.slider-image {
width: 43%;
height: 52%;
position: absolute;
top: 28%;
left: 6%;
opacity: 0;
transition: opacity 1s ease-in-out;
}
.slider-image.active {
opacity: 1;
}
.slider-navigation {
position: absolute;
left: 28%;
bottom: 21%;
top: 76%;
transform: translateX(-50%);
display: flex;
}
.slider-navigation button {
background-color: #fff;
border: none;
padding: 5px 10px;
margin-right: 10px;
cursor: pointer;
}
.slider-navigation button.active {
background-color: #ccc;
}
button{
border-radius: 14px;
}
/* ----------------------------- For cultural ----------------------- */
/* .cultural {
position: relative;
max-width: 800px;
margin: 0 auto;
overflow: hidden;
height: 400px;
} */
.cultural .slider-image {
width: 43%;
height: 52%;
position: absolute;
top: 28%;
left: 52%;
opacity: 0;
transition: opacity 1s ease-in-out;
}
.cultural .slider-image.active {
opacity: 1;
}
.cultural .slider-navigation {
position: absolute;
left: 74%;
bottom: 21%;
top: 76%;
transform: translateX(-50%);
display: flex;
}
.cultural .slider-navigation button {
background-color: #fff;
border: none;
padding: 5px 10px;
margin-right: 10px;
cursor: pointer;
}
.cultural .slider-navigation button.active {
background-color: #ccc;
}
.cultural1 {
display: flex;
justify-content: center;
align-items: center;
margin-top: 30%;
margin-left: 47%;
text-decoration: none;
}
/* .cultural1 h1 {
color: #000;
font-size: 24px;
text-decoration: none;
margin: 0;
} */
</style>
</head>
<body>
<a href="https://www.isquareit.edu.in/" target="_blank"> <img class="head12" src="images/i2it.png" alt=""></a>
<header>
<nav class="navbar">
<ul>
<li>
<a href="home.html">Home</a>
</li>
<li>
<a href="About.html">About</a>
</li>
<li>
<h1 class="nav1">Event management system</h1>
</li>
<li>
<a class="login" href="Registration.php">Registration</a>
<!-- <a class="login" href="Login.php">Login</a> -->
</li>
</ul>
</nav>
</header>
<div class="sports">
<img class="slider-image active" src="images/Sports/5-copy.jpg" alt="Image 1">
<img class="slider-image" src="images/Sports/7-copy.jpg" alt="Image 2">
<img class="slider-image" src="images/Sports/sports.jpg" alt="Image 3">
<img class="slider-image" src="images/Sports/Sports.png" alt="Image 4">
<div class="slider-navigation">
<button class="active" onclick="showImage(1)">1</button>
<button onclick="showImage(2)">2</button>
<button onclick="showImage(3)">3</button>
<button onclick="showImage(4)">4</button>
</div>
</div>
<a class="sports1" href="sports.html" class="sports1">
<h1>Sport Events</h1>
</a>
<div class="cultural">
<img class="slider-image active" src="images/Cultural/WhatsApp Image 2023-05-24 at 1.34.11 AM (1).jpeg" alt="Image 1">
<img class="slider-image" src="images/Cultural/WhatsApp Image 2023-05-24 at 1.34.11 AM (2).jpeg" alt="Image 2">
<img class="slider-image" src="images/Cultural/WhatsApp Image 2023-05-24 at 1.34.11 AM.jpeg" alt="Image 3">
<img class="slider-image" src="images/Cultural/WhatsApp Image 2023-05-24 at 1.34.12 AM.jpeg" alt="Image 4">
<div class="slider-navigation">
<button class="active" onclick="showImage('cultural', 1)">1</button>
<button onclick="showImage('cultural', 2)">2</button>
<button onclick="showImage('cultural', 3)">3</button>
<button onclick="showImage('cultural', 4)">4</button>
</div>
</div>
<a class="cultural1" href="Cultural.html" class="cultural1">
<h1>Cultural Events</h1>
</a>
<script>
//----------------------------- For cultural -----------------------
let currentCulturalImage = 1;
const showCulturalImage = (imageNumber) => {
document.querySelector('.cultural .slider-image.active').classList.remove('active');
document.querySelector(`.cultural .slider-image:nth-child(${imageNumber})`).classList.add('active');
document.querySelector('.cultural .slider-navigation button.active').classList.remove('active');
document.querySelector(`.cultural .slider-navigation button:nth-child(${imageNumber})`).classList.add('active');
currentCulturalImage = imageNumber;
}
setInterval(() => {
currentCulturalImage++;
if (currentCulturalImage > 4) {
currentCulturalImage = 1;
}
showCulturalImage(currentCulturalImage);
}, 5000);
</script>
<script>
//----------------------------- For sports -----------------------
let currentImage = 1;
const showImage = (imageNumber) => {
document.querySelector('.slider-image.active').classList.remove('active');
document.querySelector(`.slider-image:nth-child(${imageNumber})`).classList.add('active');
document.querySelector('.slider-navigation button.active').classList.remove('active');
document.querySelector(`.slider-navigation button:nth-child(${imageNumber})`).classList.add('active');
currentImage = imageNumber;
}
setInterval(() => {
currentImage++;
if (currentImage > 4) {
currentImage = 1;
}
showImage(currentImage);
}, 7000);
</script>
</body>
</html>