From cc7fa8333c528d1b0b8dcee03d4dcce6c1f8f6d1 Mon Sep 17 00:00:00 2001 From: Steffen Jost Date: Tue, 26 Nov 2024 09:02:53 +0100 Subject: [PATCH] chore(icons): contribute to #2397 by improving the comment instructions --- src/Utils/Icon.hs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Utils/Icon.hs b/src/Utils/Icon.hs index 0d9b68b5f..5a2982bef 100644 --- a/src/Utils/Icon.hs +++ b/src/Utils/Icon.hs @@ -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| |] - + -- Create an icon with fixed width iconFixed :: Icon -> Markup iconFixed ic = [shamlet|