-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
80 lines (67 loc) · 1.93 KB
/
index.php
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
<?php
/**
* you can add img urls here
* example:
$imgUrls = [
'link to image 1',
'link to image 2',
]
* the img urls are inserted before the local images (from the /images folder)
*/
$imgUrls = [
]
?>
<html>
<head>
<link rel="stylesheet" href="css/fixes.css">
<style>
body {
cursor: none;
/* this is the visible color 'behind' the images*/
background-color: rgb(83, 87, 96);
overflow: hidden;
}
</style>
</head>
<body style="margin: 0;padding: 0">
<div id="maximage" style="width: 100%;height: 100%">
<?php
//display img urls
foreach ($imgUrls as $entry) { ?>
<div class="mc-image" title="" style="background-image: url('<?php echo $entry ?>'); height: 100%; width: 100%;"
data-href=""></div>
<?php }
//local /images folder
if ($handle = opendir('./images')) {
while (false !== ($entry = readdir($handle))) {
if (strpos($entry, '.') === 0) { //we ignore all files starting with . e.g. . (current dir) or .. or hidden files
//ignore
} else {
?>
<div class="mc-image" title=""
style="background-image: url('images/<?php echo $entry ?>'); height: 100%; width: 100%;"
data-href=""></div>
<?php
}
}
}
?>
</div>
<script src="js/jquery-3.3.1.min.js"></script>
<!--<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>-->
<script src="js/jquery.cycle.all.js"></script>
<script>
$(function () {
setTimeout(function () {
$('#maximage').cycle({
fx: 'uncover', //or all
speed: 2000,
timeout: 10000, //10000
random: 0 //set to 1 for random order
});
//give kiosk mode some time to become full screen
}, 5000)
});
</script>
</body>
</html>