+
+ # info html
+ my $fn = sprintf("%s/.html/%s-info.html",$dn,$name);
+ if (isnewer($self->{-fullpath},$fn)) {
+ my $F;
+ unless (open($F,'>'.$fn)) {
+ warn "cannot open \"$fn\": $!";
+ return;
+ }
+ my $imgsrc = sprintf("../.%s/%s",$sizes[0],$name);
+ print $F start_html(-title=>$title,
+ -encoding=>"utf-8",
+ -style=>{-src=>$inc."gallery.css"},),"\n",
+ start_center,"\n",
+ h1($title),"\n",
+ table({-class=>'ipage'},
+ Tr(td(img({-src=>$imgsrc})),
+ td($self->infotable))),
+ a({-href=>'../index.html'},'Index'),"\n",
+ end_center,"\n",
+ end_html,"\n";
+ close($F);
+ }
+}
+
+sub startindex {
+ my $self = shift;
+ my $fn = $self->{-fullpath}.'/index.html';
+ my $block = $self->{-fullpath}.'/.noindex';
+ $fn = '/dev/null' if ( -f $block );
+ my $IND;
+ unless (open($IND,'>'.$fn)) {
+ warn "cannot open $fn: $!";
+ return;
+ }
+ binmode($IND, ":utf8");
+ $self->{-IND} = $IND;
+
+ my $inc = $self->{-inc};
+ my $title = $self->{-title};
+ my $rsslink="";
+ if ($self->{-rss}) {
+ $rsslink=Link({-rel=>'alternate',
+ -type=>'application/rss+xml',
+ -title=>'RSS',
+ -href=>$self->{-rss}});
+ }
+ print $IND start_html(-title => $title,
+ -encoding=>"utf-8",
+ -head=>$rsslink,
+ -style=>{-src=>[$inc."gallery.css",
+ $inc."lightbox.css"],
+ -code=>"\
+.lbLoading {background: #fff url(".$inc."loading.gif) no-repeat center;}
+#lbPrevLink {background: transparent url(".$inc.
+ "prevlabel.gif) no-repeat 0% 15%;}
+#lbPrevLink:hover {background: transparent url(".$inc.
+ "prevlabel.gif) no-repeat 0% 15%;}
+#lbNextLink {background: transparent url(".$inc.
+ "nextlabel.gif) no-repeat 0% 15%;}
+#lbNextLink:hover {background: transparent url(".$inc.
+ "nextlabel.gif) no-repeat 0% 15%;}
+#lbCloseLink {background: transparent url(".$inc.
+ "closelabel.gif) no-repeat center;}
+.lightboxDesc {display: block;}"},
+ -script=>[
+ {-src=>$inc."mootools.js"},
+ {-src=>$inc."gallery.js"},
+ {-src=>$inc."lightbox.js"},
+ {-code=>"\
+var incPrefix='$inc';
+window.addEvent('domready',function(){
+ Lightbox.init({descriptions: '.lightboxDesc', showControls: true});
+});"}
+ ]),
+ a({-href=>"../index.html"},"UP"),"\n",
+ start_center,"\n",
+ h1($title),"\n",
+ "\n";