diff options
author | Joris | 2017-01-17 13:52:46 +0100 |
---|---|---|
committer | Joris | 2017-01-17 13:52:46 +0100 |
commit | 3877c76175007ddf0659abd63f30c7d163650174 (patch) | |
tree | 6fe602ae8adcb22d2795cb3cb7e55b3dd4d04360 /src/main/scala | |
parent | 36fc53409c9119ac94788d8296d6b171eb0a6500 (diff) |
Show book count
Diffstat (limited to 'src/main/scala')
-rw-r--r-- | src/main/scala/reading/component/index/Books.scala | 7 | ||||
-rw-r--r-- | src/main/scala/reading/component/index/style/Books.scala | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/main/scala/reading/component/index/Books.scala b/src/main/scala/reading/component/index/Books.scala index 3faa130..4e42823 100644 --- a/src/main/scala/reading/component/index/Books.scala +++ b/src/main/scala/reading/component/index/Books.scala @@ -14,11 +14,14 @@ object Books { def apply(books: Rx[Seq[Book]]): Frag = div( BooksStyle.render, - BooksStyle.books, RxTag { implicit context => div( - BooksStyle.books, + div( + BooksStyle.count, + s"${books().length} livres" + ), + books().sorted.map { book => div( BooksStyle.book, diff --git a/src/main/scala/reading/component/index/style/Books.scala b/src/main/scala/reading/component/index/style/Books.scala index ad7375d..9e118d8 100644 --- a/src/main/scala/reading/component/index/style/Books.scala +++ b/src/main/scala/reading/component/index/style/Books.scala @@ -7,7 +7,8 @@ import reading.component.style.Col object Books extends StyleSheet.Inline { import dsl._ - val books = style( + val count = style( + marginBottom(30.px) ) val book = style( |