style(allocation): improve structure of allocation-page

This commit is contained in:
Gregor Kleen 2019-09-05 18:05:39 +02:00
parent a3f236cb5f
commit ada41e2164
4 changed files with 23 additions and 7 deletions

View File

@ -1523,6 +1523,7 @@ AllocationActive: Aktiv
AllocationName: Name AllocationName: Name
AllocationAvailableCourses: Kurse AllocationAvailableCourses: Kurse
AllocationAppliedCourses: Bewerbungen AllocationAppliedCourses: Bewerbungen
AllocationNumCoursesAvailableApplied available@Int applied@Int: Sie haben sich bisher für #{applied}/#{available} #{pluralDE applied "Kurs" "Kursen"} beworben
AllocationTitle termText@Text ssh'@SchoolShorthand allocation@AllocationName: #{termText} - #{ssh'}: #{allocation} AllocationTitle termText@Text ssh'@SchoolShorthand allocation@AllocationName: #{termText} - #{ssh'}: #{allocation}
AllocationShortTitle termText@Text ssh'@SchoolShorthand ash@AllocationShorthand: #{termText} - #{ssh'} - #{ash} AllocationShortTitle termText@Text ssh'@SchoolShorthand ash@AllocationShorthand: #{termText} - #{ssh'} - #{ash}
AllocationDescription: Beschreibung AllocationDescription: Beschreibung

View File

@ -96,4 +96,6 @@ getAShowR tid ssh ash = do
|] |]
let daysToRegistrationStart = assertM (>0) $ (`diffUTCTime` now) <$> allocationRegisterFrom let daysToRegistrationStart = assertM (>0) $ (`diffUTCTime` now) <$> allocationRegisterFrom
allocationInfoModal = modal [whamlet|_{MsgMenuAllocationInfo}|] $ Left $ SomeRoute InfoAllocationR allocationInfoModal = modal [whamlet|_{MsgMenuAllocationInfo}|] $ Left $ SomeRoute InfoAllocationR
numCourses = length courses
numAppliedCourses = lengthOf (folded . _2 . _Just) courses
$(widgetFile "allocation/show") $(widgetFile "allocation/show")

View File

@ -78,6 +78,9 @@ $if not (null courseWidgets)
<p>_{MsgAllocationPriorityTip} <p>_{MsgAllocationPriorityTip}
<p>_{MsgAllocationPriorityRelative} <p>_{MsgAllocationPriorityRelative}
<p>_{MsgApplicationEditTip} <p>_{MsgApplicationEditTip}
$if is _Just muid
<p .allocation__state>
_{MsgAllocationNumCoursesAvailableApplied numCourses numAppliedCourses}
<div .allocation__courses> <div .allocation__courses>
$forall courseWgt <- courseWidgets $forall courseWgt <- courseWidgets
^{courseWgt} ^{courseWgt}

View File

@ -3,8 +3,14 @@
font-style: italic; font-style: italic;
} }
.allocation__state {
color: var(--color-font);
font-weight: 600;
font-style: normal;
}
.allocation__courses { .allocation__courses {
margin-top: 20px; margin: 20px 0 0 40px;
} }
.allocation-course { .allocation-course {
@ -19,15 +25,19 @@
grid-gap: 5px 7px; grid-gap: 5px 7px;
padding: 12px 10px; padding: 12px 10px;
&:last-child { /* &:last-child {
padding: 12px 10px 0 10px; * padding: 12px 10px 0 10px;
} * }
*
* & + .allocation-course {
* border-top: 1px solid var(--color-grey);
* }
*/
& + .allocation-course { &:nth-child(2n) {
border-top: 1px solid var(--color-grey); background-color: rgba(0, 0, 0, 0.03);
} }
.allocation-course__priority { .allocation-course__priority {
grid-area: prio; grid-area: prio;
} }