summaryrefslogtreecommitdiff
path: root/Hero/App.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Hero/App.hs')
-rw-r--r--Hero/App.hs38
1 files changed, 19 insertions, 19 deletions
diff --git a/Hero/App.hs b/Hero/App.hs
index 6afcbd2..39cfa03 100644
--- a/Hero/App.hs
+++ b/Hero/App.hs
@@ -165,7 +165,7 @@ instance IsMediaObject Comic where
title =
"color" =: "red" <> "font-size" =: "1.6rem" <> uppercase
<> "line-height"
- =: "100%"
+ =: "100%"
<> Look.condensed
<> bold
subtitle = "color" =: "#fff" <> "font-size" =: "1.2rem" <> bold <> Look.condensed
@@ -211,14 +211,14 @@ instance Elemental Button where
if c `elem` lib -- in library
then
a_
- [class_ $ "wrs-button saved", onClick $ ToggleInLibrary c]
+ [class_ "wrs-button saved", onClick $ ToggleInLibrary c]
[ img_ [src_ $ ms $ Assets.icon <> "save.svg"],
span_ [] [text "saved"]
]
else-- not in library
a_
- [class_ $ "wrs-button", onClick $ ToggleInLibrary c]
+ [class_ "wrs-button", onClick $ ToggleInLibrary c]
[ img_ [src_ $ ms $ Assets.icon <> "save.svg"],
span_ [] [text "save"]
]
@@ -259,13 +259,13 @@ instance Elemental Button where
]
el (Read c) =
a_
- [class_ $ "wrs-button", onClick $ SelectExperience c]
+ [class_ "wrs-button", onClick $ SelectExperience c]
[ img_ [src_ $ ms $ Assets.icon <> "read.svg"],
span_ [] [text "read"]
]
el (Watch c) =
a_
- [class_ $ "wrs-button", onClick $ StartWatching c]
+ [class_ "wrs-button", onClick $ StartWatching c]
[ img_ [src_ $ ms $ Assets.icon <> "watch.svg"],
span_ [] [text "watch"]
]
@@ -284,7 +284,7 @@ data ComicReaderState
deriving (Show, Eq)
findComic :: ComicId -> [Comic] -> Maybe Comic
-findComic id ls = List.find (\c -> comicId c == id) ls
+findComic id = List.find . \c -> comicId c == id
-- | Main model for the app.
--
@@ -442,7 +442,7 @@ home :: Model -> View Action
home = login
discover :: Model -> View Action
-discover model@(Model {userLibrary = lib}) =
+discover model@Model {userLibrary = lib} =
template
"discover"
[ topbar,
@@ -454,7 +454,7 @@ discover model@(Model {userLibrary = lib}) =
Success (comic : rest) ->
[ feature comic lib,
shelf "Recent Releases" (comic : rest),
- maybeView (flip info lib) $ dMediaInfo model
+ maybeView (`info` lib) $ dMediaInfo model
],
appmenu,
discoverFooter
@@ -462,7 +462,7 @@ discover model@(Model {userLibrary = lib}) =
-- | If 'View' had a 'Monoid' instance, then '(text "")' could just be 'mempty'
maybeView :: (a -> View action) -> Maybe a -> View action
-maybeView f obj = maybe (text "") f obj
+maybeView = maybe (text "")
mediaInfo :: Maybe Comic -> Library -> View Action
mediaInfo Nothing _ = text ""
@@ -481,7 +481,7 @@ appmenu = aside_ [id_ "appmenu"] $ btn </ links
btn (lnk, img, label) =
a_
[ class_ "button",
- onPreventClick $ ChangeURI $ lnk
+ onPreventClick $ ChangeURI lnk
]
[ img_ [src_ $ ms $ Assets.icon <> img],
span_ [] [text label]
@@ -540,7 +540,7 @@ discoverFooter =
[img_ [src_ $ ms $ Assets.cdnEdge <> "/old-assets/images/icons/" <> x]]
comicCover :: ComicId -> Model -> View Action
-comicCover comicId_ model = comicPlayer comicId_ 1 model
+comicCover comicId_ = comicPlayer comicId_ 1
data ComicReaderView = Spread | Full
deriving (Show, Eq)
@@ -572,7 +572,7 @@ viewOr404 comics f id pg model =
Nothing -> the404 model
template :: MisoString -> [View Action] -> View Action
-template id rest = div_ [id_ id, class_ "app is-black"] rest
+template id = div_ [id_ id, class_ "app is-black"]
closeButton :: View Action
closeButton =
@@ -631,7 +631,7 @@ comicSpread comic page model =
ms Assets.demo
<> ms (comicSlug comic)
<> "-"
- <> (padLeft $ 1 + page)
+ <> padLeft (1 + page)
<> ".png"
frameborder_ :: MisoString -> Attribute action
@@ -661,7 +661,7 @@ comicVideo _ _ _ =
padLeft :: Int -> MisoString
padLeft n
- | n < 10 = ms $ ("0" <> Legacy.show n)
+ | n < 10 = ms ("0" <> Legacy.show n)
| otherwise = ms $ Legacy.show n
comicControls :: Comic -> Page -> Model -> View Action
@@ -670,7 +670,7 @@ comicControls comic page model =
[id_ "app-foot", class_ "comic-controls"]
[ div_
[ class_ "comic-nav-audio",
- css $ flexCenter
+ css flexCenter
]
[ audio_
[id_ audioId, loop_ True, crossorigin_ "anonymous"]
@@ -682,9 +682,9 @@ comicControls comic page model =
],
div_
[class_ "comic-controls-pages", css euro]
- [ el $ Arrow $ PrevPage,
+ [ el $ Arrow PrevPage,
span_ [] [text $ leftPage <> "-" <> rightPage <> " of " <> totalpages],
- el $ Arrow $ NextPage
+ el $ Arrow NextPage
],
div_
[class_ "comic-controls-share"]
@@ -767,7 +767,7 @@ chooseExperiencePage comic page model =
[ img_ [src_ $ ms $ Assets.demo <> name <> ".png"],
span_ [] [text $ ms name]
],
- span_ [css $ thicc] [text $ ms artist],
+ span_ [css thicc] [text $ ms artist],
span_ [] [text $ ms track]
]
experiences :: [(Text, Text, Text)]
@@ -821,7 +821,7 @@ column = div_ [css $ Clay.display Clay.flex <> Clay.flexDirection Clay.column]
-- | Links
comicLink :: ComicId -> URI
-comicLink comicId_ = linkURI $ safeLink routes comicProxy $ comicId_
+comicLink comicId_ = linkURI $ safeLink routes comicProxy comicId_
comicPlayerSpreadLink :: ComicId -> Page -> URI
comicPlayerSpreadLink id page =