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