summaryrefslogtreecommitdiff
path: root/bin/gen-xhtml-thumbnails
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-12-29 09:31:05 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2009-12-29 09:31:05 +0100
commit4f524e65c462b02d6bdff9ab91775227cb70ebba (patch)
tree298990f8655197be4e447c98b7c07fb3f06ba43f /bin/gen-xhtml-thumbnails
parentd2cbbf5012636f5d18c313d28488d2cb8240afb0 (diff)
Only write <div> css attributes if no custom CSS is used
Diffstat (limited to 'bin/gen-xhtml-thumbnails')
-rwxr-xr-xbin/gen-xhtml-thumbnails16
1 files changed, 11 insertions, 5 deletions
diff --git a/bin/gen-xhtml-thumbnails b/bin/gen-xhtml-thumbnails
index db9a43c..b682161 100755
--- a/bin/gen-xhtml-thumbnails
+++ b/bin/gen-xhtml-thumbnails
@@ -81,11 +81,17 @@ foreach my $file (sort(@files)) {
my $image = Image::Imlib2->load($file);
my $thumb;
- printf {$index} (
- '<div style="float: left; width: %dpx; height: %dpx">',
- THUMB_MAX_DIM * 1.1,
- THUMB_MAX_DIM * 1.1,
- );
+ if (defined($css_source)) {
+ print {$index} '<div class="imgbox">';
+ }
+ else {
+ printf {$index} (
+ '<div style="float: left; width: %dpx; height: %dpx">',
+ THUMB_MAX_DIM * 1.1,
+ THUMB_MAX_DIM * 1.1,
+ );
+ }
+
print {$index} "<a href=\"$file\"><img src=\".thumbs/$file\" alt=\"$file\" /></a></div>\n";
print_progress;
$number++;