<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
#c// ###################################################################
#c// Dropfloat theme for album
#c// Copyright 2005 Helmar Wieland <heldhelm@gmx.de> <http://helmar.dyndns.org/>
#c// License: Creative Commons Attribution-ShareAlike 2.5
#c//          http://creativecommons.org/licenses/by-sa/2.5/
#c// ###################################################################
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title><:=Path('album_name'):></title>
<meta http-equiv='content-type' content='text/html;charset=ISO-8859-1' />
<: Meta() :>//
<link rel='stylesheet' type='text/css' href='<:=Theme_URL():>/dropfloat.css' title='Dropfloat album style' />
<style type='text/css'>
<!--
div.shadow {
  background: url(<:=Theme_URL():>/shadow.gif) right bottom no-repeat;
}
div.corner_bl {
  background: url(<:=Theme_URL():>/corner_bl.gif) -14px 100% no-repeat;
}
div.corner_tr {
  background: url(<:=Theme_URL():>/corner_tr.gif) 100% -14px no-repeat;
}
div.shadow:hover div.corner_bl { /* move 2px right and down */
  background: url(<:=Theme_URL():>/corner_bl.gif) -16px 100% no-repeat;
}
div.shadow:hover div.corner_tr {
  background: url(<:=Theme_URL():>/corner_tr.gif) 100% -16px no-repeat;
}
-->
</style>
</head>
<body>
<ul class='breadcrums'>
  <li><:=Parent_Albums(' </li><li>&raquo; '):></li>
  <li class='up'><a href=<:=Back():>>Up</a></li>
</ul>
<:
# find out size of (possible) thumbnails on page
my $thumb_x = 160; # default if no thumbnails on page
my $thumb_y = 120;
my $alb = First('dirs');
while ($alb) {
  if (Get($alb, 'URL', 'album_page', 'thumb')) {
    $thumb_x = Get($alb, 'thumb', 'x');
    $thumb_y = Get($alb, 'thumb', 'y');
  }
  $alb = Next($alb);
}
my $img = First('pics');
while ($img) {
  $thumb_x = Get($img, 'thumb', 'x');
  $thumb_y = Get($img, 'thumb', 'y');
  $img = Next($img);
}

# print subfolder thumbnails
$alb = First('dirs');
if ($alb) {
  print "<div class='childalbums'>\n";
  while ($alb) {
    print "<div class='float' title='", Name($alb), "'>";
    print "<div class='shadow'><div class='corner_bl'><div class='corner_tr'>";
    print Get($alb, 'href', 'dir');
    if (Get($alb, 'URL', 'album_page', 'thumb')) {
      print "<img class='albumthumb' src=", Get($alb, 'URL', 'album_page', 'thumb'), " width='", $thumb_x, "' height='", $thumb_y, "' alt='", Name($alb), "' />";
    } else {
      print "<img class='albumthumb' src='", Theme_URL(), "/folder.gif' width='", $thumb_x, "' height='", $thumb_y, "' alt='", Name($alb), "' />";
    }
    print "</a>";
    print "</div></div></div>";
    print "<div class='foldername' style='max-width:" , $thumb_x, "px;'>";
    print "<img class='arrow' src='", Theme_URL(), "/arrow.png' alt='Subalbum arrow' width='14' height='14' />";
    print Get($alb, 'href', 'dir');
    print Name($alb);
    print "</a></div>";
    print "</div>\n";
    $alb = Next($alb);
  }
  print "</div>\n";
}

# print image thumbnails
$img = First('pics');
if ($img) {
  print "<div class='thumbnails'>\n";
  while ($img) {
    print "<div class='float'><div class='shadow'><div class='corner_bl'><div class='corner_tr'>";
    print Get($img, 'href', 'image');
    print "<img src=", Get($img, 'URL', 'album_page', 'thumb'), " width='", Get($img, 'thumb', 'x'), "' height='", Get($img, 'thumb', 'y'), "' alt='", Get($img, 'alt'), "' title='", Get($img, 'name'), "' /></a>";
    print "</div></div></div></div>\n";
    $img = Next($img);
  }
  print "</div>"
}
:>
<address>
<: Credit() :> on <:=scalar localtime:><br />
<span>Dropfloat album theme 0.3 by <a href='http://helmar.dyndns.org/'>Helmar Wieland</a></span>
</address>
</body>
</html>
