-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive.html
293 lines (245 loc) · 6.55 KB
/
archive.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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap" rel="stylesheet">
<style>
* {box-sizing: border-box}
html, body {
height: 100%; /* Ensure body stretches to the full viewport */
margin: 0;
}
body {
font-family: 'Press Start 2P', cursive;
background: linear-gradient(180deg, #0b0b40 0%, #1a1a66 50%, #2b2b85 100%);
color: #fff;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
padding: 0; /* Remove padding to avoid extra space at the bottom */
}
.mySlides {
display: none;
border: 2px solid #00ff00;
border-radius: 10px;
}
img {
vertical-align: middle;
width: 100%; /* Adjust this value to reduce the size */
height: auto; /* Maintain aspect ratio */
max-width: 600px; /* Set a maximum width */
max-height: 400px; /* Set a maximum height */
object-fit: cover; /* Ensure the image fits within the container */
}
.slideshow-container {
max-width: 500px; /* Adjust this as needed */
margin: auto;
position: relative;
border-radius: 10px;
}
/* Next & previous buttons */
.prev, .next {
cursor: pointer;
position: absolute;
top: 50%;
width: auto;
padding: 16px;
color: #00ff00;
font-weight: bold;
font-size: 18px;
transition: 0.6s ease;
border-radius: 3px;
user-select: none;
background-color: rgba(0, 0, 0, 0.8);
}
/* Position the "next button" to the right */
.next {
right: 0;
}
.prev {
left: 0;
}
/* Adjust the caption text styling */
.text {
color: #ffcc00; /* Adjust to your theme */
font-size: 15px;
padding: 8px 12px;
text-align: center;
margin-top: 10px; /* Add some space above the caption */
position: relative;
bottom: 0;
}
/* Number text (1/3 etc) */
.numbertext {
color: #ffcc00;
font-size: 12px;
padding: 8px 12px;
position: absolute;
top: 0;
}
/* The dots/bullets/indicators */
.dot {
cursor: pointer;
height: 10px;
width: 10px;
margin: 0 2px;
background-color: #bbb;
border-radius: 50%;
display: inline-block;
transition: background-color 0.6s ease;
}
.active, .dot:hover {
background-color: #00ff00;
}
/* Fading animation */
.fade {
animation-name: fade;
animation-duration: 1.5s;
}
@keyframes fade {
from {opacity: .4}
to {opacity: 1}
}
/* Back to Home Button */
.back-home-button {
margin-top: 20px;
padding: 10px 20px;
font-family: 'Press Start 2P', cursive;
background-color: #00ff00; /* Retro green */
color: #000;
border: 2px solid #fff;
cursor: pointer;
transition: background-color 0.3s, transform 0.3s;
}
.back-home-button:hover {
background-color: #ffcc00; /* Change to yellow on hover */
transform: scale(1.1); /* Slightly enlarge on hover */
}
@media (max-width: 768px) {
body {
padding: 10px; /* Add some breathing space on smaller screens */
}
.title {
font-size: 1.8rem; /* Adjust the font size */
}
.slideshow-container {
max-width: 90%; /* Ensure the slider takes up most of the width on mobile */
}
.mySlides img {
max-height: 300px; /* Limit the height of the images on mobile */
}
.prev, .next {
font-size: 12px; /* Reduce the size of the navigation arrows */
padding: 5px; /* Smaller padding for the arrows */
margin-top: -20px; /* Adjust to keep arrows aligned */
}
.text {
font-size: 0.8rem; /* Smaller caption font for better readability */
margin-top: 5px; /* Adjust the caption position */
}
.dot {
height: 10px;
width: 10px; /* Smaller dots for mobile */
}
.back-home-button {
font-size: 1rem; /* Adjust button size */
padding: 10px 20px; /* Smaller padding */
}
}
@media (max-width: 480px) {
.title {
font-size: 1.5rem; /* Further reduce title size for very small screens */
}
.slideshow-container {
max-width: 95%; /* Further reduce the width for very small screens */
}
.mySlides img {
max-height: 250px; /* Limit image height even more */
}
.prev, .next {
font-size: 10px; /* Make arrows smaller */
padding: 4px; /* Further reduce padding */
}
.text {
font-size: 0.7rem; /* Smaller text for captions */
}
.dot {
height: 8px;
width: 8px; /* Smaller dots */
}
.back-home-button {
font-size: 0.8rem; /* Adjust button font size */
padding: 8px 16px; /* Smaller padding for the button */
}
}
</style>
</head>
<body>
<h2>Photo Archive</h2>
<p style="font-size: 10px;">Here are some of my favorite photographs that I have clicked.</p>
<div class="slideshow-container">
<div class="mySlides fade">
<div class="numbertext">1 / 5</div>
<img src="photo1.JPG" alt="Photo 1">
<div class="text">Seri Lake, 2016</div>
</div>
<div class="mySlides fade">
<div class="numbertext">2 / 5</div>
<img src="photo2.JPG" alt="Photo 2">
<div class="text">Kareri Lake, 2018</div>
</div>
<div class="mySlides fade">
<div class="numbertext">3 / 5</div>
<img src="photo3.JPG" alt="Photo 3">
<div class="text">Hampta Pass, 2019</div>
</div>
<div class="mySlides fade">
<div class="numbertext">4 / 5</div>
<img src="photo4.JPG" alt="Photo 4">
<div class="text">Humayun's Tomb, 2022</div>
</div>
<div class="mySlides fade">
<div class="numbertext">5 / 5</div>
<img src="photo5.JPG" alt="Photo 5">
<div class="text">Buran Pass, 2022</div>
</div>
<a class="prev" onclick="plusSlides(-1)">❮</a>
<a class="next" onclick="plusSlides(1)">❯</a>
</div>
<br>
<div style="text-align:center">
<span class="dot" onclick="currentSlide(1)"></span>
<span class="dot" onclick="currentSlide(2)"></span>
<span class="dot" onclick="currentSlide(3)"></span>
<span class="dot" onclick="currentSlide(4)"></span>
<span class="dot" onclick="currentSlide(5)"></span>
</div>
<button class="back-home-button" onclick="window.location.href='index.html'">Back to Home</button>
<script>
let slideIndex = 1;
showSlides(slideIndex);
function plusSlides(n) {
showSlides(slideIndex += n);
}
function currentSlide(n) {
showSlides(slideIndex = n);
}
function showSlides(n) {
let i;
let slides = document.getElementsByClassName("mySlides");
let dots = document.getElementsByClassName("dot");
if (n > slides.length) {slideIndex = 1}
if (n < 1) {slideIndex = slides.length}
for (i = 0; i < slides.length; i++) {
slides[i].style.display = "none";
}
for (i = 0; i < dots.length; i++) {
dots[i].className = dots[i].className.replace(" active", "");
}
slides[slideIndex-1].style.display = "block";
dots[slideIndex-1].className += " active";
}
</script>
</body>
</html>