style(tooltips): content to the right and fixed width
This commit is contained in:
parent
e5c7aa03db
commit
0c2f58fa42
@ -61,7 +61,7 @@
|
||||
display: none;
|
||||
top: -10px;
|
||||
transform: translateY(-100%);
|
||||
right: 3px;
|
||||
left: 3px;
|
||||
width: 275px;
|
||||
z-index: 10;
|
||||
background-color: #fafafa;
|
||||
@ -76,7 +76,7 @@
|
||||
background-color: #fafafa;
|
||||
transform: rotate(45deg);
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
left: 10px;
|
||||
bottom: -8px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -196,7 +196,11 @@ getMessages = fmap decodeMessage <$> ClassyPrelude.Yesod.getMessages
|
||||
messageTooltip :: forall site. Message -> WidgetFor site ()
|
||||
messageTooltip Message{..} = let urgency = statusToUrgencyClass messageStatus
|
||||
ic = iconText $ case messageIcon of
|
||||
Nothing -> IconWarning
|
||||
Nothing -> case messageStatus of
|
||||
Utils.Message.Error -> IconProblem
|
||||
Utils.Message.Warning -> IconWarning
|
||||
Utils.Message.Success -> IconOK
|
||||
Utils.Message.Info -> IconTooltipDefault
|
||||
Just i -> i
|
||||
tooltip = toWidget messageContent :: WidgetFor site ()
|
||||
in $(whamletFile "templates/widgets/tooltip.hamlet")
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
$newline never
|
||||
|
||||
<div .tooltip>
|
||||
<div .tooltip__handle .#{urgency}>
|
||||
<div .tooltip__handle .#{urgency} .fa-fw>
|
||||
<i .fas .fa-^{ic}>
|
||||
<div .tooltip__content>
|
||||
^{tooltip}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user