Update of /cvsroot/fink/web
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17887

Modified Files:
        header.inc fink.css 
Log Message:
using smarter stylesheets

Index: header.inc
===================================================================
RCS file: /cvsroot/fink/web/header.inc,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- header.inc  29 Feb 2004 16:11:07 -0000      1.63
+++ header.inc  29 Feb 2004 23:12:54 -0000      1.64
@@ -6,28 +6,40 @@
 $lang_code = 'en';
 if ((phpLang_current)) $lang_code = phpLang_current;
 
-if ('ja' == $lang_code) {
-       // section navigation (always visible)
-       $section_names = array(
-               'home' => 'ホーム',
-               'download' => 'ダウンロード',
-               'packages' => 'パッケージ',
-               'help' => 'ヘルプ',
-               'faq' => 'F.A.Q.',
-               'documentation' => '文書',
-               'mailing-lists' => 'メーリングリスト'
-       );
-} else  {
-       $section_names = array(
-               'home' => 'Home',
-               'download' => 'Download',
-               'packages' => 'Packages',
-               'help' => 'Help',
-               'faq' => 'F.A.Q.',
-               'documentation' => 'Documentation',
-               'mailing-lists' => 'Mailing Lists'
-       );
-}
+if (is_readable (dirname(__FILE__) . "/constants." . $lang_code . ".inc"))
+       include_once dirname(__FILE__) . "/constants." . $lang_code . ".inc";
+
+/* The Sections.  Used in Menu Navigation Bar */
+define (FINK_SECTION_HOME, 'Home');
+define (FINK_SECTION_DOWNLOAD, 'Download');
+define (FINK_SECTION_PACKAGE, 'Packages');
+define (FINK_SECTION_HELP, 'Help');
+define (FINK_SECTION_FAQ, 'F.A.Q.');
+define (FINK_SECTION_DOCUMENTATION, 'Documentation');
+define (FINK_SECTION_MAILING_LISTS, 'MAILING_LISTS');
+
+/* The Home Subsections.  Used in Menu Navigation Bar */
+define (FINK_SECTION_HOME_INDEX, 'Index');
+define (FINK_SECTION_HOME_NEWS, 'News');
+define (FINK_SECTION_HOME_ABOUT, 'About');
+define (FINK_SECTION_HOME_CONTRIBUTORS, 'Contributors');
+define (FINK_SECTION_HOME_LINKS, 'Links');
+
+/* The word 'Sections'.  Used in Menu Navigation Bar */
+define (FINK_SECTIONS, 'Sections');
+
+/* Contents as Table of Contents.  Used in FAQ/Documentation Sections */
+define (FINK_CONTENTS, 'Contents');
+
+$section_names = array(
+       'home' => FINK_SECTION_HOME,
+       'download' => FINK_SECTION_DOWNLOAD,
+       'packages' => FINK_SECTION_PACKAGE,
+       'help' => FINK_SECTION_HELP,
+       'faq' => FINK_SECTION_FAQ,
+       'documentation' => FINK_SECTION_DOCUMENTATION,
+       'mailing-lists' => FINK_SECTION_MAILING_LISTS
+);
 
 $section_files = array(
        'home' => 'index.php',
@@ -44,11 +56,11 @@
 // main navigation box
 if (!is_array($navbox) && $nonav != 1) {
        $navbox = array(
-               "index.php", "Home",
-               "news/index.php", "News",
-               "about.php", "About",
-               "people.php", "Contributors",
-               "links.php", "Links"
+               'index.php', FINK_SECTION_HOME_INDEX,
+               'news/index.php', FINK_SECTION_HOME_NEWS,
+               'about.php', FINK_SECTION_HOME_ABOUT,
+               'people.php', FINK_SECTION_HOME_CONTRIBUTORS,
+               'links.php', FINK_SECTION_HOME_LINKS
 );
 }
 
@@ -161,7 +173,7 @@
        if ('test/index.php' == $filename && $active_page == -1) $active_page = 0; 
        
        for ($i = 0; $i < sizeof($navbox); $i += 2) {
-               echo "\t<tr>\n";
+               if ('Contents' == $navbox[$i + 1]) $navbox[$i + 1] = FINK_CONTENTS;
                if ($i != $active_page) {
                        // For testing locally at my machine
                        if (substr($navbox[$i ], 0, 7) != 'http://') {
@@ -169,19 +181,12 @@
                        } else {
                                $_link = $navbox[$i ];
                        }
-                       
                        if (substr($link, -2) == ".*") $link = substr($link, 0, -2);
-                       
-                       echo "\t\t<td class=\"toc_subsections\">\n";
-                       echo "\t\t\t<a href=\"" . $_link . '" >' . $navbox[$i + 1] . 
"</a>\n";
+                       echo "\t\t<dd class=\"toc_subsections\"><a href=\"" . $_link . 
'" >' . $navbox[$i + 1] . "</a></dd>\n";
                } else {
-                       echo "\t\t<td class=\"toc_subsections_selected\">\n";
-                       echo "\t\t\t" . $navbox[$i + 1] . "\n";
+                       echo "\t\t<dd class=\"toc_subsections_selected\">" . 
$navbox[$i + 1] . "</dd>\n";
                }
-               echo "\t\t</td>\n";
-               echo "\t</tr>\n";
        }
-       echo "\t\t<tr><td>$filename</td></tr>\n";
 }
 ?>
 
@@ -227,21 +232,15 @@
                <td align="left" width="120" class="layout"  bgcolor="#eeeeee" >
 
 <? /* navigation column table */ ?>
-       <table width="120" cellspacing="0" >
 
 <? /* sections */ ?>
-       <tr>
-               <td align="center" class="toc_top" style="background-image:url(<? echo 
$root; ?>img/stripes.gif)">Sections</td></tr>
-<? foreach ($section_files as $key => $filename) {
+       <dd class="toc_top" style="text-align: center; background-image:url(<? echo 
$root; ?>img/stripes.gif)"><? echo FINK_SECTIONS; ?></dd>
        
+<? foreach ($section_files as $key => $filename) {
        $toc_sections_class = 'toc_sections';
        if ($section == $key && $nonav == 1) $toc_sections_class = 
'toc_sections_selected';
 ?>
-       <tr>
-               <td class="<? echo  $toc_sections_class ?>">
-                       <a href="<? echo $root . $section_files[$key] ?>" ><? echo 
$section_names[$key] ?></a>
-               </td>
-       </tr>
+               <dd class="<? echo  $toc_sections_class ?>"><a href="<? echo $root . 
$section_files[$key] ?>" ><? echo $section_names[$key] ?></a></dd>
 <?
        if ($section == $key && $nonav != 1) insert_sub ($navbox, $active_page);
        } 
@@ -249,19 +248,13 @@
 
 <? /* link to print version */ ?>
 <? if ($printlink) { ?>
-       <tr>
-               <td class="toc_top">&nbsp;</td>
-       </tr>
-       <tr>
-               <td class="toc_top">
+               <dd class="toc_top">&nbsp;</dd>
+               <dd class="toc_top">
                        <a href="<? echo $root . $printlink ?>">
                        <img src="<? echo $root ?>img/printlink.gif" width="120" 
height="22" border="0" alt="Print Version">
                        </a>
-               </td>
-       </tr>
+               </dd>
 <? } ?>
-
-</table>
 <? /* end navigation column */ ?>
 
 </td>

Index: fink.css
===================================================================
RCS file: /cvsroot/fink/web/fink.css,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- fink.css    28 Feb 2004 18:25:19 -0000      1.17
+++ fink.css    29 Feb 2004 23:12:55 -0000      1.18
@@ -40,6 +40,11 @@
 
 .attention { color:red; }
 
+dd a {
+  text-decoration: none;
+  display: block;
+}
+
 .toc_top {
        font-family: Verdana,Helvetica,Arial,sans-serif ;  
        font-size: 9pt ;



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Fink-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to