|
|
@@ -19,7 +19,8 @@ import Web.DOM.Node (nodeName)
|
|
|
|
|
|
data ArtDecoCenterHeaderAlt a = ArtDecoCenterHeaderAlt {
|
|
|
bold :: a,
|
|
|
- normal :: Maybe a
|
|
|
+ normal :: Maybe a,
|
|
|
+ light :: Maybe (NonEmptyList a)
|
|
|
}
|
|
|
|
|
|
derive instance Generic (ArtDecoCenterHeaderAlt a) _
|
|
|
@@ -35,10 +36,12 @@ instance Foldable ArtDecoCenterHeaderAlt where
|
|
|
foldr = \x -> foldrDefault x
|
|
|
|
|
|
instance Traversable ArtDecoCenterHeaderAlt where
|
|
|
- sequence (ArtDecoCenterHeaderAlt {bold, normal}) = ado
|
|
|
- b <- bold
|
|
|
- n <- sequence normal
|
|
|
- in ArtDecoCenterHeaderAlt {bold: b, normal: n}
|
|
|
+ sequence :: forall a m. Applicative m => ArtDecoCenterHeaderAlt (m a) -> m (ArtDecoCenterHeaderAlt a)
|
|
|
+ sequence (ArtDecoCenterHeaderAlt {bold, normal, light}) = ado
|
|
|
+ b <- bold :: m a
|
|
|
+ n <- sequence normal :: m (Maybe a)
|
|
|
+ l <- sequence (map sequence light) :: m (Maybe (NonEmptyList a))
|
|
|
+ in ArtDecoCenterHeaderAlt {bold: b, normal: n, light: l}
|
|
|
|
|
|
traverse = \x -> traverseDefault x
|
|
|
|
|
|
@@ -75,8 +78,11 @@ queryArtDecoCenterHeaderAlt n = do
|
|
|
normal <-
|
|
|
ignoreNotFound $
|
|
|
runOne ":scope span.t-normal:not(t-black--light) > span[aria-hidden=true]" n
|
|
|
+ light <-
|
|
|
+ ignoreNotFound $
|
|
|
+ runAll ":scope span.t-black--light > span[aria-hidden=true]" n
|
|
|
|
|
|
- pure $ ArtDecoCenterHeaderAlt {bold, normal: normal}
|
|
|
+ pure $ ArtDecoCenterHeaderAlt {bold, normal, light}
|
|
|
|
|
|
queryArtDecoCardAlt ∷ QueryRunner (ArtDecoCardAltElement Node)
|
|
|
queryArtDecoCardAlt n = do
|