style(labels): display labels as pill

This commit is contained in:
Sarah Vaupel 2022-01-25 00:04:06 +01:00
parent b1991eead9
commit 7764265dee
3 changed files with 30 additions and 5 deletions

View File

@ -1745,3 +1745,28 @@ video
font-size: .5em
font-family: var(--font-monospace)
color: var(--color-fontsec)
.exam-office-label
--lbl-padding-vert: 5px
--lbl-padding-hori: 15px
padding: var(--lbl-padding-vert) var(--lbl-padding-hori)
border-radius: 20px 20px 20px 20px
font-weight: 600
text-align: center
width: fit-content
margin: 0 auto
&.success
background-color: var(--color-success-dark)
color: var(--color-lightwhite)
&.error
background-color: var(--color-error)
color: var(--color-lightwhite)
&.warning
background-color: var(--color-warning)
color: var(--color-lightwhite)
&.info
background-color: var(--color-lightblack)
color: var(--color-lightwhite)
&.nonactive
background-color: var(--color-nonactive)
color: var(--color-nonactive-dark)

View File

@ -283,11 +283,7 @@ postEOExamsR = do
-- TODO: use select frontend util
if
| Just (Just (Entity _ ExamOfficeLabel{..})) <- mLabel
-> return $ cell
[whamlet|
$newline never
#{examOfficeLabelName} (_{examOfficeLabelStatus}, #{tshow examOfficeLabelPriority})
|]
-> return $ cell $(widgetFile "widgets/exam-office-label")
| otherwise -> return $ cell mempty
colSynced = Colonnade.singleton (fromSortable . Sortable (Just "synced") $ i18nCell MsgExamSynchronised) $ \x -> flip runReader x $ do

View File

@ -0,0 +1,4 @@
$newline never
<div .exam-office-label .#{toPathPiece examOfficeLabelStatus}>
#{examOfficeLabelName}