got rid of iconToText

This commit is contained in:
Felix Hamann 2018-03-18 02:43:54 +01:00
parent d55b88d7cb
commit 910eb40c86
2 changed files with 4 additions and 8 deletions

View File

@ -355,12 +355,6 @@ defaultMenuLayout menu widget = do
$(widgetFile "standalone/sortable")
$(widgetFile "standalone/inputs")
withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet")
where
iconToText :: Maybe Text -> Text
iconToText mText =
"" ++ case mText of
Nothing -> ""
Just text -> text
-- How to run database actions.
instance YesodPersist UniWorX where

View File

@ -4,9 +4,11 @@
<ul .asidenav__list>
$forall menuType <- menuTypes
$case menuType
$of NavbarLeft (MenuItem label icon route _)
$of NavbarLeft (MenuItem label mIcon route _)
<li .asidenav__list-item :Just route == mcurrentRoute:.asidenav__list-item--active>
<a .asidenav__link :isJust icon:.glyphicon :isJust icon:.glyphicon--#{iconToText icon} href=@{route}>#{label}
$if isJust mIcon
<div .glyphicon.glyphicon--#{fromMaybe "" mIcon}>
<a .asidenav__link href=@{route}>#{label}
$of _
<div .asidenav__box>