More css for tables.

This commit is contained in:
barnold 2022-09-27 10:33:01 +01:00
parent dd701b2265
commit 36637c9f79
4 changed files with 34 additions and 6 deletions

View File

@ -1,3 +1,31 @@
table {
border: 1px solid grey;
}
th {
text-align: left;
}
th, td {
padding: 2px 0.5em;
}
td.count, th.count {
text-align: right;
}
th.author-medium {
min-width: 20em;
}
th.author-wide {
min-width: 35em;
}
th.book-medium {
min-width: 25em;
}
th.book-wide {
min-width: 35em;
}

View File

@ -8,7 +8,7 @@ Books by <strong><%= $author->name %></strong>
<div>
<table>
<tr>
<th>Title</th>
<th class="book-wide">Title</th>
</tr>
% for my $book ($book_page->all) {
<tr>

View File

@ -17,13 +17,13 @@
<div>
<table>
<tr>
<th>Books</th>
<th>Authored by</th>
<th class="count">Books</th>
<th class="author-wide">Authored by</th>
</tr>
% for my $author ($author_page->all) {
<tr>
<td style="text-align:right"><%= $author->books->count %></td>
<td style="padding-left:1em">
<td class="count"><%= $author->books->count %></td>
<td>
<%= link_to($author->name => 'author' =>
{ id => $author->id, page_number => 1 }) %>
</td>

View File

@ -20,7 +20,7 @@ author like '[no author]'.
<div>
<table>
<tr>
<th>Title</th><th>Author</th>
<th class="book-medium">Title</th><th class="author-medium">Author</th>
</tr>
% for my $book ($book_page->all) {
<tr>