Wrap long lines in the "Recent Updates" sidebar

* Sync the sidebar layout with archweb, use the "pkg-name" class to wrap
  long package names.

* Move the "New!" logo to a separate column to make sure it isn't
  wrapped to a new line on its own.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2012-09-19 01:17:32 +02:00
parent 3b1dad229b
commit 7c004693f7
2 changed files with 11 additions and 3 deletions

View file

@ -2,3 +2,7 @@
#lang_sub { #lang_sub {
float: right; float: right;
} }
#pkg-updates td.pkg-new {
padding: 0 .5em;
}

View file

@ -3,10 +3,13 @@
<a href="<?php echo get_uri('/rss/') ?>" title="Arch Package Updates RSS Feed" class="rss-icon"><img src="/images/feed-icon-14x14.png" alt="RSS Feed" /></a> <a href="<?php echo get_uri('/rss/') ?>" title="Arch Package Updates RSS Feed" class="rss-icon"><img src="/images/feed-icon-14x14.png" alt="RSS Feed" /></a>
<table> <table>
<tbody>
<?php foreach ($newest_packages->getIterator() as $row): ?> <?php foreach ($newest_packages->getIterator() as $row): ?>
<tr> <tr>
<td> <td class="pkg-name">
<a href="<?php echo get_pkg_uri($row["Name"]); ?>"><?php print htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]); ?></a> <a href="<?php echo get_pkg_uri($row["Name"]); ?>"><?php print htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]); ?></a>
</td>
<td class="pkg-new">
<?php if ($row["ModifiedTS"] === $row["SubmittedTS"]): ?> <?php if ($row["ModifiedTS"] === $row["SubmittedTS"]): ?>
<img src="images/new.png" alt="New!" /> <img src="images/new.png" alt="New!" />
<?php endif; ?> <?php endif; ?>
@ -16,4 +19,5 @@
</td> </td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
</tbody>
</table> </table>