2011-06-13 15:55:10 +02:00
|
|
|
<html>
|
|
|
|
<head>
|
2013-08-17 21:01:29 +02:00
|
|
|
<title> <?= IMAGES_DIR.$simpleImagePath ?> </title>
|
2011-06-13 15:55:10 +02:00
|
|
|
<style type="text/css">
|
|
|
|
html, body {
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
body {
|
|
|
|
margin: 0;
|
|
|
|
text-align: center;
|
|
|
|
background: black;
|
|
|
|
color: white;
|
|
|
|
}
|
|
|
|
#theimage {
|
|
|
|
max-width: 100%;
|
|
|
|
max-height: 100%;
|
|
|
|
}
|
|
|
|
a {
|
|
|
|
color: white;
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
#next, #previous, #up {
|
|
|
|
position: fixed;
|
|
|
|
font-size: 4em;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
|
|
|
#up {
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
#next {
|
|
|
|
top: 50%;
|
|
|
|
right: -0;
|
|
|
|
|
|
|
|
}
|
|
|
|
#previous {
|
|
|
|
top: 50%;
|
|
|
|
left: 0;
|
|
|
|
}
|
|
|
|
img {
|
|
|
|
border: 0;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<?php if ($nextImageUrl !== '' and $firefox) { ?>
|
2013-08-17 21:01:29 +02:00
|
|
|
<link rel="prefetch" href="<?= $nextImageUrl ?>" />
|
|
|
|
<link rel="prefetch" href="<?= $nextPageUrl ?>" />
|
2011-06-13 15:55:10 +02:00
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
2013-08-17 21:01:29 +02:00
|
|
|
<a href="<?= $imageUrl ?>"><img src="<?= $imageUrl ?>" id="theimage" /></a>
|
2011-06-13 15:55:10 +02:00
|
|
|
|
|
|
|
<div id="up">
|
2013-08-17 21:01:29 +02:00
|
|
|
<a href="<?= $directoryUrl ?>" title="Back to directory">^</a>
|
2011-06-13 15:55:10 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php if ($nextPageUrl !== '') { ?>
|
|
|
|
<div id="next">
|
2013-08-17 21:01:29 +02:00
|
|
|
<a href="<?= $nextPageUrl ?>" title="Next image">></a>
|
2011-06-13 15:55:10 +02:00
|
|
|
</div>
|
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
<?php if ($prevPageUrl !== '') { ?>
|
|
|
|
<div id="previous">
|
2013-08-17 21:01:29 +02:00
|
|
|
<a href="<?= $prevPageUrl ?>" title="Previous image"><</a>
|
2011-06-13 15:55:10 +02:00
|
|
|
</div>
|
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
<?php if ($nextImageUrl !== '' and ! $firefox) { ?>
|
|
|
|
window.onload = function() { // for browsers not supporting link rel=prefetch
|
|
|
|
var im = new Image();
|
2013-08-17 21:01:29 +02:00
|
|
|
im.src = '<?= $nextImageUrl ?>';
|
2011-06-13 15:55:10 +02:00
|
|
|
var req = new XMLHttpRequest();
|
2013-08-17 21:01:29 +02:00
|
|
|
req.open('GET', '<?= $nextPageUrl ?>', false);
|
2011-06-13 15:55:10 +02:00
|
|
|
req.send(null);
|
|
|
|
};
|
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
// keyboard navigation
|
|
|
|
function keyup(e)
|
|
|
|
{
|
|
|
|
switch (e.keyCode) {
|
|
|
|
case 37: // left
|
2013-08-17 21:01:29 +02:00
|
|
|
window.location = "<?= $prevPageUrl ?>";
|
2011-06-13 15:55:10 +02:00
|
|
|
break;
|
|
|
|
case 39: // right
|
|
|
|
case 32: // space
|
2013-08-17 21:01:29 +02:00
|
|
|
window.location = "<?= $nextPageUrl ?>";
|
2011-06-13 15:55:10 +02:00
|
|
|
break;
|
|
|
|
case 38: // up (down is 40)
|
2013-08-17 21:01:29 +02:00
|
|
|
window.location = "<?= $directoryUrl ?>";
|
2011-06-13 15:55:10 +02:00
|
|
|
break;
|
|
|
|
case 13: // enter
|
2013-08-17 21:01:29 +02:00
|
|
|
window.location = "<?= $imageUrl ?>";
|
2011-06-13 15:55:10 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (document.addEventListener) {
|
|
|
|
document.addEventListener("keyup", keyup, false);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|