Did some css improvements : parent folder link and non album directories

This commit is contained in:
Marc MAURICE 2011-01-05 00:27:32 +01:00
parent 466145f389
commit 2036c6117c

View file

@ -166,7 +166,8 @@ header('Expires: '.gmdate('D, d M Y H:i:s \G\M\T', time() + 3600));
<head> <head>
<style type="text/css"> <style type="text/css">
body { body {
padding-top: 2em; margin-top: 0;
font-family: sans-serif;
} }
img { img {
border: 0; border: 0;
@ -177,24 +178,24 @@ a {
.square { .square {
display: inline-block; display: inline-block;
} }
.image { .image, .foldername, .image_nopreview, .foldername_nopreview {
width: <?php echo THUMB_SIZE ?>px;
height: <?php echo THUMB_SIZE ?>px;
display: table-cell; display: table-cell;
text-align: center;
vertical-align: middle; vertical-align: middle;
} }
.foldername { .image, .image_nopreview {
width: <?php echo THUMB_SIZE ?>px;
text-align: center;
}
.image, .foldername {
height: <?php echo THUMB_SIZE ?>px; height: <?php echo THUMB_SIZE ?>px;
display: table-cell; }
vertical-align: middle; .foldername, .foldername_nopreview {
padding-left: 1ex;
} }
#parentfolder { #parentfolder {
position: fixed;
font-size: 4em; font-size: 4em;
font-weight: bold; font-weight: bold;
top: 0; height: 0.6em;
left: 0;
} }
</style> </style>
<?php foreach ($plugins as $p) if (is_file("plugins/$p/style.css")) { ?> <?php foreach ($plugins as $p) if (is_file("plugins/$p/style.css")) { ?>
@ -203,19 +204,22 @@ a {
</head> </head>
<body> <body>
<div id="parentfolder"><a href="<?php echo $parentLink ?>">
<?php if ($parentLink !== '') { ?> <?php if ($parentLink !== '') { ?>
<div id="parentfolder"><a href="<?php echo $parentLink ?>">^</a></div> ^
<?php } ?> <?php } ?>
&nbsp;</a></div>
<?php plugins_include("before_content.php") ?> <?php plugins_include("before_content.php") ?>
<?php foreach($folders as $folder) { ?> <?php foreach($folders as $folder) { ?>
<div class="folder"> <div class="folder">
<?php if ($folder["preview"] === "") { ?> <?php if ($folder["preview"] === "") { ?>
<a href="<?php echo $folder["link"] ?>"><?php echo $folder["name"] ?></a> <div class="square"><div class="image_nopreview"> - </div></div>
<div class="square"><div class="foldername_nopreview"> <a href="<?php echo $folder["link"] ?>"><?php echo $folder["name"] ?></a> </div></div>
<?php } else { ?> <?php } else { ?>
<div class="square"><div class="image"><a href="<?php echo $folder["link"] ?>"><img src="<?php echo $folder["preview"] ?>" /></a></div></div> <div class="square"><div class="image"> <a href="<?php echo $folder["link"] ?>"><img src="<?php echo $folder["preview"] ?>" /></a> </div></div>
<div class="square"><div class="foldername"><a href="<?php echo $folder["link"] ?>"><?php echo $folder["name"] ?></a></div></div> <div class="square"><div class="foldername"> <a href="<?php echo $folder["link"] ?>"><?php echo $folder["name"] ?></a> </div></div>
<?php } ?> <?php } ?>
</div> </div>
<?php } ?> <?php } ?>