@@ -39,7 +39,9 @@ tshow = T.pack . show
3939
4040frontend :: Frontend (R FrontendRoute)
4141frontend = Frontend
42− { _frontend_head = pure () -- el "title" $ text "Obelisk Minimal Example"
42+ { _frontend_head = pure ()
43+ -- TODO lib/Frontend needs fixing for this to work
44+ -- el "title" $ text "Obelisk Minimal Example"
4345 , _frontend_body = do
4446 text "Welcome to Obelisk!"
4547 el "p" $ text $ T.pack commonStuff
@@ -61,7 +63,6 @@ frontend = Frontend
6163-- (el "a" $ text "JS link")
6264
6365 pb <- getPostBuild
64− pure ()
6566
6667 elAttr "article" ("style" =: "background: moccasin") $ do
6768 widgetHold_ (el "div" $ text "first") $ ffor pb $ \() -> display seconds
@@ -82,8 +83,6 @@ frontend = Frontend
8283 1 -> text "Odd"
8384 1 -> el "span" $ text "Odd inner"
8485
85− pure ()
86−
8786 -- These will be squashed into a single text node by the static renderer
8887-- text "Test"
8988-- text "Test"
@@ -91,14 +90,18 @@ frontend = Frontend
9190-- text "Test"
9291-- text "Test"
9392
94− {-
9593 --traverseDMapWithKeyWithAdjust' :: (forall a. k a -> v a -> m (v' a)) -> DMap k v -> Event t (PatchDMap k v) -> m (DMap k v', Event t (PatchDMap k v'))
96− elAttr "article" ("style" =: "background: thistle") $ do
97− (m', e') <- traverseDMapWithKeyWithAdjust (\k v -> has @Show k $ dkeyWidget k v) keyMap $ ffor (updated clicks) $ \x -> case x `mod` 2 of
98− 0 -> PatchDMap $ DMap.singleton Key_Int (ComposeMaybe $ Just $ Identity x)
99− 1 -> PatchDMap $ DMap.singleton Key_Bool (ComposeMaybe $ case x `mod` 3 of 0 -> Nothing; _ -> Just $ Identity True) <> DMap.singleton Key_Char (ComposeMaybe $ Just $ Identity (toEnum $ fromEnum 'A' + x))
94+-- elAttr "article" ("style" =: "background: thistle") $ do
95+-- (m', e') <- traverseDMapWithKeyWithAdjust (\k v -> has @Show k $ dkeyWidget k v) keyMap $ ffor (updated clicks) $ \_ -> case 0 of -- x -> case x `mod` 2 of
96+-- 0 -> PatchDMap $ DMap.singleton Key_Int (ComposeMaybe $ Just $ Identity 10)
97+-- 1 -> PatchDMap $ DMap.singleton Key_Bool (ComposeMaybe $ case x `mod` 3 of 0 -> Nothing; _ -> Just $ Identity True) <> DMap.singleton Key_Char (ComposeMaybe $ Just $ Identity (toEnum $ fromEnum 'A' + x))
10098 pure ()
101−-}
99+
100+
101+-- elAttr "article" ("style" =: "background: thistle") $ do
102+-- (m', e') <- traverseDMapWithKeyWithAdjust (\k v -> has @Show k $ dkeyWidget k v) keyMap $
103+-- PatchDMap (DMap.singleton Key_Int (ComposeMaybe $ Just $ Identity 10)) <$ pb
104+-- pure ()
102105
103106 {-
104107 elAttr "article" ("style" =: "background: maroon") $ do
@@ -130,10 +133,10 @@ frontend = Frontend
130133 , ffor del $ \() -> PatchIntMap $ IntMap.singleton 3 Nothing
131134 ]
132135 pure ()
133−
134−-}
136+ -}
135137
136138-- el "footer" $ text "Footer"
139+ pure ()
137140 }
138141
139142intkeyWidget :: (MonadHold t m, PostBuild t m, PerformEvent t m, TriggerEvent t m, DomBuilder t m, MonadFix m, MonadIO m, MonadIO (Performable m)) => Int -> Char -> m ()