webapp/src/components/Feed/Card.module.scss

604 lines
8.8 KiB
SCSS
Raw Normal View History

.shoutCard {
2022-09-09 11:53:35 +00:00
display: flex;
flex-direction: column;
line-height: 1.2;
margin-bottom: 2.4rem;
position: relative;
&:hover {
.shoutCardCover img {
2022-09-09 11:53:35 +00:00
transform: scale(1.05);
}
}
a {
border: none;
}
}
.shoutCardWithBorder {
border-top: 1px solid #141414;
margin-top: 2.4rem !important;
padding-top: 2.4rem;
}
.shoutCardTitlesContainer {
2022-09-09 11:53:35 +00:00
a {
&::before {
content: '';
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: 1;
}
&:hover {
.shoutCardTitle .shoutCardLinkContainer {
2022-09-09 11:53:35 +00:00
background-color: #000;
color: #fff;
}
}
}
}
.shoutCardCoverContainer {
2022-09-09 11:53:35 +00:00
position: relative;
}
.shoutCardCover {
2022-09-09 11:53:35 +00:00
height: 0;
margin-bottom: 1.6rem;
overflow: hidden;
padding-bottom: 56.2%;
position: relative;
img {
height: 100%;
object-fit: cover;
position: absolute;
transform-origin: 50% 50%;
transition: transform 1s ease-in-out;
width: 100%;
}
&:hover img {
/* TODO: small zoom on hover */
transform: scaleZ(1.1);
}
}
.shoutAuthor,
.shoutDate {
2022-09-09 11:53:35 +00:00
@include font-size(1.2rem);
}
.shoutAuthor {
2022-09-09 11:53:35 +00:00
margin-right: 1.6rem;
a {
border: none;
color: rgb(0 0 0 / 70%);
position: relative;
z-index: 2;
2022-09-09 11:53:35 +00:00
&:hover {
color: #fff;
}
}
}
.shoutDate {
2022-09-09 11:53:35 +00:00
color: rgb(0 0 0 / 50%);
}
.shoutDetails {
2022-09-09 11:53:35 +00:00
display: flex;
}
.shoutCardTitle {
2022-09-09 11:53:35 +00:00
@include font-size(2.2rem);
font-weight: 700;
line-height: 1.25;
margin-bottom: 0.8rem;
}
.shoutCardTitle,
.shoutCardSubtitle {
2022-09-09 11:53:35 +00:00
&,
.shoutCardLinkContainer {
2022-09-09 11:53:35 +00:00
box-decoration-break: clone;
/* stylelint-disable-next-line */
-webkit-box-decoration-break: clone;
2022-09-09 11:53:35 +00:00
}
}
.shoutCardSubtitle {
2022-09-09 11:53:35 +00:00
color: #696969;
@include font-size(1.7rem);
font-weight: 400;
line-height: 1.3;
margin-bottom: 0.8rem;
transition: color 0.2s, background-color 0.2s, box-shadow 0.2s;
2022-09-09 11:53:35 +00:00
}
.shoutCardLinkContainer {
2022-09-09 11:53:35 +00:00
position: relative;
transition: color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.shoutCardEditControl {
2022-09-09 11:53:35 +00:00
border-radius: 2em;
min-height: 2.6em;
padding: 0 1.4em;
transition: background-color 0.2s, color 0.2s;
&:hover {
background: #000;
color: #fff;
}
}
.shoutCard.withcover {
2022-09-09 11:53:35 +00:00
padding: 2.4rem;
&,
a,
.shoutCardTitle,
.shoutCardSubtitle {
2022-09-09 11:53:35 +00:00
color: #fff;
}
.shoutCardCover {
2022-09-09 11:53:35 +00:00
height: 100%;
left: 0;
padding: 0;
position: absolute;
top: 0;
width: 100%;
z-index: -1;
&::after {
background: rgb(0 0 0 / 60%);
height: 100%;
position: absolute;
width: 100%;
z-index: 1;
}
}
}
.shoutCardType {
2022-09-09 11:53:35 +00:00
background: #fff;
border-radius: 100%;
height: 3.2rem;
position: absolute;
right: 0.8rem;
text-align: center;
top: 0.8rem;
transition: background-color 0.2s;
width: 3.2rem;
z-index: 2;
&:hover {
background: #000;
.icon {
filter: invert(1);
}
}
img {
height: auto;
left: 50%;
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
width: auto;
}
.icon {
height: 100%;
transition: filter 0.2s;
}
}
.shoutCardContent {
2022-09-09 11:53:35 +00:00
margin-bottom: 1em;
@include media-breakpoint-up(md) {
margin-bottom: 2em;
}
}
.floor--topics-group {
h3 {
&::first-letter {
text-transform: uppercase;
}
}
.col-md-6 .col-md-6 {
.shoutCard {
2022-09-09 11:53:35 +00:00
border-bottom: 1px solid rgb(255 255 255 / 20%);
margin: 3.6rem 0 0;
padding-bottom: 2rem;
&:first-child {
margin-top: 2rem;
}
&:last-child {
border: none;
padding-bottom: 0;
}
}
.shoutCardCoverContainer {
2022-09-09 11:53:35 +00:00
display: none;
}
.shoutCardTitle,
.shoutCardSubtitle {
2022-09-09 11:53:35 +00:00
display: inline;
@include font-size(2.6rem);
line-height: 1.2;
}
.shoutCardSubtitle {
2022-09-09 11:53:35 +00:00
color: #fff;
}
.shoutAuthor {
2022-09-09 11:53:35 +00:00
margin-top: 0.6em;
}
}
}
.shoutCardFloorImportant {
margin-bottom: $grid-gutter-width;
2022-09-09 11:53:35 +00:00
.shoutAuthor {
2022-09-09 11:53:35 +00:00
margin-top: 0.8rem;
a {
color: rgb(255 255 255 / 50%);
2022-09-09 11:53:35 +00:00
}
}
2022-09-09 11:53:35 +00:00
.shoutCardTitle {
a {
color: #fff;
2022-09-09 11:53:35 +00:00
}
}
a:hover {
background: #fff;
color: #000 !important;
}
.shoutCardTitlesContainer {
2022-09-09 11:53:35 +00:00
a {
color: #fff;
&:hover {
.shoutCardTitle .shoutCardLinkContainer {
2022-09-09 11:53:35 +00:00
background-color: #fff;
color: #000;
}
}
}
}
}
.shoutCardWithCover {
2022-09-09 11:53:35 +00:00
padding: 56.2% 2.4rem 0;
@include media-breakpoint-down(sm) {
padding-top: 100%;
}
&.swiper-slide {
.shoutCardContent {
2022-09-09 11:53:35 +00:00
@include media-breakpoint-down(md) {
padding-left: 10%;
}
}
}
&,
a,
.shoutCardTitle,
.shoutCardSubtitle {
2022-09-09 11:53:35 +00:00
color: #fff !important;
}
.shoutAuthor,
.shoutCardTitlesContainer {
2022-09-09 11:53:35 +00:00
a:hover {
&,
.shoutCardTitle .shoutCardLinkContainer {
2022-09-09 11:53:35 +00:00
background-color: #fff;
color: #000 !important;
}
}
}
.shoutCardCoverContainer,
.shoutCardCover,
.shoutCardContent {
2022-09-09 11:53:35 +00:00
height: 100%;
left: 0;
margin: 0;
position: absolute;
top: 0;
width: 100%;
z-index: -1;
}
.shoutCardContent {
2022-09-09 11:53:35 +00:00
display: flex;
flex-direction: column;
justify-content: end;
padding: 2.4rem;
z-index: 1;
}
.shoutCardCover {
2022-09-09 11:53:35 +00:00
padding: 0;
&::after {
background: rgb(0 0 0 / 60%);
content: '';
height: 100%;
position: absolute;
width: 100%;
z-index: 1;
}
}
.shoutCardTitle {
2022-09-09 11:53:35 +00:00
@include font-size(3.2rem);
}
}
.shoutCardContentTop {
.shoutCardContent {
2022-09-09 11:53:35 +00:00
justify-content: start;
}
}
.shoutCardPhotoBottom {
.shoutCardContent {
2022-09-09 11:53:35 +00:00
margin-bottom: 1.6rem;
}
.shoutCardCoverContainer {
2022-09-09 11:53:35 +00:00
order: 2;
}
}
.shoutCardFeed {
2022-09-09 11:53:35 +00:00
border-bottom: 1px solid #e8e8e8;
margin-bottom: 2em;
.shoutCardContent {
2022-09-09 11:53:35 +00:00
margin-bottom: 0;
}
}
.shoutCardDetails {
2022-09-09 11:53:35 +00:00
display: flex;
justify-content: space-between;
flex-wrap: wrap;
@include font-size(1.5rem);
padding: 1em 0 1.5em;
position: relative;
width: 100%;
z-index: 2;
}
.shoutCardDetailsContent {
2022-09-09 11:53:35 +00:00
display: flex;
}
.shoutCardDetailsTtem {
2022-09-09 11:53:35 +00:00
align-items: center;
display: flex;
margin-right: 1.7em;
img {
vertical-align: middle;
}
a,
button {
&:hover {
img {
opacity: 0.5;
}
}
}
}
.shoutCardComments {
2022-09-09 11:53:35 +00:00
align-items: center;
display: flex;
.icon {
display: inline-block;
margin: 0.2em 0.5em 0 0;
}
a {
&:hover {
background: none;
color: rgb(0 0 0 / 60%);
}
}
}
.rating {
align-items: center;
display: flex;
}
.ratingValue {
2022-09-09 11:53:35 +00:00
font-weight: bold;
margin: 0 0.5em;
}
.ratingControl {
2022-09-09 11:53:35 +00:00
align-items: center;
border: 2px solid;
border-radius: 100%;
display: flex;
justify-content: center;
height: 0.9em;
line-height: 0;
@include font-size(3.6rem);
padding: 0;
width: 0.9em;
&:hover {
background: #000;
border-color: #000;
color: #fff;
}
}
.shoutCardVertical {
aspect-ratio: auto;
height: 100%;
margin: 1.6rem 0;
padding: 0 0 20%;
2022-09-09 11:53:35 +00:00
@include media-breakpoint-up(md) {
aspect-ratio: 1 / 1.6;
padding: 0;
2022-09-09 11:53:35 +00:00
}
.shoutCardTitle {
2022-09-09 11:53:35 +00:00
font-size: 2.6rem !important;
@include media-breakpoint-between(lg, xl) {
font-size: 2.4rem !important;
}
}
.shoutCardContent {
2022-09-09 11:53:35 +00:00
justify-content: start;
position: relative;
.shoutCardSubtitle {
2022-09-09 11:53:35 +00:00
@include media-breakpoint-up(lg) {
@include font-size(2rem);
}
@include media-breakpoint-between(lg, xl) {
@include font-size(1.8rem);
}
}
}
}
.floor--9 {
/* TODO: refactor these styles */
.shoutCardTitle,
.shoutCardSubtitle {
2022-09-09 11:53:35 +00:00
// display: inline;
font-size: 2.2rem;
}
.shoutCardTitle {
2022-09-09 11:53:35 +00:00
padding-right: 0.25em;
}
.shoutAuthor,
.shoutDate {
2022-09-09 11:53:35 +00:00
margin-top: 0.8rem;
}
.beside-column .shoutCardTitlesContainer {
2022-09-09 11:53:35 +00:00
position: relative;
a:hover {
.shoutCardLinkContainer {
2022-09-09 11:53:35 +00:00
color: #fff;
}
}
}
}
.shoutCardBigTitle {
.shoutCardTitle {
2022-09-09 11:53:35 +00:00
display: block;
@include font-size(3.2rem);
padding-right: 0;
}
.shoutCardSubtitle {
2022-09-09 11:53:35 +00:00
color: #696969;
@include font-size(2.4rem);
}
}
.shoutCardCompact {
.shoutCardTitle,
.shoutCardSubtitle {
display: inline;
@include font-size(2.6rem);
line-height: 1.2;
}
.shoutCardSubtitle {
padding-left: 0.3em;
box-decoration-break: slice;
/* stylelint-disable-next-line */
-webkit-box-decoration-break: slice;
}
a {
color: #fff;
&:hover {
.shoutCardSubtitle {
background-color: #fff;
color: #000;
}
}
}
}
.shoutCardShort {
font-size: 1.4rem;
margin-bottom: 0;
.shoutCardTitle,
.shoutCardSubtitle {
display: inline;
@include font-size(1.4rem);
}
.shoutCardTitle {
padding-right: 0.25em;
}
a:hover {
.shoutCardLinkContainer {
color: #fff;
}
}
}