style: add inactive message style

This commit is contained in:
Sarah Vaupel 2021-11-30 20:02:49 +01:00
parent e60d125e05
commit 280de86865
6 changed files with 19 additions and 6 deletions

View File

@ -10,6 +10,8 @@
--color-success-dark: #1ca64c
--color-info: #c4c4c4
--color-info-dark: #919191
--color-nonactive: #efefef
--color-nonactive-dark: #9a989e
--color-lightblack: #1A2A36
--color-lightwhite: #fcfffa
--color-grey: #B1B5C0
@ -740,6 +742,9 @@ section
.notification-success
color: var(--color-success-dark)
.notification-nonactive
color: var(--color-nonactive)
// "Heated" element.
// Set custom property "--hotness" to a value from 0 to 1 to turn
// the element's background to a color on a gradient from green to red.
@ -1476,6 +1481,9 @@ a.breadcrumbs__home
&--success
border-left-color: var(--color-success)
&--disabled
border-left-color: var(--color-nonactive)
.active-allocations__wrapper

View File

@ -133,6 +133,7 @@ MessageError: Fehler
MessageWarning: Warnung
MessageInfo !ident-ok: Information
MessageSuccess: Erfolg
MessageNonactive: Inaktiv
ShortFieldPrimary: HF
ShortFieldSecondary: NF
SheetGradingPassPoints': Bestehen nach Punkten

View File

@ -133,6 +133,7 @@ MessageError: Error
MessageWarning: Warning
MessageInfo: Information
MessageSuccess: Success
MessageNonactive: Inactive
ShortFieldPrimary: Mj
ShortFieldSecondary: Mn
SheetGradingPassPoints': Passing by points

View File

@ -30,10 +30,11 @@ notification nType Message{ messageIcon = messageIcon', .. }
where
messageIcon = fromMaybe defaultIcon messageIcon'
defaultIcon = case messageStatus of
Success -> IconNotificationSuccess
Info -> IconNotificationInfo
Warning -> IconNotificationWarning
Error -> IconNotificationError
Success -> IconNotificationSuccess
Info -> IconNotificationInfo
Warning -> IconNotificationWarning
Error -> IconNotificationError
Nonactive -> IconNotificationNonactive
notificationWidget :: Yesod site
=> NotificationType

View File

@ -72,6 +72,7 @@ data Icon
| IconNotificationInfo
| IconNotificationWarning
| IconNotificationError
| IconNotificationNonactive
| IconFavourite
| IconLanguage
| IconNavContainerClose | IconPageActionChildrenClose
@ -150,6 +151,7 @@ iconText = \case
IconNotificationInfo -> "info-circle"
IconNotificationWarning -> "exclamation-circle"
IconNotificationError -> "exclamation-triangle"
IconNotificationNonactive -> "info"
IconFavourite -> "star"
IconLanguage -> "flag-alt"
IconNavContainerClose -> "chevron-up"

View File

@ -29,7 +29,7 @@ import Text.Blaze.Html.Renderer.Text (renderHtml)
import Text.HTML.SanitizeXSS (sanitizeBalance)
data MessageStatus = Error | Warning | Info | Success
data MessageStatus = Error | Warning | Info | Success | Nonactive
deriving (Eq, Ord, Enum, Bounded, Show, Read, Lift, Generic, Typeable)
deriving anyclass (Universe, Finite, NFData)
@ -219,7 +219,7 @@ messageTooltip Message{..} = let urgency = statusToUrgencyClass messageStatus
Utils.Message.Error -> IconProblem
Utils.Message.Warning -> IconWarning
Utils.Message.Success -> IconOK
Utils.Message.Info -> IconTooltipDefault)
_ -> IconTooltipDefault)
messageIcon
tooltip = toWidget messageContent :: WidgetFor site ()
isInlineTooltip = False