-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.php
96 lines (88 loc) · 2.5 KB
/
template.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE html>
<html>
<head>
<title> <?= $realDir ?> </title>
<style type="text/css">
body {
margin-top: 0;
font-family: sans-serif;
}
img {
border: 0;
}
a {
text-decoration: none;
}
.square {
display: inline-block;
vertical-align: top;
}
.image, .foldername, .image_nopreview, .foldername_nopreview {
display: table-cell;
vertical-align: middle;
}
.image, .image_nopreview {
width: <?= THUMB_SIZE ?>px;
text-align: center;
}
.image, .foldername {
height: <?= THUMB_SIZE ?>px;
}
.foldername, .foldername_nopreview {
padding-left: 1ex;
}
#parentfolder {
font-size: 4em;
font-weight: bold;
height: 0.6em;
}
#credit {
text-align: right;
font-size: 0.25cm;
color: gray;
}
</style>
<?php foreach ($plugins as $p) if (is_file("plugins/$p/style.css")) { ?>
<link rel="stylesheet" type="text/css" href="<?= $rootUrl."plugins/$p/style.css" ?>" />
<?php } ?>
<?php plugins_include("head.php") ?>
</head>
<body>
<div id="parentfolder">
<?php if ($parentLink !== '') { ?>
<a href="<?= $parentLink ?>">^</a>
<?php } ?>
</div>
<?php plugins_include("before_content.php") ?>
<div id="folders">
<?php foreach($folders as $folder) { $preview = getAlbumPreview($folder["file"]); ?>
<div class="folder">
<?php if ($preview === "") { ?>
<div class="square"><div class="image_nopreview"><a href="<?= $folder["link"] ?>">■</a></div></div>
<div class="square"><div class="foldername_nopreview"> <a href="<?= $folder["link"] ?>"><?= $folder["name"] ?></a> </div></div>
<?php } else { ?>
<div class="square"><div class="image"> <a href="<?= $folder["link"] ?>"><img src="<?= $rootUrl.$preview ?>" /></a> </div></div>
<div class="square"><div class="foldername"> <a href="<?= $folder["link"] ?>"><?= $folder["name"] ?></a> </div></div>
<?php if (isset($generating)) { ob_flush(); flush(); } ?>
<?php } ?>
</div>
<?php } ?>
</div>
<div id="images">
<?php foreach ($imageFiles as $file) { ?>
<?php $previewfile = $rootUrl.getPreview($file["file"]) ?>
<div class="square"><div class="image imagepreview"><a href="<?= $file["link"] ?>"><img src="<?= $previewfile ?>" alt="<?= $file["name"] ?>" /></a></div><?php plugins_include("after_thumb.php") ?></div>
<?php if (isset($generating)) { ob_flush(); flush(); } ?>
<?php } ?>
</div>
<div id="miscfiles">
<?php foreach ($otherFiles as $file) { ?>
<div class="miscfile"><a href="<?= $file["link"] ?>"><?= $file["name"] ?></a></div>
<?php } ?>
</div>
<?php plugins_include("after_content.php") ?>
<p id="credit">
Generated by <a href="http://www.positon.org/bizou/">Bizou</a>
</p>
</body>
</html>