From 707beee3e349f4f2e56119c3525bf97ddad1dd2d Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 1 May 2019 12:23:11 +0200 Subject: [PATCH] Minor HTML tweaks Fixes #324 --- src/Foundation.hs | 2 + templates/course.hamlet | 159 +++++++++++------------ templates/default-layout-wrapper.hamlet | 30 +++-- templates/default-layout.hamlet | 1 + templates/home/openCourses.hamlet | 1 + templates/home/upcomingSheets.hamlet | 1 + templates/table/layout-standalone.hamlet | 1 + templates/table/sortable-header.hamlet | 1 + templates/terms.hamlet | 4 +- templates/widgets/alerts/alerts.hamlet | 1 + templates/widgets/footer/footer.hamlet | 1 + templates/widgets/footer/footer.lucius | 8 ++ templates/widgets/navbar/item.hamlet | 1 + 13 files changed, 118 insertions(+), 93 deletions(-) diff --git a/src/Foundation.hs b/src/Foundation.hs index d7b1060ae..05b086ed0 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -1162,6 +1162,8 @@ siteLayout' headingOverride widget = do isModal <- hasCustomHeader HeaderIsModal + primaryLanguage <- unsafeHead . Text.splitOn "-" <$> selectLanguage appLanguages + mcurrentRoute <- getCurrentRoute -- Get the breadcrumbs, as defined in the YesodBreadcrumbs instance. diff --git a/templates/course.hamlet b/templates/course.hamlet index 4fc2f9366..6f4b83866 100644 --- a/templates/course.hamlet +++ b/templates/course.hamlet @@ -1,94 +1,93 @@ $newline never -
-
-
Fakultät/Institut +
+
Fakultät/Institut +
+
+ #{schoolName} + + $maybe descr <- courseDescription course +
_{MsgCourseDescription}
- #{schoolName} + #{descr} - $maybe descr <- courseDescription course -
_{MsgCourseDescription} + $with numlecs <- length lecturers + $if numlecs /= 0 + $if numlecs > 1 +
_{MsgLecturersFor} + $else +
_{MsgLecturerFor}
- #{descr} - - $with numlecs <- length lecturers - $if numlecs /= 0 - $if numlecs > 1 -
_{MsgLecturersFor} - $else -
_{MsgLecturerFor} -
-
-