Merge branch 'feat/modalicons' into 'master'
Make modal triggers not look like buttons anymore See merge request !80
This commit is contained in:
commit
3f383d1608
@ -58,7 +58,7 @@ colCShortDescr = sortable (Just "cshort") (i18nCell MsgCourseShort)
|
||||
(Just descr) -> cell
|
||||
[whamlet|
|
||||
$newline never
|
||||
<span style="float:right">
|
||||
<div>
|
||||
^{modal "Beschreibung" (Right $ toWidget descr)}
|
||||
|]
|
||||
)
|
||||
|
||||
@ -81,7 +81,7 @@ courseCell Course{..} = anchorCell link name `mappend` desc
|
||||
Nothing -> mempty
|
||||
(Just descr) -> cell [whamlet|
|
||||
$newline never
|
||||
<span style="float:right">
|
||||
<div>
|
||||
^{modal "Beschreibung" (Right $ toWidget descr)}
|
||||
|]
|
||||
|
||||
|
||||
@ -4,9 +4,6 @@ import Data.Either (isLeft)
|
||||
|
||||
import Import.NoFoundation
|
||||
|
||||
lipsum :: WidgetT site IO ()
|
||||
lipsum = $(widgetFile "widgets/lipsum")
|
||||
|
||||
modal :: WidgetT site IO () -> Either (SomeRoute site) (WidgetT site IO ()) -> WidgetT site IO ()
|
||||
modal modalTrigger modalContent = do
|
||||
let modalDynamic = isLeft modalContent
|
||||
@ -16,5 +13,14 @@ modal modalTrigger modalContent = do
|
||||
case modalContent of
|
||||
Left route -> do
|
||||
route' <- toTextUrl route
|
||||
[whamlet|<a .btn ##{triggerId} href=#{route'}>^{modalTrigger}|]
|
||||
Right _ -> [whamlet|<div .btn ##{triggerId}>^{modalTrigger}|]
|
||||
[whamlet|
|
||||
$newline never
|
||||
<a .modal__trigger href=#{route'} ##{triggerId}>
|
||||
<span .modal__trigger-label>^{modalTrigger}
|
||||
|]
|
||||
Right _ -> do
|
||||
[whamlet|
|
||||
$newline never
|
||||
<div .modal__trigger ##{triggerId}>
|
||||
<span .modal__trigger-label>^{modalTrigger}
|
||||
|]
|
||||
|
||||
@ -68,6 +68,11 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.modal__trigger-label {
|
||||
font-style: italic;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.modal__closer {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
|
||||
Reference in New Issue
Block a user