style(colonnade): no box-shadow for course lists, no courses on home
removed box-shadow from scrolltable and introduced scrolltable--bordered class; removed course list from home when logged in
This commit is contained in:
parent
973a6f4d04
commit
48113ebee0
@ -226,7 +226,7 @@ makeCourseTable whereClause colChoices psValidator = do
|
||||
]
|
||||
, dbtStyle = def
|
||||
{ dbsFilterLayout = defaultDBSFilterLayout
|
||||
, dbsCellTemplate = DBSTCourse (_dbrOutput . _1) (_dbrOutput . _5) (_dbrOutput . _3) (_dbrOutput . _4)
|
||||
, dbsTemplate = DBSTCourse (_dbrOutput . _1) (_dbrOutput . _5) (_dbrOutput . _3) (_dbrOutput . _4)
|
||||
-- ^ course ^ lecturer list ^ isRegistered ^ school
|
||||
}
|
||||
, dbtParams = def
|
||||
|
||||
@ -20,7 +20,7 @@ getHomeR = do
|
||||
setTitleI MsgHomeHeading
|
||||
fromMaybe mempty upcomingExamsWidget
|
||||
maybe mempty homeUpcomingSheets muid
|
||||
homeOpenCourses
|
||||
maybe homeOpenCourses (const mempty) muid
|
||||
|
||||
|
||||
homeOpenCourses :: Widget
|
||||
|
||||
@ -439,7 +439,7 @@ data DBStyle r = DBStyle
|
||||
-> Widget
|
||||
-> Widget
|
||||
-- ^ Filter UI, Filter Encoding, Filter action, table
|
||||
, dbsCellTemplate :: DBSTemplateMode r
|
||||
, dbsTemplate :: DBSTemplateMode r
|
||||
}
|
||||
|
||||
data DBSTemplateMode r = DBSTDefault
|
||||
@ -456,7 +456,7 @@ instance Default (DBStyle r) where
|
||||
<!-- No Filter UI -->
|
||||
^{scrolltable}
|
||||
|]
|
||||
, dbsCellTemplate = DBSTDefault
|
||||
, dbsTemplate = DBSTDefault
|
||||
}
|
||||
|
||||
defaultDBSFilterLayout :: Widget -- ^ Filter UI
|
||||
@ -1030,12 +1030,11 @@ dbTable PSValidator{..} dbtable@DBTable{ dbtIdent = dbtIdent'@(toPathPiece -> db
|
||||
. setParam (wIdent "pagination") Nothing
|
||||
|
||||
table' :: HandlerSite m ~ UniWorX => WriterT x m Widget
|
||||
table' = case dbsCellTemplate of
|
||||
table' = let
|
||||
columnCount :: Int64
|
||||
columnCount = olength64 $ getColonnade dbtColonnade
|
||||
in case dbsTemplate of
|
||||
DBSTCourse c l r s -> do
|
||||
let
|
||||
columnCount :: Int64
|
||||
columnCount = olength64 $ getColonnade dbtColonnade
|
||||
|
||||
wRows <- forM (zip [0..length rows] rows) $ \(cid, row') -> let
|
||||
Course{..} = row' ^. c . _entityVal
|
||||
lecturerUsers = row' ^. l
|
||||
@ -1059,9 +1058,6 @@ dbTable PSValidator{..} dbtable@DBTable{ dbtIdent = dbtIdent'@(toPathPiece -> db
|
||||
piSorting' = [ sSet | sSet <- fromMaybe [] piSorting, Just (sortKey sSet) /= sortableKey ]
|
||||
return $(widgetFile "table/cell/header")
|
||||
|
||||
columnCount :: Int64
|
||||
columnCount = olength64 $ getColonnade dbtColonnade
|
||||
|
||||
wHeaders <- maybe (return Nothing) (fmap Just . genHeaders) pSortable
|
||||
|
||||
wRows <- forM rows $ \row' -> forM (oneColonnadeEncode <$> getColonnade dbtColonnade) $ \(($ row') -> cell') -> do
|
||||
|
||||
@ -328,6 +328,9 @@ input[type="button"].btn-info:hover,
|
||||
/* SCROLLTABLE */
|
||||
.scrolltable {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.scrolltable--bordered {
|
||||
box-shadow: 0 0 1px 1px var(--color-grey-light);
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
$newline never
|
||||
<div .scrolltable>
|
||||
<div .scrolltable .scrolltable--bordered>
|
||||
<table *{dbsAttrs'}>
|
||||
$maybe wHeaders' <- wHeaders
|
||||
<thead>
|
||||
|
||||
@ -1,12 +1,7 @@
|
||||
$newline never
|
||||
<div .scrolltable>
|
||||
<table *{dbsAttrs'}>
|
||||
<tbody>
|
||||
$if null wRows && (dbsEmptyStyle == DBESHeading)
|
||||
<tr .table__row>
|
||||
<td .table__td colspan=#{show columnCount}>
|
||||
_{dbsEmptyMessage}
|
||||
$else
|
||||
$forall row <- wRows
|
||||
<tr .table__row>
|
||||
^{row}
|
||||
$if null wRows && (dbsEmptyStyle == DBESHeading)
|
||||
<p>_{dbsEmptyMessage}
|
||||
$else
|
||||
$forall row <- wRows
|
||||
^{row}
|
||||
@ -6,6 +6,10 @@
|
||||
--course-expanded-bg-color: var(--color-grey-light);
|
||||
}
|
||||
|
||||
.scrolltable {
|
||||
box-shadow: none!important;
|
||||
}
|
||||
|
||||
.course-teaser {
|
||||
display: grid;
|
||||
grid-gap: 5px 7px;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user