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