cvs: phpweb / style.css /include shared-manual.inc /styles mirror.css phpnet.css

From: Date: Sat, 13 Sep 2003 12:26:46 +0000
Subject: cvs: phpweb / style.css /include shared-manual.inc /styles mirror.css phpnet.css
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-21004@lists.php.net to get a copy of this message
goba Sat Sep 13 08:26:46 2003 EDT Modified files: /phpweb style.css /phpweb/styles mirror.css phpnet.css /phpweb/include shared-manual.inc Log: Use a list instead of styled div for the manual TOC layout, because - this is semantically correct - this uses *much* less markup - looks better in downlevel browsers (eg. NN4) Also make the TOC link list appear in the normal font size of the sidebar (which is a bit bigger then what is currently used, and easier to read). It is still reasonably small IMHO. Index: phpweb/style.css diff -u phpweb/style.css:1.58 phpweb/style.css:1.59 --- phpweb/style.css:1.58 Fri Sep 12 12:30:17 2003 +++ phpweb/style.css Sat Sep 13 08:26:44 2003 @@ -47,41 +47,6 @@ height: 1px; } -/* Left sidebar TOC on manual pages */ -div.mtoc { - margin: 0px 5px 5px 5px; -} - -/* Header in manual sidebar TOC */ -div.toch { - font-size: 115%; - padding-top: 5px; - padding-bottom: 5px; - border-bottom: 1px solid #cccccc; - margin-bottom: 5px; -} - -/* Inactive and active TOC elements in the left - sidebar of the manual pages - this is further - enhanced with an image in a mirror specific - CSS rule */ -div.toci, div.toca { - padding: 0 0 0 11px; - margin: 1px 0 0 3px; - background-repeat: no-repeat; - background-position: center left; -} -div.toca a { - font-weight: bold; -} -div.toca a, div.toci a { - text-decoration: none; - font-size: 75%; -} -div.toca a:hover, div.toci a:hover { - text-decoration: underline; -} - /* Default font size for elements */ body, ul, td, th { font-size: 85%; @@ -331,4 +296,32 @@ color: inherit; padding: 2px; margin-top: 4px; +} + +/* Left sidebar TOC on manual pages */ +ul#manualtoc { + margin: 0px 5px 5px 5px; + padding: 0px; +} +ul#manualtoc li { + margin: 1px 0 1px 1px; + padding: 1px 0 1px 11px; + list-style-type: none; + background-repeat: no-repeat; + background-position: center left; +} +ul#manualtoc li.header { + font-size: 135%; + padding: 5px 0px 5px 11px; + border-bottom: 1px solid #cccccc; + margin-bottom: 5px; +} +ul#manualtoc li.active { + font-weight: bold; +} +ul#manualtoc li a { + text-decoration: none; +} +ul#manualtoc li a:hover { + text-decoration: underline; } Index: phpweb/styles/mirror.css diff -u phpweb/styles/mirror.css:1.1 phpweb/styles/mirror.css:1.2 --- phpweb/styles/mirror.css:1.1 Sun Aug 24 07:45:53 2003 +++ phpweb/styles/mirror.css Sat Sep 13 08:26:45 2003 @@ -1,12 +1,18 @@ /* TOC elements on manual pages ------------------------------------------- */ -div.toci { +ul#manualtoc li { background-image: url(/images/box-0.gif); } -div.toca { +ul#manualtoc li.up { + background-image: url(/images/caret-u.gif); +} +ul#manualtoc li.home { + background-image: url(/images/caret-t.gif); +} +ul#manualtoc li.active { background-image: url(/images/box-1.gif); } /* Left sidebar background ------------------------------------------------ */ #layout_2, #layout_3 { background-image: url(/images/leftbar.png); -} \ No newline at end of file +} Index: phpweb/styles/phpnet.css diff -u phpweb/styles/phpnet.css:1.1 phpweb/styles/phpnet.css:1.2 --- phpweb/styles/phpnet.css:1.1 Sun Aug 24 07:45:53 2003 +++ phpweb/styles/phpnet.css Sat Sep 13 08:26:45 2003 @@ -1,12 +1,18 @@ /* TOC elements on manual pages ------------------------------------------- */ -div.toci { +ul#manualtoc li { background-image: url(http://static.php.net/www.php.net/images/box-0.gif); } -div.toca { +ul#manualtoc li.up { + background-image: url(http://static.php.net/www.php.net/images/caret-u.gif); +} +ul#manualtoc li.home { + background-image: url(http://static.php.net/www.php.net/images/caret-t.gif); +} +ul#manualtoc li.active { background-image: url(http://static.php.net/www.php.net/images/box-1.gif); } /* Left sidebar background ------------------------------------------------ */ #layout_2, #layout_3 { background-image: url(http://static.php.net/www.php.net/images/leftbar.png); -} \ No newline at end of file +} Index: phpweb/include/shared-manual.inc diff -u phpweb/include/shared-manual.inc:1.210 phpweb/include/shared-manual.inc:1.211 --- phpweb/include/shared-manual.inc:1.210 Sat Aug 23 04:52:41 2003 +++ phpweb/include/shared-manual.inc Sat Sep 13 08:26:46 2003 @@ -1,6 +1,6 @@ <?php // -*- C++ -*- -// $Id: shared-manual.inc,v 1.210 2003/08/23 08:52:41 goba Exp $ +// $Id: shared-manual.inc,v 1.211 2003/09/13 12:26:46 goba Exp $ /* @@ -107,18 +107,16 @@ global $PGI, $SIDEBAR_DATA; // Start sidebar with its <div> - $BAR = "<!--UdmComment-->\n<div class=\"mtoc\">\n"; + $BAR = "<!--UdmComment-->\n<ul id=\"manualtoc\">\n"; // Link to manual home - $BAR .= '<div class="toch">' . - make_link($PGI['home'][0], make_image('caret-t.gif', '^') . $PGI['home'][1]) . - "</div>\n"; + $BAR .= ' <li class="header home"><a href="' . $PGI['home'][0] . '">' . + $PGI['home'][1] . "</a></li>\n"; // Link to one page up if titles does not match if (($PGI['home'][1] !== $PGI['up'][1]) && $PGI['up'][1]) { - $BAR .= '<div class="toch">' . - make_link($PGI['up'][0], make_image('caret-u.gif', '&lt;') . $PGI['up'][1]) . - "</div>\n"; + $BAR .= ' <li class="header up"><a href="' . $PGI['up'][0] . '">' . + $PGI['up'][1] . "</a></li>\n"; } // Print out one link for all siblings of this page @@ -128,7 +126,7 @@ list($url, $title) = $tocitem; // Get the proper classname to use for this <div> - $divclass = ($url == $PGI['this'][0]) ? "toca" : "toci"; + $liclass = ($url == $PGI['this'][0]) ? ' class="active"' : ""; // There are some very long function names, which // make the TOC be too wide, so wrap them @@ -140,12 +138,12 @@ } // Print out the TOC item using a <div> - $BAR .= "<div class=\"$divclass\">" . - make_link($url, $title) . "</div>\n"; + $BAR .= " <li{$liclass}>" . + make_link($url, $title) . "</li>\n"; } // Put navigation content into sidebar, end <div> - $SIDEBAR_DATA = "$BAR</div><!--/UdmComment-->\n"; + $SIDEBAR_DATA = "$BAR</ul><!--/UdmComment-->\n"; } // Print out manual navigation bar

« previous php.mirrors (#21004) next »