1
1
mirror of https://github.com/aelve/guide.git synced 2024-11-23 12:15:06 +03:00

Add some space between pros/cons

This commit is contained in:
Artyom 2016-02-14 14:19:32 +03:00
parent ace79738f5
commit 3e82ff2ea3
2 changed files with 11 additions and 3 deletions

View File

@ -94,9 +94,11 @@ main :: IO ()
main = runSpock 8080 $ spockT id $ do
middleware (staticPolicy (addBase "static"))
stateVar <- liftIO $ newIORef sampleState
get root $ do
s <- liftIO $ readIORef stateVar
lucid $ renderRoot s
post "/add/category" $ do
title' <- param' "title"
id' <- liftIO (newId stateVar)
@ -107,6 +109,7 @@ main = runSpock 8080 $ spockT id $ do
liftIO $ modifyIORef stateVar $
categories %~ (++ [newCategory])
lucid $ renderCategory newCategory
post ("/add/item/library" <//> var) $ \catId' -> do
name' <- param' "name"
let newItem = Item {
@ -154,10 +157,10 @@ renderItem item =
div_ [class_ "item"] $ do
h3_ itemHeader
div_ [class_ "pros-cons"] $ do
div_ [] $ do
div_ [class_ "pros"] $ do
p_ "Pros:"
ul_ $ mapM_ (li_ . toHtml) (item^.pros)
div_ [] $ do
div_ [class_ "cons"] $ do
p_ "Cons:"
ul_ $ mapM_ (li_ . toHtml) (item^.cons)
where

View File

@ -1,7 +1,12 @@
.items {
display: flex; }
.item {
border: 1px solid;
margin: 5px; }
.pros-cons {
display: flex; }
display: flex }
.pros, .cons {
margin: 0px 5px; }