Author: dylan
Date: 2004-12-30 16:19:04 -0500 (Thu, 30 Dec 2004)
New Revision: 480

Modified:
   trunk/web/Makefile
   trunk/web/bin/fixhtml
   trunk/web/index.thtml
   trunk/web/templates/menu
Log:
Alright, fixhtml now more properly understands making
"nonlinks", and I believe it will never incorrectly create a "nonlink".


We turn links into nonlinks when they point to the current page,
and don't contain # or ?.

removed the 'dist' from Makefile, too, I'll re-add it later.


Modified: trunk/web/Makefile
===================================================================
--- trunk/web/Makefile  2004-12-30 20:38:52 UTC (rev 479)
+++ trunk/web/Makefile  2004-12-30 21:19:04 UTC (rev 480)
@@ -10,7 +10,7 @@
 
 PERL5LIB   = lib
 TTFLAGS    = -I $T -P init -P config
-FIXFLAGS   = --noext 
+FIXFLAGS   = --noext
 RSYNCFLAGS = -vrzlpt --exclude '.svn'
 TIDYFLAGS  = -q
 TARFLAGS   = --exclude "*.tar.*" --exclude "*.svn*" 
@@ -50,10 +50,7 @@
        find -not -path '*.svn*' -type d -exec chmod -c g+rwxs,u+rwx {} \;
 
 
-dist: build
-       $(TAR) $(TARFLAGS) -cjf "dist.tar.bz2" .
-
-upload: dist
+upload:
        $(RSYNC) $(RSYNCFLAGS) ./ 
$(SFUSER)@shell.sourceforge.net:/home/groups/h/ha/haver/htdocs/
 
 shell:

Modified: trunk/web/bin/fixhtml
===================================================================
--- trunk/web/bin/fixhtml       2004-12-30 20:38:52 UTC (rev 479)
+++ trunk/web/bin/fixhtml       2004-12-30 21:19:04 UTC (rev 480)
@@ -92,13 +92,13 @@
        my ($tag, $file) = @_;
        
        if (my $href = $tag->getAttribute('href')) {
-               $href = rewrite_url($href, $file);
-        if ($href ne '.' or $href eq '') {
-            $tag->setAttribute(href => $href);
-        } else {
+               my $new = rewrite_url($href, $file);
+        if ($new eq '.') {
             $tag->setTagName('span');
             $tag->setAttribute(class => 'nonlink');
-            $tag->removeAttribute('href'); 
+            $tag->removeAttribute('href');
+        } else {
+            $tag->setAttribute(href => $new);
         }
        }
 }
@@ -139,27 +139,22 @@
     
     (undef, $dirs, undef) = File::Spec::Unix->splitpath($file);
 
-    if ($url eq "/$dirs") {
+    if ($url eq "/$file") {
         $ret = '.';
-    } elsif ($url eq "/$file") {
-        $ret = '.';
     } else {
         $ret = File::Spec::Unix->abs2rel($url, "/$dirs");
     }
+    if (not $ret) {
+        $ret = 'index.html';
+    }
+    if (not $opt{ext}) {
+        $ret =~ s/\.\w+$//;
+    }
+   
     if ($opt{verbose}) {
         print STDERR "f('$url', '/$dirs') == '$ret'\n";
     }
 
-    if ($ret eq 'index.html') {
-        $ret = '.';
-    }
-    if (not $ret) {
-        $ret = '.';
-    } else {
-        if (not $opt{ext}) {
-            $ret =~ s/\.\w+$//;
-        }
-    }
 
 
     return $ret;

Modified: trunk/web/index.thtml
===================================================================
--- trunk/web/index.thtml       2004-12-30 20:38:52 UTC (rev 479)
+++ trunk/web/index.thtml       2004-12-30 21:19:04 UTC (rev 480)
@@ -15,10 +15,13 @@
 <p>What is haver? It is three things:</p>
 
 <ol>
-       <li>It is a protocol that is:<ol>
+    <li>It is a protocol that is:
+    <ol>
         <li>Fairly well <a href="/docs/">documented</a> </li>
-               <li>Easy to parse because it <a href="/why-not-xml.html">is not 
XML</a> </li>
-       </ol></li>
+        <li>Easy to parse because it <a href="/why-not-xml.html">is not 
XML</a> </li>
+        <li>Easy to extend.</li>
+    </ol>
+    </li>
        <li>It is a server written in perl using <a 
href="http://poe.perl.org/";>POE</a></li>
        <li>More than one client written in perl, most of which also use 
POE.</li>
 </ol>

Modified: trunk/web/templates/menu
===================================================================
--- trunk/web/templates/menu    2004-12-30 20:38:52 UTC (rev 479)
+++ trunk/web/templates/menu    2004-12-30 21:19:04 UTC (rev 480)
@@ -5,13 +5,13 @@
 
 # Main menu.
 menu = [
-       [ 'Home',     '/'                                           ],
+       [ 'Home',     '/index.html'                                 ],
        [ 'News',     'https://gna.org/news/index.php?group=haver'  ],
        [ 'Wiki',     'http://wiki.chani3.com/wiki/ProjectHaver'    ],
        [ 'Docs',     '/docs'                                       ],
-       [ 'Download', '/download'                                   ],
-       [ 'Clients',  '/clients'                                    ],
-       [ 'Contact',  '/contact'                                     ],
+       [ 'Download', '/download.html'                              ],
+       [ 'Clients',  '/clients/index.html'                         ],
+       [ 'Contact',  '/contact.html'                               ],
 ];
 
 FOREACH item IN menu;


Reply via email to