226 lines
4.1 KiB
SCSS
226 lines
4.1 KiB
SCSS
[uw-course-teaser] {
|
|
--course-border-color: var(--color-grey);
|
|
--course-padding-hori: 10px;
|
|
--course-padding-vert: 12px;
|
|
|
|
display: grid;
|
|
position: relative;
|
|
grid-gap: 5px 7px;
|
|
grid-template-columns: 140px 1fr 80px;
|
|
grid-template-areas:
|
|
'shrthnd title chevron'
|
|
'smstr school chevron'
|
|
'. rgstrd . '
|
|
'tutor name . '
|
|
'duedate date . '
|
|
'dscrptnlbl dscrptn . ';
|
|
padding: var(--course-padding-vert) var(--course-padding-hori);
|
|
transition: background-color .1s ease-out;
|
|
cursor: pointer;
|
|
|
|
&:hover {
|
|
background-color: var(--course-bg-color);
|
|
}
|
|
|
|
+ [uw-course-teaser] {
|
|
border-top: 1px solid var(--course-border-color);
|
|
}
|
|
}
|
|
|
|
.course-teaser__not-expandable {
|
|
cursor: initial;
|
|
}
|
|
|
|
/* chevron */
|
|
.course-teaser__chevron {
|
|
position: relative;
|
|
padding: 10px;
|
|
grid-area: chevron;
|
|
justify-self: center;
|
|
align-self: center;
|
|
width: 100%;
|
|
height: 100%;
|
|
cursor: pointer;
|
|
|
|
&::before {
|
|
content: '';
|
|
position: absolute;
|
|
display: block;
|
|
margin-top: -8px;
|
|
border-width: 0 3px 3px 0;
|
|
width: 8px;
|
|
height: 8px;
|
|
top: 50%;
|
|
left: 50%;
|
|
border-color: var(--color-fontsec);
|
|
border-style: solid;
|
|
transform: rotate(135deg);
|
|
transition: transform .2s ease-out;
|
|
}
|
|
|
|
&:hover::before {
|
|
transform: scale(1.4) rotate(45deg);
|
|
}
|
|
}
|
|
|
|
/* semester */
|
|
.course-teaser__semester {
|
|
grid-area: smstr;
|
|
justify-self: end;
|
|
a {
|
|
color: var(--color-fontsec);
|
|
}
|
|
}
|
|
|
|
/* shorthand */
|
|
.course-teaser__shorthand {
|
|
position: absolute;
|
|
grid-area: shrthnd;
|
|
font-size: 2rem;
|
|
font-weight: bold;
|
|
color: var(--color-grey-medium);
|
|
}
|
|
|
|
/* title */
|
|
.course-teaser__title {
|
|
grid-area: title;
|
|
font-size: 1.2rem;
|
|
align-self: baseline;
|
|
}
|
|
|
|
/* registration */
|
|
.course-teaser__registration {
|
|
grid-area: rgstrd;
|
|
color: var(--color-fontsec);
|
|
font-weight: bold;
|
|
}
|
|
|
|
/* school */
|
|
.course-teaser__school {
|
|
grid-area: school;
|
|
a {
|
|
color: var(--color-fontsec);
|
|
}
|
|
}
|
|
|
|
/* duedate */
|
|
.course-teaser__duedate {
|
|
grid-area: date;
|
|
}
|
|
|
|
/* lecturer */
|
|
.course-teaser__lecturer {
|
|
grid-area: name;
|
|
}
|
|
|
|
/* description */
|
|
.course-teaser__description {
|
|
grid-area: dscrptn;
|
|
max-height: 1000px;
|
|
overflow: auto;
|
|
}
|
|
|
|
/* show description only as dots (overflow text-overflow) and only show when expanded. No "hidden fiddling" */
|
|
|
|
/* labels */
|
|
.course-teaser__lecturer-label {
|
|
grid-area: tutor;
|
|
}
|
|
|
|
.course-teaser__duedate-label {
|
|
grid-area: duedate;
|
|
}
|
|
|
|
.course-teaser__description-label {
|
|
grid-area: dscrptnlbl;
|
|
}
|
|
|
|
.course-teaser__lecturer-label,
|
|
.course-teaser__description-label,
|
|
.course-teaser__duedate-label {
|
|
justify-self: end;
|
|
color: var(--color-fontsec);
|
|
font-style: italic;
|
|
}
|
|
|
|
/* hidden in closed state */
|
|
.course-teaser__description,
|
|
.course-teaser__description-label,
|
|
.course-teaser__registration {
|
|
display: none;
|
|
}
|
|
|
|
/* registered courses */
|
|
.course-teaser__registered {
|
|
.course-teaser__registration {
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
/* expanded courses */
|
|
.course-teaser__expanded {
|
|
cursor: initial;
|
|
|
|
.course-teaser__chevron {
|
|
&::before {
|
|
transform: rotate(45deg);
|
|
}
|
|
|
|
&:hover::before {
|
|
transform: scale(1.4) rotate(135deg);
|
|
}
|
|
}
|
|
|
|
.course-teaser__school-label,
|
|
.course-teaser__school,
|
|
.course-teaser__duedate-label,
|
|
.course-teaser__duedate,
|
|
.course-teaser__description,
|
|
.course-teaser__description-label {
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
/*
|
|
course teaser: header styling
|
|
*/
|
|
.course-teaser-header {
|
|
padding-top: 10px;
|
|
padding-bottom: 20px;
|
|
line-height: 1.4;
|
|
max-width: 85vw;
|
|
|
|
.course-header {
|
|
float: left;
|
|
background-color: var(--color-dark);
|
|
position: relative;
|
|
font-size: 16px;
|
|
color: #fff;
|
|
padding-top: 10px;
|
|
padding-bottom: 10px;
|
|
padding-left: 10px;
|
|
padding-right: 35px;
|
|
margin-bottom: 10px;
|
|
font-weight: bold;
|
|
text-align: left;
|
|
border-radius: 20px 20px 20px 20px / 50% 50% 50% 50%;
|
|
margin-right: 30px;
|
|
|
|
.course-header-link {
|
|
color: white;
|
|
font-weight: bold;
|
|
text-decoration: none;
|
|
|
|
&:hover {
|
|
color: inherit;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.course-teaser-header:after {
|
|
content: "";
|
|
display: table;
|
|
clear: both;
|
|
}
|