diff --git a/messages/de.msg b/messages/de.msg index 5332201d5..d5403dc7f 100644 --- a/messages/de.msg +++ b/messages/de.msg @@ -49,3 +49,5 @@ SubmissionAlreadyExistsFor user@Text: #{user} hat bereits eine Abgabe zu diesem EMailUnknown email@Text: E-Mail #{email} gehört zu keinem bekannten Benutzer. NotAParticipant user@Text tid@TermIdentifier csh@Text: #{user} ist nicht im Kurs #{termToText tid}-#{csh} angemeldet. +HomeHeading: Startseite +TermsHeading: Semesterübersicht diff --git a/src/Foundation.hs b/src/Foundation.hs index ed93e5a90..5932fa6c3 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -1,7 +1,7 @@ {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedLists #-} -{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE TemplateHaskell, QuasiQuotes #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-} @@ -434,11 +434,14 @@ instance Yesod UniWorX where -- value passed to hamletToRepHtml cannot be a widget, this allows -- you to use normal widget features in default-layout. + let navbar :: Widget navbar = $(widgetFile "widgets/navbar") asidenav :: Widget asidenav = $(widgetFile "widgets/asidenav") + contentHeadline :: Maybe Widget + contentHeadline = pageHeading =<< mcurrentRoute breadcrumbs :: Widget breadcrumbs = $(widgetFile "widgets/breadcrumbs") pageactionprime :: Widget @@ -465,7 +468,7 @@ instance Yesod UniWorX where $(widgetFile "standalone/showHide") $(widgetFile "standalone/inputs") withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet") - + -- The page to be redirected to when authentication is required. authRoute _ = Just $ AuthR LoginR @@ -595,6 +598,14 @@ pageActions (TermCourseListR _) = pageActions _ = [] +pageHeading :: Route UniWorX -> Maybe Widget +pageHeading HomeR + = Just [whamlet|_{MsgHomeHeading}|] +pageHeading TermShowR + = Just [whamlet|_{MsgTermsHeading}|] +pageHeading _ + = Nothing + defaultLinks :: [MenuTypes] defaultLinks = -- Define the menu items of the header. [ NavbarRight $ MenuItem @@ -622,21 +633,15 @@ defaultLinks = -- Define the menu items of the header. , menuItemAccessCallback' = isJust <$> maybeAuthPair } , NavbarAside $ MenuItem - { menuItemLabel = "Aktuelle Veranstaltungen" + { menuItemLabel = "Veranstaltungen" , menuItemIcon = Just "book" , menuItemRoute = CourseListR -- should be CourseListActiveR or similar in the future , menuItemAccessCallback' = return True } , NavbarAside $ MenuItem - { menuItemLabel = "Alte Veranstaltungen" - , menuItemIcon = Just "book" - , menuItemRoute = CourseListR -- should be CourseListInactiveR or similar in the future - , menuItemAccessCallback' = return True - } - , NavbarAside $ MenuItem - { menuItemLabel = "Veranstaltungen" - , menuItemIcon = Just "book" - , menuItemRoute = CourseListR + { menuItemLabel = "Semester" + , menuItemIcon = Nothing + , menuItemRoute = CourseListR -- should be TermListR ,,, , menuItemAccessCallback' = return True } , NavbarAside $ MenuItem diff --git a/static/css/icons.css b/static/css/icons.css index b836de6e3..e5fdd191d 100644 --- a/static/css/icons.css +++ b/static/css/icons.css @@ -32,3 +32,6 @@ .glyphicon--logout::before { content: '\e163'; } +.glyphicon--none::before { + content: ''; +} diff --git a/static/css/tabber.css b/static/css/tabber.css index f768f6f24..6f823b410 100644 --- a/static/css/tabber.css +++ b/static/css/tabber.css @@ -1,8 +1,6 @@ .tab-group { - /* box-shadow: 0 0 0 18px white, 0 0 0 20px #b3b7c1; */ border-top: 2px solid #dcdcdc; padding-top: 30px; - margin-top: 40px; } .tab-group-openers { diff --git a/templates/course.hamlet b/templates/course.hamlet index 958e4024a..f1db6a0a7 100644 --- a/templates/course.hamlet +++ b/templates/course.hamlet @@ -31,8 +31,13 @@ \ bis #{formatTimeGerWD regTo} $# if allowed to register -
- Anmelden +
+