]> www.average.org Git - mkgallery.git/blobdiff - mkgallery.pl
IE compatibility
[mkgallery.git] / mkgallery.pl
index 7efd5c4209209b42e03497f7b6ae9ee29e23bad2..fffb0301c6ca5bd2f21e4205ebdf6a3635fe46a7 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id$
+my $version='$Id$';
 
 # Recursively create image gallery index and slideshow wrappings.
 # Makes use of modified "slideshow" javascript by Samuel Birch
@@ -489,14 +489,16 @@ sub makeaux {
                                        -head=>meta({-http_equiv=>'Refresh',
                                                -content=>"3; url=$fwdref"}),
                                        -style=>{-src=>$inc."gallery.css"},
-                                       ),"\n";
+                                       ),"\n",
+                                       comment("Created by ".$version),"\n";
                                                
                        } else {
                                print $F start_html(-title=>$title,
                                        -encoding=>"utf-8",
                                        -bgcolor=>"#808080",
                                        -style=>{-src=>$inc."gallery.css"},
-                                       ),"\n";
+                                       ),"\n",
+                                       comment("Created by ".$version),"\n";
                        }
                        print $F start_table({-class=>'navi'}),start_Tr,"\n",
                                td(a({-href=>"../index.html"},"Index")),"\n",
@@ -507,7 +509,9 @@ sub makeaux {
                                end_Tr,
                                end_table,"\n",
                                center(table({-class=>'picframe'},
-                                       Tr(td(img({-src=>$imgsrc}))))),"\n",
+                                       Tr(td(img({-src=>$imgsrc,
+                                                  -class=>'standalone',
+                                                  -alt=>$title}))))),"\n",
                                end_html,"\n";
                        close($F);
                }
@@ -530,10 +534,13 @@ sub makeaux {
                                        {-src=>$inc."urlparser.js"},
                                        {-src=>$inc."infopage.js"},
                                ]),"\n",
+                       comment("Created by ".$version),"\n",
                        start_center,"\n",
                        h1($title),"\n",
                        table({-class=>'ipage'},
-                               Tr(td(img({-src=>$imgsrc})),
+                               Tr(td(img({-src=>$imgsrc,
+                                          -class=>'thumbnail',
+                                          -alt=>$title})),
                                        td($self->infotable))),
                        a({-href=>'../index.html',-class=>'conceal'},
                                'Index'),"\n",
@@ -574,10 +581,14 @@ sub startindex {
                                {-src=>$inc."overlay.js"},
                                {-src=>$inc."urlparser.js"},
                                {-src=>$inc."multibox.js"},
-                               {-src=>$inc."slideshow.js"},
+                               {-src=>$inc."showwin.js"},
+                               {-src=>$inc."controls.js"},
+                               {-src=>$inc."show.js"},
                                {-src=>$inc."gallery.js"},
-                               {-code=>"var incPrefix='$inc';"}
-                       ]),
+                       ]),"\n",
+               comment("Created by ".$version),"\n",
+               start_div({-class => 'indexContainer',
+                               -id => 'indexContainer'}),
                a({-href=>"../index.html"},"UP"),"\n",
                start_center,"\n",
                h1($title),"\n",
@@ -588,7 +599,9 @@ sub endindex {
        my $self = shift;
        my $IND = $self->{-IND};
 
-       print $IND end_center,end_html,"\n";
+       print $IND end_center,end_div,
+       # "\n",'<script type="text/javascript">init_gallery();</script>',"\n",
+       end_html,"\n";
 
        close($IND) if ($IND);
        undef $self->{-IND};
@@ -638,7 +651,7 @@ sub startimglist {
        my $slideref = sprintf(".html/%s-slide.html",$first);
 
        print $IND h2("Images ",
-               a({-href=>$slideref,-class=>'showStart',-id=>$first},
+               a({-href=>$slideref,-class=>'showStart',-rel=>'i'.$first},
                        '&gt; slideshow')),"\n";
 }
 
@@ -657,28 +670,32 @@ sub img_entry {
 
        print $IND a({-name=>$name}),"\n",
                start_table({-class=>'slide'}),start_Tr,start_td,"\n",
-               div({-class=>'slidetitle',-id=>$name},
+               div({-class=>'slidetitle'},
                        "\n ",a({-href=>".html/$name-info.html",
                                -title=>'Image Info: '.$name,
                                -class=>'infoBox'},
                                $title),"\n"),"\n",
-               div({-class=>'slideimage',-id=>$name},
+               div({-class=>'slideimage'},
                        "\n ",a({-href=>".html/$name-static.html",
                                -title=>$title,
                                -class=>'showImage',
-                               -id=>$name},
-                               img({-src=>$thumb})),"\n"),"\n",
-               start_div({-class=>'varimages',-id=>$name,-name=>$title}),"\n";
+                               -rel=>'i'.$name},
+                               img({-src=>$thumb,
+                                    -class=>'thumbnail',
+                                    -alt=>$title})),"\n"),"\n",
+               start_div({-class=>'varimages',-id=>'i'.$name,-title=>$title}),"\n";
        foreach my $sz(@sizes) {
                my $src=$self->{$sz}->{'url'};
                my $w=$self->{$sz}->{'dim'}->[0];
                my $h=$self->{$sz}->{'dim'}->[1];
                print $IND "  ",a({-href=>$src,
                        -class=>"conceal",
+                       -rel=>$w."x".$h,
                        -title=>"Reduced to ".$w."x".$h},
                        $w."x".$h)," \n";
        }
        print $IND "  ",a({-href=>$name,
+                               -rel=>$w."x".$h,
                                -title=>'Original'},$w."x".$h),
                "\n",end_div,"\n",
                end_td,end_Tr,end_table,"\n";