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
---------------------------------------------------------------------------
-- 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
= IconNew
@ -40,7 +44,7 @@ data Icon
| IconProblem
| IconVisible
| IconInvisible
-- | IconCourse -- not used, IconMenuCourse is currently only used
-- | IconCourse -- not used, IconMenuCourse is currently only used
| IconCourseFavouriteManual | IconCourseFavouriteAutomatic | IconCourseFavouriteOff
| IconEnrolTrue
| IconEnrolFalse
@ -118,13 +122,13 @@ data Icon
| IconCompany
| IconEdit
| IconUserEdit
deriving (Eq, Ord, Enum, Bounded, Show, Read, Generic)
deriving anyclass (Universe, Finite, NFData)
iconText :: Icon -> Text
iconText = camelToPathPiece' 1 . tshow
iconText = camelToPathPiece' 1 . tshow
nullaryPathPiece ''Icon $ camelToPathPiece' 1
deriveLift ''Icon
@ -140,7 +144,7 @@ icon ic = [shamlet|
<span .ico-#{iconText ic}>
|]
-- Create an icon with fixed width
iconFixed :: Icon -> Markup
iconFixed ic = [shamlet|