forked from web-padawan/aybolit
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hener Hoop
committed
Oct 19, 2023
1 parent
d2326ca
commit 2a78f61
Showing
5 changed files
with
270 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,145 @@ | ||
/* stylelint-disable value-no-vendor-prefix, property-no-vendor-prefix -- some of these are necessary for line-clamp implementation */ | ||
@use "~@conversionxl/cxl-lumo-styles/scss/mq"; | ||
@use "~@conversionxl/cxl-ui/scss/mixins"; | ||
|
||
:host { | ||
min-width: 267px; // 3col widths on 1400px | ||
max-width: 300px; | ||
height: auto; | ||
min-height: calc(3 * var(--lumo-space-xl)); | ||
padding: var(--lumo-space-m); | ||
|
||
.container > .attributes { | ||
display: none; | ||
position: relative; | ||
box-sizing: border-box; | ||
display: flex; | ||
justify-content: space-between; | ||
width: 100%; | ||
height: 100%; | ||
min-width: 267px; | ||
font-size: var(--lumo-font-size-s); | ||
background: var(--lumo-tint); | ||
border: 1px solid var(--lumo-contrast-10pct); | ||
border-radius: var(--lumo-border-radius-l); | ||
box-shadow: var(--lumo-box-shadow-xs); | ||
break-inside: avoid; | ||
transform: translateZ(0); // CSS columns @see https://stackoverflow.com/a/55110789/35946 | ||
} | ||
|
||
:host([hidden]) { | ||
display: none; | ||
} | ||
|
||
:host(:hover) { | ||
border-color: var(--lumo-primary-color); | ||
} | ||
|
||
:host([portrait]) { | ||
display: block; | ||
width: 175px; | ||
min-width: 0; | ||
min-height: 220px; | ||
} | ||
|
||
:host([completed]) { | ||
opacity: 0.6; | ||
} | ||
|
||
:host([theme~="minidegree"]) { | ||
background-color: var(--lumo-contrast); | ||
} | ||
|
||
.badge-new { | ||
position: absolute; | ||
right: 5px; | ||
bottom: 5px; | ||
display: none; | ||
padding: 2px 8px; | ||
font-size: 14px; | ||
font-weight: 700; | ||
color: var(--lumo-primary-contrast-color); | ||
border-radius: 40px; | ||
background: var(--lumo-primary-color); | ||
z-index: 2; | ||
|
||
:host([new]) & { | ||
display: block; | ||
} | ||
} | ||
|
||
header { | ||
.info { | ||
.name { | ||
font-size: var(--lumo-font-size-m); | ||
font-weight: 600; | ||
} | ||
header { | ||
display: flex; | ||
align-items: start; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
padding: var(--lumo-space-m) var(--lumo-space-s) var(--lumo-space-s) var(--lumo-space-m); | ||
|
||
.attributes { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
padding-top: var(--lumo-space-xs); | ||
padding-bottom: 0; | ||
gap: var(--lumo-space-xs); | ||
} | ||
:host([portrait]) { | ||
padding: var(--lumo-space-m) 12px 8px 12px; | ||
} | ||
|
||
cxl-time { | ||
margin-left: -3px; // to align with the instructor text | ||
} | ||
.name { | ||
@include mixins.ellipsis-for-lines(2); | ||
font-family: var(--lumo-font-family); | ||
font-size: 15px; | ||
font-style: normal; | ||
font-weight: 600; | ||
line-height: var(--lumo-line-height-xs); | ||
|
||
:host([theme~="minidegree"]) & { | ||
color: var(--lumo-tint); | ||
} | ||
|
||
.instructor-image { | ||
height: 80px; | ||
a { | ||
color: var(--lumo-body-text-color); | ||
text-decoration: none; | ||
|
||
&:hover { | ||
text-decoration: underline; | ||
} | ||
} | ||
} | ||
} | ||
|
||
:host([completed]) { | ||
opacity: 0.6; | ||
|
||
[icon="lumo:checkmark"] { | ||
display: inline-block; | ||
margin-top: calc(var(--lumo-space-xs) * -1); | ||
color: var(--lumo-primary-color); | ||
} | ||
} | ||
|
||
::slotted(footer) { | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: var(--lumo-space-xs); | ||
.progress { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
font-size: 13px; | ||
line-height: 18px; | ||
color: var(--lumo-body-text-color); | ||
} | ||
} | ||
|
||
:host([theme~="minidegree"]) { | ||
.name { | ||
color: var(--lumo-primary-contrast-color); | ||
.avatar { | ||
position: relative; | ||
width: 100%; | ||
max-width: 112px; | ||
|
||
&:before { | ||
content: ''; | ||
display: block; | ||
padding-top: 100%; | ||
} | ||
|
||
.attributes { | ||
color: var(--lumo-tint-40pct); | ||
img { | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
display: block; | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; | ||
} | ||
|
||
cxl-time { | ||
margin-left: -3px; // to align with the instructor text | ||
color: var(--lumo-tint-40pct); | ||
:host([portrait]) & { | ||
width: 100%; | ||
max-width: none; | ||
|
||
&:before { | ||
display: none; | ||
} | ||
|
||
img { | ||
position: relative; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.