New plugin to show filenames
[bizou.git] / template.php
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title> <?= $realDir ?> </title>
5 <style type="text/css">
6 body {
7         margin-top: 0;
8         font-family: sans-serif;
9 }
10 img {
11         border: 0;
12 }
13 a {
14         text-decoration: none;
15 }
16 .square {
17         display: inline-block;
18         vertical-align: top;
19         height: <?= THUMB_SIZE ?>px;
20 }
21 .image, .foldername, .image_nopreview, .foldername_nopreview {
22         display: table-cell;
23         vertical-align: middle;
24 }
25 .image, .image_nopreview {
26         width: <?= THUMB_SIZE ?>px;
27         text-align: center;
28 }
29 .image, .foldername {
30         height: <?= THUMB_SIZE ?>px;
31 }
32 .foldername, .foldername_nopreview {
33         padding-left: 1ex;
34 }
35 #parentfolder {
36         font-size: 4em;
37         font-weight: bold;
38         height: 0.6em;
39 }
40 #credit {
41         text-align: right;
42         font-size: 0.25cm;
43         color: gray;
44 }
45 </style>
46 <?php foreach ($plugins as $p) if (is_file("plugins/$p/style.css")) { ?>
47         <link rel="stylesheet" type="text/css" href="<?= $rootUrl."plugins/$p/style.css" ?>" />
48 <?php } ?>
49 <?php plugins_include("head.php") ?>
50 </head>
51 <body>
52
53 <div id="parentfolder"><a href="<?= $parentLink ?>">
54 <?php if ($parentLink !== '') { ?>
55 ^
56 <?php } ?>
57 &nbsp;</a></div>
58
59 <?php plugins_include("before_content.php") ?>
60
61 <div id="folders">
62 <?php foreach($folders as $folder) { $preview = getAlbumPreview($folder["file"]); ?>
63         <div class="folder">
64         <?php if ($preview === "") { ?>
65                 <div class="square"><div class="image_nopreview"> - </div></div>
66                 <div class="square"><div class="foldername_nopreview"> <a href="<?= $folder["link"] ?>"><?= $folder["name"] ?></a> </div></div>
67         <?php } else { ?>
68                 <div class="square"><div class="image"> <a href="<?= $folder["link"] ?>"><img src="<?= $rootUrl.$preview ?>" /></a> </div></div>
69                 <div class="square"><div class="foldername"> <a href="<?= $folder["link"] ?>"><?= $folder["name"] ?></a> </div></div>
70                 <?php if (isset($generating)) { ob_flush(); flush(); } ?>
71         <?php } ?>
72         </div>
73 <?php } ?>
74 </div>
75
76 <div id="images">
77 <?php foreach ($imageFiles as $file) { ?>
78         <div class="square"><div class="image"><a href="<?= $file["link"] ?>"><img src="<?= $rootUrl.getPreview($file["file"]) ?>" alt="<?= $file["name"] ?>" /></a></div><?php plugins_include("after_thumb.php") ?></div>
79         <?php if (isset($generating)) { ob_flush(); flush(); } ?>
80 <?php } ?>
81 </div>
82
83 <div id="miscfiles">
84 <?php foreach ($otherFiles as $file) { ?>
85         <div class="miscfile"><a href="<?= $file["link"] ?>"><?= $file["name"] ?></a></div>
86 <?php } ?>
87 </div>
88
89 <?php plugins_include("after_content.php") ?>
90
91 <p id="credit">
92 Generated by <a href="http://www.positon.org/bizou/">Bizou</a>
93 </p>
94
95 </body>
96 </html>