chore(icons): contribute to #2397 by improving the comment instructions

This commit is contained in:
Steffen Jost 2024-11-26 09:02:53 +01:00
parent 26831fde6e
commit cc7fa8333c

View File

@ -30,7 +30,11 @@ type WidgetSiteless = forall site. WidgetFor site ()
-- For consistency, some conditional icons are also provided, having suffix True/False -- For consistency, some conditional icons are also provided, having suffix True/False
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
-- IMPORTANT: Alert-Icons must be registered in alert-icons.js as well!!! -- IMPORTANT:
-- All icons must be manually registered within the following files:
-- - src/Utils/Icon.hs
-- - assets/icon-src/fontawesome.json
-- - frontend/src/icons.scss
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
data Icon data Icon
= IconNew = IconNew
@ -40,7 +44,7 @@ data Icon
| IconProblem | IconProblem
| IconVisible | IconVisible
| IconInvisible | IconInvisible
-- | IconCourse -- not used, IconMenuCourse is currently only used -- | IconCourse -- not used, IconMenuCourse is currently only used
| IconCourseFavouriteManual | IconCourseFavouriteAutomatic | IconCourseFavouriteOff | IconCourseFavouriteManual | IconCourseFavouriteAutomatic | IconCourseFavouriteOff
| IconEnrolTrue | IconEnrolTrue
| IconEnrolFalse | IconEnrolFalse
@ -118,13 +122,13 @@ data Icon
| IconCompany | IconCompany
| IconEdit | IconEdit
| IconUserEdit | IconUserEdit
deriving (Eq, Ord, Enum, Bounded, Show, Read, Generic) deriving (Eq, Ord, Enum, Bounded, Show, Read, Generic)
deriving anyclass (Universe, Finite, NFData) deriving anyclass (Universe, Finite, NFData)
iconText :: Icon -> Text iconText :: Icon -> Text
iconText = camelToPathPiece' 1 . tshow iconText = camelToPathPiece' 1 . tshow
nullaryPathPiece ''Icon $ camelToPathPiece' 1 nullaryPathPiece ''Icon $ camelToPathPiece' 1
deriveLift ''Icon deriveLift ''Icon
@ -140,7 +144,7 @@ icon ic = [shamlet|
<span .ico-#{iconText ic}> <span .ico-#{iconText ic}>
|] |]
-- Create an icon with fixed width -- Create an icon with fixed width
iconFixed :: Icon -> Markup iconFixed :: Icon -> Markup
iconFixed ic = [shamlet| iconFixed ic = [shamlet|