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