src/sitemap.en.html
author ewong@pw-wspx.org
Sat, 08 Dec 2012 03:10:56 +0000
changeset 1036 5e954ce606700ce4f390748e9052bc59350a2211
parent 614 cfacb94d8df8756e1f08a361415eecb8da665e1a
child 1243 d9e5f275e4eaa0f4eb9a9824e2a8b5cfac182125
permissions -rw-r--r--
Update Website for SeaMonkey 2.15b3 release.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="en">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">

<link rel="top" href="./" title="SeaMonkey Project">
<link rel="up" href="./" title="Home">

<title>Site Map</title>
</head>
<body>
<h1>SeaMonkey Site Map</h1>

[% USE site = XML::Simple( 
       'sitemap.xml'
       ForceArray = ['page']
       KeyAttr = ['' ]
   )
%]

[% INCLUDE smap node=site;
   BLOCK smap;
     "<ul>\n";
     FOREACH page IN node.page;
       IF page.url;
         IF page.url.match("^http://") OR page.url.match("^https://");
           page.path = page.url;
         ELSE;
           page.path = (page.url == '.') ? '/' : "/$page.url";
         END;
       ELSE;
         # add page id to current path to get page path
         page.path = "$path/$page.id";

         # add suffix for a section (/index.html) or page (.html)
         suffix    = page.page ? '/index.html' : '.html';
         page.url  = "${page.path}${suffix}";
       END;

       # add complete URL to sitemap lookup table
       site.url2page.${page.url} = page;

       # print some debugging info
       # "page: $page.id\n  path: $page.path\n   url: $page.url\n" | stderr;
       "\t<li><a href=\"$page.path\">$page.title</a>";

       # process and child nodes
       INCLUDE smap node=page path=page.path
         IF page.page;

       "</li>\n";
     END;
     "</ul>\n";
   END;
%]

</body>
</html>