diff options
Diffstat (limited to 'src/main/scala')
-rw-r--r-- | src/main/scala/reading/Main.scala | 13 | ||||
-rw-r--r-- | src/main/scala/reading/component/index/style/Books.scala | 2 | ||||
-rw-r--r-- | src/main/scala/reading/component/index/style/Menu.scala | 5 | ||||
-rw-r--r-- | src/main/scala/reading/component/style/Global.scala | 36 | ||||
-rw-r--r-- | src/main/scala/reading/models/Books.scala | 2 |
5 files changed, 9 insertions, 49 deletions
diff --git a/src/main/scala/reading/Main.scala b/src/main/scala/reading/Main.scala index b97abd2..66e9ce1 100644 --- a/src/main/scala/reading/Main.scala +++ b/src/main/scala/reading/Main.scala @@ -1,26 +1,21 @@ package reading -import scala.scalajs.js.JSApp +import org.scalajs.dom import rx._ import rx.Ctx.Owner.Unsafe._ -import org.scalajs.dom -import scalacss.Defaults._ +import scala.scalajs.js.JSApp -import reading.component.style.{ Global => GlobalStyle } import reading.utils.RxUtils._ object Main extends JSApp { def main(): Unit = { - val style = dom.document.createElement("style") - style.appendChild(dom.document.createTextNode(GlobalStyle.render)) - dom.document.head.appendChild(style) - - val _ = dom.document.body.appendChild { + dom.document.body.appendChild { Rx { Route.current() match { case Route.Books(filters, detail) => component.Index(filters, detail) } }.render } + () } } diff --git a/src/main/scala/reading/component/index/style/Books.scala b/src/main/scala/reading/component/index/style/Books.scala index 808b937..0a0dd3e 100644 --- a/src/main/scala/reading/component/index/style/Books.scala +++ b/src/main/scala/reading/component/index/style/Books.scala @@ -21,7 +21,7 @@ object Books extends StyleSheet.Inline { ) val listParent = style( - overflowY.scroll, + overflowY.auto, paddingTop(15.px) ) diff --git a/src/main/scala/reading/component/index/style/Menu.scala b/src/main/scala/reading/component/index/style/Menu.scala index d824a1a..3fac8df 100644 --- a/src/main/scala/reading/component/index/style/Menu.scala +++ b/src/main/scala/reading/component/index/style/Menu.scala @@ -10,14 +10,15 @@ object Menu extends StyleSheet.Inline { val menu = style( height(100.%%), - zIndex(1), Media.desktop( backgroundColor(C.englishWalnut.value), color(C.white.value), position.relative, - width(280.px) + width(280.px), + boxShadow := "4px 0px 6px -1px rgba(0, 0, 0, 0.2)" ), Media.mobile( + zIndex(1), backgroundColor(C.white.value), color(C.black.value), position.fixed, diff --git a/src/main/scala/reading/component/style/Global.scala b/src/main/scala/reading/component/style/Global.scala deleted file mode 100644 index 9551424..0000000 --- a/src/main/scala/reading/component/style/Global.scala +++ /dev/null @@ -1,36 +0,0 @@ -package reading.component.style - -import scalacss.Defaults._ - -import reading.component.style.{ Color => C } - -object Global extends StyleSheet.Standalone { - import dsl._ - - "html" - ( - boxSizing.borderBox - ) - - "body" - ( - position.absolute, - width(100.%%), - height(100.%%) - ) - - "a" - ( - color(inherit) - ) - - "*, *:before, *:after" - ( - boxSizing.inherit - ) - - "button" - ( - cursor.pointer, - display.flex, - backgroundColor(initial), - color(C.black.value), - border.none, - fontSize.inherit - ) -} diff --git a/src/main/scala/reading/models/Books.scala b/src/main/scala/reading/models/Books.scala index 0f5043d..ae8a074 100644 --- a/src/main/scala/reading/models/Books.scala +++ b/src/main/scala/reading/models/Books.scala @@ -926,7 +926,7 @@ object Books { genres = Seq(Fantasy), themes = Seq(Aventure, Combat), programs = Seq(), - level = Moyen, + level = Difficile, summary = Some(""" """) ), |