make html xhtml 1.0 compliant
authorEugene Crosser <crosser@average.org>
Mon, 1 Sep 2008 22:43:22 +0000 (22:43 +0000)
committerEugene Crosser <crosser@average.org>
Mon, 1 Sep 2008 22:43:22 +0000 (22:43 +0000)
streamline styles

include/gallery.css
include/gallery.js
include/show.js
mkgallery.pl

index fa3ad84f04f3de13a270c6c41f144c69c62c021d..e278b305edcacf6ae70401c718d5f1805ec944d5 100644 (file)
@@ -5,7 +5,7 @@
        http://www.average.org/mkgallery/
 */
 
-.slideimage img {
+img.thumbnail {
  clear:both;
  border-style: inset;
  border-color: gray;
@@ -13,7 +13,7 @@
  margin: 0.2ex;
 }
 
-.slideshowContainer img {
+img.mainformat {
  clear:both;
  border-style: none;
  margin: 0px;
index a870a03eb3d138aa4693df1c8a00beb305061d63..fa37bbf7925fb12e10b86ab050477aade5c294bd 100644 (file)
@@ -38,8 +38,9 @@ function init_gallery() {
        /* Populate images list */
 
        $$('div.varimages').each(function(el,i){
-               rimgs[el.id] = i;
-               vimgs[i] = [el.id, el.title, []];
+               var rel=el.get('id');
+               rimgs[rel] = i;
+               vimgs[i] = [rel, el.title, []];
                el.getElements('a').each(function(ael,j){
                        dim = /(\d+)[^\d](\d+)/.exec(ael.text);
                        w = dim[1];
@@ -117,11 +118,11 @@ function init_gallery() {
 
        $$('a.showStart').each(function(el){
                el.addEvent('click',
-                               show.start.bind(show,[rimgs[el.get('id')],1]));
+                       show.start.bind(show,[rimgs[el.get('rel')],1]));
        });
        $$('a.showImage').each(function(el){
                el.addEvent('click',
-                               show.start.bind(show,[rimgs[el.get('id')],0]));
+                       show.start.bind(show,[rimgs[el.get('rel')],0]));
        });
 
        /* Determine if we need to go directly into show mode */
index f7f555ec02fcc94673fcb681957bbc1f55117c6f..5016928d2c1cef6718a1298260954e8616a3e461 100644 (file)
@@ -72,12 +72,11 @@ var Show = new Class({
 
                this.updatecoords();
                this.prevdisplay = new Element('img').
+                       set('class', 'mainformat').
                        setProperty('alt', 'Current Image').
                        setStyle('opacity', 0).
                        injectInside(this.container.container);
-               this.ondisplay = new Element('img').
-                       setProperty('alt', 'Current Image').
-                       setStyle('opacity', 0).
+               this.ondisplay = this.prevdisplay.clone().
                        injectInside(this.container.container);
                this.loadingdiv = new Element('div').
                addClass('loading').setStyles({
index b5a82c8d1871ecc602f517eeeb9432df7ea67860..4166ae6ce2b1c0aa55cf01663f63b989037a8b79 100755 (executable)
@@ -510,6 +510,7 @@ sub makeaux {
                                end_table,"\n",
                                center(table({-class=>'picframe'},
                                        Tr(td(img({-src=>$imgsrc,
+                                                  -class=>'standalone',
                                                   -alt=>$title}))))),"\n",
                                end_html,"\n";
                        close($F);
@@ -538,6 +539,7 @@ sub makeaux {
                        h1($title),"\n",
                        table({-class=>'ipage'},
                                Tr(td(img({-src=>$imgsrc,
+                                          -class=>'thumbnail',
                                           -alt=>$title})),
                                        td($self->infotable))),
                        a({-href=>'../index.html',-class=>'conceal'},
@@ -649,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";
 }
 
@@ -668,18 +670,20 @@ 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,-alt=>$title})),"\n"),"\n",
-               start_div({-class=>'varimages',-id=>$name,-title=>$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];