This commit is contained in:
parent
f802943316
commit
b11316abe5
@ -39,6 +39,9 @@ function renderTable(books, sortField) {
|
|||||||
var bookElement = document.getElementById("books");
|
var bookElement = document.getElementById("books");
|
||||||
bookElement.innerHTML = TableTemplate(books);
|
bookElement.innerHTML = TableTemplate(books);
|
||||||
|
|
||||||
|
var bookCount = document.getElementById("bookCount");
|
||||||
|
bookCount.innerHTML = `${books.length} books`;
|
||||||
|
|
||||||
// add listeners for selecting book to view
|
// add listeners for selecting book to view
|
||||||
Array.from(bookElement.querySelectorAll("tbody tr"))
|
Array.from(bookElement.querySelectorAll("tbody tr"))
|
||||||
.slice(1) // remove header from Array
|
.slice(1) // remove header from Array
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
>git</a
|
>git</a
|
||||||
>
|
>
|
||||||
<div id="searchBox">
|
<div id="searchBox">
|
||||||
|
<span id="bookCount" class="bookCount">_ books</span>
|
||||||
<input
|
<input
|
||||||
id="search"
|
id="search"
|
||||||
type="text"
|
type="text"
|
||||||
|
@ -147,6 +147,11 @@ body {
|
|||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#header .bookCount {
|
||||||
|
font-size: small;
|
||||||
|
color: #a29c77;
|
||||||
|
}
|
||||||
|
|
||||||
#searchBox {
|
#searchBox {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
|
Loading…
Reference in New Issue
Block a user