aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala
diff options
context:
space:
mode:
authorJoris2017-01-17 13:52:46 +0100
committerJoris2017-01-17 13:52:46 +0100
commit3877c76175007ddf0659abd63f30c7d163650174 (patch)
tree6fe602ae8adcb22d2795cb3cb7e55b3dd4d04360 /src/main/scala
parent36fc53409c9119ac94788d8296d6b171eb0a6500 (diff)
Show book count
Diffstat (limited to 'src/main/scala')
-rw-r--r--src/main/scala/reading/component/index/Books.scala7
-rw-r--r--src/main/scala/reading/component/index/style/Books.scala3
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(