Enlightenment CVS committal Author : mekius Project : web Module : www
Dir : web/www Modified Files: p.php style.css Log Message: 1. Should use echo over print unless you need to the return status of print. - Small issue, but small things can add up. 2. include_once incurs extra overhead of checking existing includes. - It is not necessary for us since we only include the files once. Again small things can add up. 3. Anything between style or script tags should be HTML commented. 4. align is not a valid css property. 5. // is not a valid CSS commenting style, must use /* */. 6. Other misc cleanups/fixes, see diff. 7. Finally, lets do our part to be XHTML 1.1 :), not too hard. =================================================================== RCS file: /cvs/e/web/www/p.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- p.php 31 Mar 2007 03:26:27 -0000 1.4 +++ p.php 12 Apr 2007 00:06:52 -0000 1.5 @@ -1,59 +1,63 @@ -<?php include_once 'site/site.php'; ?> -<!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<?php include 'site/site.php'; ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd"> <html> <head> -<title><?php print($title); ?></title> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> -<link rel="stylesheet" type="text/css" href="style.css"> -<link rel="icon" href="favicon.ico" type="image/x-icon"> -<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> -<link rel="icon" href="favicon.ico" type="image/ico"> -<link rel="shortcut icon" href="favicon.ico" type="image/ico"> -<style type="text/css">img {behavior: url("png.htc");} </style> +<title><?php echo $title; ?></title> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> +<link rel="stylesheet" type="text/css" href="style.css"/> +<link rel="icon" href="favicon.ico" type="image/x-icon"/> +<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/> +<link rel="icon" href="favicon.ico" type="image/ico"/> +<link rel="shortcut icon" href="favicon.ico" type="image/ico"/> +<style type="text/css"><!--img {behavior: url("png.htc");}--></style> <script src="bgsleight.js" type="text/javascript"></script> </head> <body> -<table width=100% border=0 cellpadding=0 cellspacing=0><tr> -<td class="t" width=50% valign=top align=left> - <table width=100px height=100px border=0 cellpadding=0 cellspacing=0> - <?php - print(nav_button("main1", "lnav")); - print(nav_button("main2", "lnav")); - print(nav_button("main3", "lnav")); - print(nav_button("main4", "lnav")); - ?> - </table> -<img src="i/_.gif" width=1 height=8><br> -<img src="i/_.gif" width=4 height=4> - <?php show_langs("p/lang1"); ?> -</td> -<td class="tl" width=600 height=250> - <img src="i/_.gif" width=600 height=1><br> - <?php nav_subs(); ?> -</td> -<td class="t" width=50% valign=top align=right> - <table width=100px height=100px border=0 cellpadding=0 cellspacing=0> - <?php - print(nav_button("main5", "rnav")); - print(nav_button("main6", "rnav")); - print(nav_button("main7", "rnav")); - print(nav_button("main8", "rnav")); - ?> - </table> -<img src="i/_.gif" width=1 height=8><br> - <?php show_langs("p/lang2"); ?> -<img src="i/_.gif" width=4 height=4> -</td> -</tr></table> +<table class='h'> + <tr> + <td class="t"> + <table class='n nl' cellpadding='0' cellspacing='0'> + <?php + echo(nav_button("main1", "lnav")); + echo(nav_button("main2", "lnav")); + echo(nav_button("main3", "lnav")); + echo(nav_button("main4", "lnav")); + ?> + </table> + <img src="i/_.gif" style='width:1px; height:8px;' alt=' '/><br/> + <img src="i/_.gif" style='width:4px; height:4px;' alt=' '/> + <div class='l ll'> + <?php show_langs("p/lang1"); ?> + </div> + </td> + <td class="tl"> + <img src="i/_.gif" style='width:600px; height:5px;' alt=' '/><br/> + <?php nav_subs(); ?> + </td> + <td class="t"> + <table class='n nr' cellpadding='0' cellspacing='0'> + <?php + echo(nav_button("main5", "rnav")); + echo(nav_button("main6", "rnav")); + echo(nav_button("main7", "rnav")); + echo(nav_button("main8", "rnav")); + ?> + </table> + <img src="i/_.gif" style='width:1px; height:8px;' alt=' '/><br/> + <div class='l lr'> + <?php show_langs("p/lang2"); ?> + </div> + <img src="i/_.gif" style='width:4px; height:4px;' alt=' '/> + </td> + </tr> +</table> -<center> <div class="main"> -<?php include_once "p/$page/$lang-body" ?> +<?php include "p/$page/$lang-body" ?> </div> -</center> -<hr> +<hr/> <p class="tiny">Copyright © Enlightenment.org</p> </body> </html> =================================================================== RCS file: /cvs/e/web/www/style.css,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- style.css 31 Mar 2007 03:26:27 -0000 1.5 +++ style.css 12 Apr 2007 00:06:52 -0000 1.6 @@ -4,21 +4,29 @@ background-position : top left; background-color : #f4f4f4; text-align : center; - padding-top : 0px; - padding-bottom : 0px; - padding-left : 0px; - padding-right : 0px; - margin : 0px; + padding: : 0; + margin : 0; } -//td.t { filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale src='i/t.png'); } -td.t { background-image:url("i/t.gif"); } +/*td.t { filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale src='i/t.png'); }*/ +td.t { + background-image:url("i/t.gif"); + width:50%; + vertical-align:top; + padding:0; + margin:0; +} td.t[class] { background-image:url("i/t.png"); } -//td.tl { filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale src='i/tl.png'); } -td.tl { background-image:url("i/tl.gif"); } +/*td.tl { filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale src='i/tl.png'); }*/ +td.tl { + background-image:url("i/tl.gif"); + width:600px; + height:250px; + padding:0; + margin:0; +} td.tl[class] { background-image:url("i/tl.png"); } td.tl { - align : middle; text-align : center; vertical-align : bottom; width : 600px; @@ -54,7 +62,7 @@ hr { width : 200px; height : 1px; - background : #eeeeee; + background-color : #eeeeee; border : 0px; } @@ -136,7 +144,6 @@ } td.lnav { - align : middle; text-align : center; vertical-align : middle; width : 100px; @@ -147,12 +154,11 @@ font-weight : bold; white-space : no-wrap; } -//td.lnav { filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale src='i/n.png'); } +/*td.lnav { filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale src='i/n.png'); }*/ td.lnav { background-image:url("i/n.gif"); } td.lnav[class] { background-image:url("i/n.png"); } td.rnav { - align : middle; text-align : center; vertical-align : middle; width : 100px; @@ -163,7 +169,7 @@ font-weight : bold; white-space : no-wrap; } -//td.rnav { filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale src='i/n.png'); } +/*td.rnav { filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale src='i/n.png'); }*/ td.rnav { background-image:url("i/n.gif"); } td.rnav[class] { background-image:url("i/n.png"); } @@ -196,9 +202,9 @@ color : #222222; font-size : 9px; font-weight : bold; -// white-space : no-wrap; -// text-transform : none; -// list-style-type : none; +/* white-space : no-wrap; + text-transform : none; + list-style-type : none;*/ list-style : none; display : inline; } @@ -223,20 +229,46 @@ text-decoration : none; } +table.n { + width:100px; + height:100px; + clear:both; + border:0; + margin:0; + padding:0; + border-collapse:collapse; +} +table.nl { + float:left; +} +table.nr { + float:right; +} +table.h { + width:100%; + padding:0; + margin:0; + border-collapse:collapse; +} +div.l { + clear:both; + padding:7px 8px; +} +div.ll { + float:left; +} +div.lr { + float:right; +} - - - - - -// OLD CSS STUFF TO STEAL FROM +/* OLD CSS STUFF TO STEAL FROM */ /* table.main { ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs