On 08/14/2010 04:28 PM, Loui Chang wrote:
Beats me. It's just a result of people doing whatever needs doing without caring too much where things go. Believe me it was a lot worse. Things have been cleaned up a lot in the last couple years.
Anyways if something in particular bothers you, try submitting a patch.
This is what I have now: <--------- snip ----------> diff --git a/web/html/css/arch.css b/web/html/css/arch.css index de871be..83a9450 100644 --- a/web/html/css/arch.css +++ b/web/html/css/arch.css @@ -53,8 +53,7 @@ body { font-size: 10pt; text-align: right; position: relative; - margin-bottom: 40px; - margin-right: 35px; + margin:0 35px 40px; } #lang_sub ul { list-style: none; @@ -290,7 +289,7 @@ blockquote.code { margin-bottom: 1%; background-color: #fff; border: 2px solid #ddd; - text-align: left; + /*text-align: left;*/ padding: 3px; } .frontpgboxbody { @@ -304,7 +303,7 @@ blockquote.code { border-top: 1px solid #fff; border-left: 1px solid #fff; background-color: #f1f2f4; - text-align: left; + /*text-align: left;*/ padding: 2px 10px 2px 10px; } .pgboxbody, @@ -367,3 +366,49 @@ blockquote.code { font-size: 18px; font-weight: bold; } + +/** + * Package search result tables + * The style known from the archlinux.org package search + * */ + +table.pkgSearchResults { +} +table.pkgSearchResults tr th { + border-bottom: #666 1px solid; + vertical-align: bottom; +} +table.pkgSearchResults tr { + background-color: #ddd; + vertical-align: top; + padding-left: .3em; +} +table.pkgSearchResults tr:nth-child(odd) { + background-color: #eee; +} +table.pkgSearchResults tr.outofdate td { + background-color: #faa; +} +#legend span.outofdate { + background-color: #faa; +} + +#pkgSearchResultsFooter { + overflow:auto; +} +#pkgSearchResultsFooter .legendAndFoo { + float:left; +} +#legend { + margin-bottom:3px; +} +#legend span { + margin:0 0; + border:none; +} +#pkgSearchResultsFooter .thatOtherBar { + float:right; +} + + + diff --git a/web/html/css/containers.css b/web/html/css/containers.css index fc092de..7350b04 100644 --- a/web/html/css/containers.css +++ b/web/html/css/containers.css @@ -136,23 +136,6 @@ td.formLeft { text-align: left; vertical-align: top; } -td.data1 { - background-color: #eee; - vertical-align: top; - padding-left: .3em; - text-align: left; -} -td.data2 { - background-color: #ddd; - vertical-align: top; - padding-left: .3em; - text-align: left; -} -.outofdate { - background-color: #faa; - padding-left: .3em; - text-align: left; -} #legend span { padding: 1px; margin-left: .3em; @@ -186,5 +169,6 @@ input.button { border: 1px solid #6c83b0; font-size: 12px; padding: 2px 8px; + min-width:80px; } diff --git a/web/template/header.php b/web/template/header.php index 8169df1..bd98cc6 100644 --- a/web/template/header.php +++ b/web/template/header.php @@ -7,6 +7,7 @@ <title>AUR (<?php print $LANG; ?>)<?php if ($title != "") { print " - " . $title; } ?></title> <link rel='stylesheet' type='text/css' href='css/fonts.css' /> <link rel='stylesheet' type='text/css' href='css/containers.css' /> + <link rel='stylesheet' type='text/css' href='css/languages.css' /> <link rel='stylesheet' type='text/css' href='css/arch.css' /> <link rel='stylesheet' type='text/css' href='css/archnavbar/archnavbar.css' /> <link rel='shortcut icon' href='images/favicon.ico' /> diff --git a/web/template/pkg_search_results.php b/web/template/pkg_search_results.php index bb898df..1b11b18 100644 --- a/web/template/pkg_search_results.php +++ b/web/template/pkg_search_results.php @@ -9,35 +9,35 @@ <span class='f3'><?php print __("Package Listing") ?></span> </div> -<table width='100%' cellspacing='0' cellpadding='2'> +<table class="pkgSearchResults" width='100%' cellspacing='0' cellpadding='2'> <tr> <?php if ($SID): ?> - <th style='border-bottom: #666 1px solid; vertical-align: bottom'> </th> + <th> </th> <?php endif; ?> - <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'> + <th><span class='f2'> <a href='?<?php print mkurl('SB=l&SO=' . $SO_next) ?>'><?php print __("Location") ?></a> </span></th> - <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'> + <th><span class='f2'> <a href='?<?php print mkurl('SB=c&SO=' . $SO_next) ?>'><?php print __("Category") ?></a> </span></th> - <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'> + <th><span class='f2'> <a href='?<?php print mkurl('SB=n&SO=' . $SO_next) ?>'><?php print __("Name") ?></a> </span></th> - <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'> + <th><span class='f2'> <a href='?<?php print mkurl('SB=v&SO=' . $SO_next) ?>'><?php print __("Votes") ?></a> </span></th> <?php if ($SID): ?> - <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'> + <th><span class='f2'> <a href='?<?php print mkurl('SB=w&SO=' . $SO_next) ?>'><?php print __("Voted") ?></a> </span></th> - <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'> + <th><span class='f2'> <a href='?<?php print mkurl('SB=o&SO=' . $SO_next) ?>'><?php print __("Notify") ?></a> </span></th> <?php endif; ?> - <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'><?php print __("Description") ?></span></th> - <th style='border-bottom: #666 1px solid; vertical-align: bottom'><span class='f2'> + <th><span class='f2'><?php print __("Description") ?></span></th> + <th><span class='f2'> <a href='?<?php print mkurl('SB=m&SO=' . $SO_next) ?>'><?php print __("Maintainer") ?></a> </span></th> </tr> @@ -45,34 +45,32 @@ <?php $atype = account_from_sid($_COOKIE['AURSID']); for ($i = 0; $row = mysql_fetch_assoc($result); $i++) { - (($i % 2) == 0) ? $c = "data1" : $c = "data2"; - if ($row["OutOfDate"]): $c = "outofdate"; endif; ?> -<tr> +<tr <?php if ($row["OutOfDate"]): print "class='outofdate'"; endif; ?>> <?php if ($SID): ?> - <td class='<?php print $c ?>'><input type='checkbox' name='IDs[<?php print $row["ID"] ?>]' value='1'></td> + <td><input type='checkbox' name='IDs[<?php print $row["ID"] ?>]' value='1'></td> <?php endif; ?> - <td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print $row["Location"] ?></span></span></td> - <td class='<?php print $c ?>'><span class='f5'><span class='blue'><?php print $row["Category"] ?></span></span></td> - <td class='<?php print $c ?>'><span class='f4'><a href='packages.php?ID=<?php print $row["ID"] ?>'><span class='black'><?php print $row["Name"] ?> <?php print $row["Version"] ?></span></a></span></td> - <td class='<?php print $c ?>' style="text-align: right"><span class='f5'><span class='blue'><?php print $row["NumVotes"] ?></span></span></td> + <td><span class='f5'><span class='blue'><?php print $row["Location"] ?></span></span></td> + <td><span class='f5'><span class='blue'><?php print $row["Category"] ?></span></span></td> + <td><span class='f4'><a href='packages.php?ID=<?php print $row["ID"] ?>'><span class='black'><?php print $row["Name"] ?> <?php print $row["Version"] ?></span></a></span></td> + <td style="text-align: right"><span class='f5'><span class='blue'><?php print $row["NumVotes"] ?></span></span></td> <?php if ($SID): ?> - <td class='<?php print $c ?>'><span class='f5'><span class='blue'> + <td><span class='f5'><span class='blue'> <?php if (isset($row["Voted"])): ?> <?php print __("Yes") ?></span></td> <?php else: ?> </span></td> <?php endif; ?> - <td class='<?php print $c ?>'><span class='f5'><span class='blue'> + <td><span class='f5'><span class='blue'> <?php if (isset($row["Notify"])): ?> <?php print __("Yes") ?></span></td> <?php else: ?> </span></td> <?php endif; ?> <?php endif; ?> - <td class='<?php print $c ?>'><span class='f4'><span class='blue'> + <td><span class='f4'><span class='blue'> <?php print htmlspecialchars($row['Description'], ENT_QUOTES); ?></span></span></td> - <td class='<?php print $c ?>'><span class='f5'><span class='blue'> + <td><span class='f5'><span class='blue'> <?php if (isset($row["Maintainer"])): ?> <a href='packages.php?K=<?php print $row['Maintainer'] ?>&SeB=m'><?php print $row['Maintainer'] ?></a> <?php else: ?> @@ -86,53 +84,52 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) { </div> -<div class="pgbox"> - <table width='100%'> - <tr> - <td align='left'> - <div id="legend"> - <span class='f3'><?php echo __('Legend') ?></span> - <span class="outofdate"><?php print __('Out of Date') ?></span> - </div> - <?php if ($SID): ?> - <div> - <select name='action'> - <option><?php print __("Actions") ?></option> - <option value='do_Flag'><?php print __("Flag Out-of-date") ?></option> - <option value='do_UnFlag'><?php print __("Unflag Out-of-date") ?></option> - <option value='do_Adopt'><?php print __("Adopt Packages") ?></option> - <option value='do_Disown'><?php print __("Disown Packages") ?></option> - <?php if ($atype == "Trusted User" || $atype == "Developer"): ?> - <option value='do_Delete'><?php print __("Delete Packages") ?></option> - <?php endif; ?> - <option value='do_Notify'><?php print __("Notify") ?></option> - <option value='do_UnNotify'><?php print __("UnNotify") ?></option> - </select> - <?php if ($atype == "Trusted User" || $atype == "Developer"): ?> - <input type='checkbox' name='confirm_Delete' value='1' /> <?php print __("Confirm") ?> - <?php endif; ?> - <input type='submit' class='button' style='width: 80px' value='<?php print __("Go") ?>' /> - </div> +<div id="pkgSearchResultsFooter" class="pgbox"> + <div class="legendAndFoo"> + <div id="legend"> + <span class='f3'><?php echo __('Legend') ?></span> + <span class="outofdate"><?php print __('Out of Date') ?></span> + </div> + <?php if ($SID): ?> + <div> + <select name='action'> + <option><?php print __("Actions") ?></option> + <option value='do_Flag'><?php print __("Flag Out-of-date") ?></option> + <option value='do_UnFlag'><?php print __("Unflag Out-of-date") ?></option> + <option value='do_Adopt'><?php print __("Adopt Packages") ?></option> + <option value='do_Disown'><?php print __("Disown Packages") ?></option> + <?php if ($atype == "Trusted User" || $atype == "Developer"): ?> + <option value='do_Delete'><?php print __("Delete Packages") ?></option> + <?php endif; ?> + <option value='do_Notify'><?php print __("Notify") ?></option> + <option value='do_UnNotify'><?php print __("UnNotify") ?></option> + </select> + <?php if ($atype == "Trusted User" || $atype == "Developer"): ?> + <input type='checkbox' name='confirm_Delete' value='1' /> <?php print __("Confirm") ?> + <?php endif; ?> + <input type='submit' class='button' value='<?php print __("Go") ?>' /> + </div> <?php endif; ?> - </td> - - <td align='right'> - <span class='f4'><span class='blue'> - <?php print __("Showing results %s - %s of %s", $first, $last, $total) ?> - </span></span> + </div> + <div class="thatOtherBar"> + <span class='f4'> + <span class='blue'> + <?php print __("Showing results %s - %s of %s", $first, $last, $total) ?> + </span> + </span> <br /> <div id="pages"> - <?php - if ($_GET['O'] > 0): - $O = $_GET['O'] - $_GET['PP']; - - if ($_GET['O'] < $_GET['PP']) { - $O = 0; - } - ?> + <?php + if ($_GET['O'] > 0): + $O = $_GET['O'] - $_GET['PP']; + + if ($_GET['O'] < $_GET['PP']) { + $O = 0; + } + ?> <a class="page_num" href="packages.php?<?php print mkurl("O=$O") ?>"><?php echo __('Previous') ?></a> - <?php endif; ?> + <?php endif; ?> <?php if ($_GET['PP'] > 0) { @@ -174,15 +171,11 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) { <?php endif; ?> </div> - - </td> - </tr> - <?php } } ?> - </table> +</div> </div> </form> <---------- snap ---------------> As AUR is a system mainly used by users of a bleeding-edge distro, I assumed everyone is using a browser supporting CSS 3. The search-results table looks pretty much like http://www.archlinux.org.il/packages/?q=foo now. I will now start to check the package-details page. -- irc: PyroPeter at freenode