aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/scala/reading/Books.scala8
-rw-r--r--src/main/scala/reading/component/index/style/Books.scala8
-rw-r--r--src/main/scala/reading/component/index/style/Header.scala6
-rw-r--r--src/main/scala/reading/component/style/Color.scala18
-rw-r--r--src/main/scala/reading/models/Compare.scala4
5 files changed, 23 insertions, 21 deletions
diff --git a/src/main/scala/reading/Books.scala b/src/main/scala/reading/Books.scala
index b86a008..0c40f79 100644
--- a/src/main/scala/reading/Books.scala
+++ b/src/main/scala/reading/Books.scala
@@ -1587,7 +1587,7 @@ object Books {
),
Book(
- title = "Une preuve d’amour",
+ title = "Une Preuve d’amour",
author = "Valentine GOBY",
year = "xxx",
period = Some(Contemporain),
@@ -1902,7 +1902,7 @@ object Books {
),
Book(
- title = "Tous les héros s'appellent Phénix",
+ title = "Tous les héros s’appellent Phénix",
author = "Nastasia RUGANI",
year = "2014",
period = Some(Contemporain),
@@ -1968,7 +1968,7 @@ object Books {
),
Book(
- title = "Oh, boy !",
+ title = "Oh, boy !",
author = "Marie-Aude MURAIL",
year = "2000",
period = Some(Contemporain),
@@ -2080,7 +2080,7 @@ object Books {
),
Book(
- title = "Les Mondes de l'Alliance",
+ title = "Les Mondes de l’Alliance",
author = "David MOITET",
year = "2014-2015",
parts = 3,
diff --git a/src/main/scala/reading/component/index/style/Books.scala b/src/main/scala/reading/component/index/style/Books.scala
index f5deb53..ca52328 100644
--- a/src/main/scala/reading/component/index/style/Books.scala
+++ b/src/main/scala/reading/component/index/style/Books.scala
@@ -4,6 +4,8 @@ import scalacss.Defaults._
import reading.Media
+import reading.component.style.{ Color => C }
+
object Books extends StyleSheet.Inline {
import dsl._
@@ -21,6 +23,9 @@ object Books extends StyleSheet.Inline {
)
val cover = style(
+ display.inlineBlock,
+ backgroundColor(C.gray.lighten(90).value),
+ cursor.pointer,
Media.desktop(
height(250.px),
maxWidth(200.px)
@@ -28,7 +33,6 @@ object Books extends StyleSheet.Inline {
Media.mobile(
height(150.px),
maxWidth(120.px)
- ),
- cursor.pointer
+ )
)
}
diff --git a/src/main/scala/reading/component/index/style/Header.scala b/src/main/scala/reading/component/index/style/Header.scala
index c29bd56..d2149a7 100644
--- a/src/main/scala/reading/component/index/style/Header.scala
+++ b/src/main/scala/reading/component/index/style/Header.scala
@@ -38,7 +38,7 @@ object Header extends StyleSheet.Inline {
padding(15.px),
marginRight(20.px),
borderRadius(2.px),
- border(1.px, solid, C.gray.lighten(80).value),
+ border(1.px, solid, C.gray.lighten(60).value),
fontSize(18.px),
&.hover(cursor.pointer)
)
@@ -47,12 +47,12 @@ object Header extends StyleSheet.Inline {
box,
backgroundColor(C.mickado.value),
color(C.white.value),
- &.hover(backgroundColor(C.mickado.lighten(20).value))
+ &.hover(backgroundColor(C.mickado.lighten(30).value))
)
val filter = style(
box,
- &.hover(borderColor(C.gray.lighten(50).value))
+ &.hover(borderColor(C.gray.lighten(80).value))
)
val name = style(
diff --git a/src/main/scala/reading/component/style/Color.scala b/src/main/scala/reading/component/style/Color.scala
index 1f44eb5..ed2041f 100644
--- a/src/main/scala/reading/component/style/Color.scala
+++ b/src/main/scala/reading/component/style/Color.scala
@@ -7,19 +7,14 @@ import scalacss.internal.{ ValueT, Color => ScalaCssColor }
case class Color(red: Int, green: Int, blue: Int, alpha: Double = 1.0) {
val value: ValueT[ValueT.Color] = ScalaCssColor.rgba(red, green, blue, alpha)
- def lighten(n: Int): Color =
- Color(
- red = Color.bound(red + n),
- green = Color.bound(green + n),
- blue = Color.bound(blue + n),
- alpha = alpha
- )
+ def lighten(pct: Int): Color = ratio(1.0 + pct / 100.0)
+ def darken(pct: Int): Color = ratio(1.0 - pct / 100.0)
- def darken(n: Int): Color =
+ private def ratio(r: Double): Color =
Color(
- red = Color.bound(red - n),
- green = Color.bound(green - n),
- blue = Color.bound(blue - n),
+ red = Color.bound(red * r),
+ green = Color.bound(green * r),
+ blue = Color.bound(blue * r),
alpha = alpha
)
}
@@ -44,4 +39,5 @@ object Color {
)
def bound(n: Int): Int = Math.max(0, Math.min(255, n))
+ def bound(d: Double): Int = bound(d.toInt)
}
diff --git a/src/main/scala/reading/models/Compare.scala b/src/main/scala/reading/models/Compare.scala
index dd763fe..b59d2f2 100644
--- a/src/main/scala/reading/models/Compare.scala
+++ b/src/main/scala/reading/models/Compare.scala
@@ -11,7 +11,9 @@ object Compare {
.replaceAll("^à ", "")
.replaceAll("^au ", "")
.replaceAll("^aux ", "")
- .replaceAll("^années ", "")
+ .replaceAll("^ma ", "")
+ .replaceAll("^mon ", "")
+ .replaceAll("^mes ", "")
.replaceAll("é", "e")
.replaceAll("è", "e")
}