options: -image_sizes -no_crop -medium 800x400
<:
# Emboss Theme for Album (Time-stamp: "2003-02-18 18:47:48 ifi")
#
# Copyright (C) 2003 by Zoltán Ivánfi <ifi@mailbox.hu>
#
# Emboss Theme is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Emboss Theme is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

  $cols = Get_Opt('columns');

  if ($cols >= 5) {
    $albumImage = Theme_Path() . "/album-5.jpg";
  } else {
    $albumImage = Theme_Path() . "/album-4.jpg";
  }

  if (Parent_Albums_Left() > 1) {
    $hasParent = 1;
  }

  sub beginCell {
    if ($col == 0) {
      print("  <tr>\n");
    }
    print("    <td width='" . int(100/$cols) . "%' align='center'>");
    $col++;
  }

  sub beginSpanningCell {
    if ($col == 0) {
      print("  <tr>\n");
    }
    print("    <td colspan='" . ($cols - $col) . "' align='center'>");
    $col = $cols;
  }

  sub endCell {
    print("</td>\n");
    if ($col == $cols) {
      $col = 0;
      print("  </tr>\n");
    }
  }

  sub calculateSize {
    $width = Get_Opt('x');
    $height = Get_Opt('y');
    if (!Get_Opt('crop')) {
      $aspect = Image_Width() / Image_Height();
      if ($width / $height < $aspect) {
        $height = int($width / $aspect + .5);
      } else {
        $width = int($height * $aspect + .5);
      }
    }
  }
:>//
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=<:= Get_Opt('charset') :>">
  <: Meta() :>//
  <title>Album: <: pAlbum_Name() :></title>
  <style type="text/css">

    img {
      border-style: solid;
      border-width: 1px;
      border-color: black;
      margin: 5px;
    }

    td {
      border-style: solid;
      border-width: 1px;
      border-top-color: white;
      border-left-color: white;
      border-bottom-color: black;
      border-right-color: black;
    }

    A:link {
      color: #000099;
      text-decoration: none;
    }

    A:visited {
      color: #000066;
      text-decoration: none;
    }

    A:hover {
      text-decoration: underline;
    }

  </style>
</head>
<body background="<:= Theme_Path() :>/bg.jpg">
<table border="0" cellpadding="20" cellspacing="0" width="100%">
<:
  beginSpanningCell();
  print("<big>");
  pJoin_Parent_Albums(" / ");
  print("</big>");
  endCell();
  if (isHeader()) {
    beginSpanningCell();
    pHeader();
    endCell();
  }
  if ($hasParent) {
    beginCell();
    print("<a href=" . Back() . ">");
    print("<img src='" . $albumImage . "' width='133' height='100'>");
    print("<br>..");
    print("</a>");
    endCell();
  }
  while (Child_Albums()) {
    beginCell();
    print("<a href=" . Child_Album_URL() . ">");
    print("<img src='" . $albumImage . "' width='133' height='100'>");
    print("<br>" . Child_Album_Name());
    print("</a>");
    endCell();
    Next_Child_Album();
  }
  while (Images()) {
    beginCell();
    print("<a href=" . Image_URL() . " title='");
    pImage_Caption();
    if (Image_Height()) {
      calculateSize();
      print("'><img src=" . Image_Thumb() . " width='" . $width . "' height='" . $height . "'>");
    } else {
      print("'><img src='" . Theme_Path() . "/unknown.jpg' width='133' height='100'>");
    }
    print("<br>" . Image_Name());
    print("</a>");
    endCell();
    Next_Image();
  }
  beginSpanningCell();
  Credit();
  print("<br><br>Emboss Theme by IFI");
  endCell();
  if (isFooter()) {
    beginSpanningCell();
    pFooter();
    endCell();
  }
:>//
</table>
</body>
</html>
