-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindexindex.php
More file actions
60 lines (45 loc) · 1.47 KB
/
Copy pathindexindex.php
File metadata and controls
60 lines (45 loc) · 1.47 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Auto Reshuffle Images (4x4 Grid)</title>
<style>
.gallery {
display: grid;
grid-template-columns: repeat(2, 1fr); /* 4 columns */
grid-template-rows: repeat(2, 1fr); /* 4 rows */
gap: 10px;
width: 60%;
height: auto;
line-height: 5em;
margin: 1em auto;
box-shadow: 0px 10px 60px rgba(0,0,0,0.4);
padding: 3em;
}
.gallery img {
width: 90%;
height: auto;
object-fit: cover;
border-radius: 5px;
}
</style>
</head>
<body>
<div id="imageGallery">
<?php include 'index1.php'; ?> <!-- Load images from index1.php -->
</div>
<script>
function loadNewImages() {
fetch('index1.php') // Fetch only index1.php
.then(response => response.text())
.then(data => {
document.getElementById("imageGallery").innerHTML = data; // Replace only gallery
})
.catch(error => console.error("Error loading images:", error));
}
// Auto-refresh images every 10 seconds
setInterval(loadNewImages, 3000);
</script>
</body>
</html>