Commit: 818cfd1b0e64d487e4592c132ce91a6a912eb45e Author: Arnaud Lemercier <[email protected]> Sat, 22 Jul 2017 02:24:57 +0200 Parents: 079606e237bb93f79b01ad33662526db791ad4e4 Branches: master
Link: http://git.php.net/?p=web/news.git;a=commitdiff;h=818cfd1b0e64d487e4592c132ce91a6a912eb45e Log: Some adaptation for W3C validation Changed paths: M article.php M group.php M index.php M style.css Diff: diff --git a/article.php b/article.php index d0c056c..1bd36e6 100644 --- a/article.php +++ b/article.php @@ -147,7 +147,7 @@ function start_article($mail, $refsResolved) { echo '<h1>'.format_subject($mail['headers']['subject'], 'utf-8')."</h1>\n"; echo " <blockquote>\n"; - echo ' <table class="standard" border="0" cellpadding="2" cellspacing="2" width="100%">' . "\n"; + echo ' <table class="standard" border="0" cellpadding="2" cellspacing="2">' . "\n"; # from echo ' <tr class="vcard">' . "\n"; echo ' <td class="headerlabel">From:</td>' . "\n"; @@ -194,7 +194,7 @@ function navbar($group, $current) { $group = htmlspecialchars($group, ENT_QUOTES, "UTF-8"); - echo ' <table class="standard" border="0" cellpadding="2" cellspacing="2" width="100%">' . "\n"; + echo ' <table class="standard" border="0" cellpadding="2" cellspacing="2">' . "\n"; echo ' <tr>' . "\n"; echo ' <th class="nav">'; @@ -205,8 +205,8 @@ function navbar($group, $current) { } echo ' </th>' . "\n"; - echo ' <th align="center">' . "$group (#$current)</th>\n"; - echo ' <th align="right" class="nav">'; + echo ' <th class="align-center">' . "$group (#$current)</th>\n"; + echo ' <th class="nav align-right">'; echo ' <a href="/' , $group , '/' , ($current+1) , '"><b>next »</b></a>'; echo ' </th>' . "\n"; echo ' </tr>' . "\n"; diff --git a/group.php b/group.php index b02f9fb..ee482d1 100644 --- a/group.php +++ b/group.php @@ -66,9 +66,9 @@ echo '</nav>'; echo '<section class="content">'; echo '<h1>'.htmlspecialchars($group, ENT_QUOTES, "UTF-8").'</h1>'; navbar($group, $overview['group']['low'], $overview['group']['high'], $overview['group']['start']); -echo ' <table class="standard" width="100%">' . "\n"; +echo ' <table class="standard">' . "\n"; echo ' <tr>' . "\n"; -echo ' <th>#</td>' . "\n"; +echo ' <th>#</th>' . "\n"; echo ' <th>subject</th>' . "\n"; echo ' <th>author</th>' . "\n"; echo ' <th>date</th>' . "\n"; @@ -110,8 +110,8 @@ foreach ($overview['articles'] as $articleNumber => $details) { echo format_subject($details['subject'], $charset); echo "</a></td>\n"; echo " <td vcard\">".format_author($details['author'], $charset)."</td>\n"; - echo " <td align=\"center\"><tt>" . format_date($details['date']) . "</tt></td>\n"; - echo " <td align=\"right\">{$details['lines']}</td>\n"; + echo " <td class=\"align-center\"><tt>" . format_date($details['date']) . "</tt></td>\n"; + echo " <td class=\"align-right\">{$details['lines']}</td>\n"; echo " </tr>\n"; } } @@ -132,7 +132,7 @@ switch ($format) { } function navbar($g, $f, $l, $i) { - echo ' <table class="standard" border="0" cellpadding="2" cellspacing="2" width="100%">' . "\n"; + echo ' <table class="standard" border="0" cellpadding="2" cellspacing="2">' . "\n"; echo ' <tr>' . "\n"; echo ' <th class="nav">'; if ($i > $f) { @@ -144,8 +144,8 @@ function navbar($g, $f, $l, $i) { echo '</th>' . "\n"; $j = min($i + 20, $l); $c = $l - $f + 1; - echo ' <th align="center">'.htmlspecialchars($g, ENT_QUOTES, "UTF-8")." ($i-$j of $c)</th>\n"; - echo ' <th align="right" class="nav">'; + echo ' <th class="align-center">'.htmlspecialchars($g, ENT_QUOTES, "UTF-8")." ($i-$j of $c)</th>\n"; + echo ' <th class="nav align-right">'; if ($i+20 <= $l) { $n = min($i + 20, $l - 19); echo "<a href=\"/" . htmlspecialchars($g, ENT_QUOTES, "UTF-8") . "/start/$n\"><b>next »</b></a>"; diff --git a/index.php b/index.php index 7606b4e..396b745 100644 --- a/index.php +++ b/index.php @@ -36,7 +36,7 @@ head(); href="http://trainedmonkey.com/colobus/">colobus</a>. </p> </div> - <table class="standard" width="100%"> + <table class="standard"> <tr> <th>name</th> <th>messages</th> @@ -47,7 +47,7 @@ head(); foreach ($groups as $group => $details) { echo " <tr>\n"; echo " <td><a class=\"active{$details['status']}\" href=\"/$group\">$group</a></td>\n"; - echo " <td align=\"right\">", $details['high']-$details['low']+1, "</td>\n"; + echo " <td class=\"align-right\">", $details['high']-$details['low']+1, "</td>\n"; echo " <td>"; if ($details['status'] != 'n') { echo "<a href=\"group.php?group=$group&format=rss\">rss</a>"; diff --git a/style.css b/style.css index 4457715..a3421e8 100644 --- a/style.css +++ b/style.css @@ -352,6 +352,13 @@ table.standard th.subr { text-align: right; } +.align-right{ + text-align: right; +} +.align-center{ + text-align: center; +} + .menu-icon { display: none; background: #4F5B93; -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
