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

802 lines
12 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;
2022-10-20 15:51:45 +00:00
@include media-breakpoint-up(md) {
&:last-child {
margin-bottom: 0;
}
}
2022-09-09 11:53:35 +00:00
&:hover {
.shoutCardCover img {
2022-09-09 11:53:35 +00:00
transform: scale(1.05);
}
}
2023-06-27 22:47:47 +00:00
.icon {
display: inline-block;
height: 24px;
width: 24px;
2022-09-09 11:53:35 +00:00
}
2022-11-27 17:02:04 +00:00
2023-06-27 22:47:47 +00:00
.iconHover {
display: none;
}
button,
a:link {
border: none;
&:hover {
color: var(--default-color);
.icon {
display: none;
}
.iconHover {
display: inline-block;
}
}
2022-11-27 17:02:04 +00:00
}
2023-01-25 22:13:01 +00:00
.feedControlIcon {
2023-03-13 20:19:10 +00:00
max-width: 2em;
2023-05-11 11:52:56 +00:00
vertical-align: text-bottom;
2023-01-25 22:13:01 +00:00
}
2022-09-09 11:53:35 +00:00
}
.shoutCardWithBorder {
2023-05-25 20:48:36 +00:00
border-top: 2px solid #141414;
margin-top: 2.4rem !important;
padding-top: 2.4rem;
}
2023-07-09 18:34:59 +00:00
.shoutCardLinkWrapper {
background-color: transparent;
transition: background-color 0.3s;
}
.shoutCardTitlesContainer {
2023-07-09 18:34:59 +00:00
&.shoutCardTitlesContainerFeedMode {
margin-bottom: 1.4rem;
}
2023-05-25 20:48:36 +00:00
a:link {
border: none;
&::before {
2022-09-09 11:53:35 +00:00
content: '';
2023-08-30 21:49:29 +00:00
height: 100%;
2022-09-09 11:53:35 +00:00
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: 1;
}
&:hover {
2023-07-09 18:34:59 +00:00
.shoutCardTitle .shoutCardLinkWrapper {
2023-06-27 22:47:47 +00:00
background-color: var(--default-color);
color: var(--link-hover-color);
2022-09-09 11:53:35 +00:00
}
}
}
}
.shoutCardCoverContainer {
2022-09-09 11:53:35 +00:00
position: relative;
}
.shoutCardCover {
2023-08-12 14:17:00 +00:00
background: rgb(0 0 0 / 30%);
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 {
2023-10-17 22:53:29 +00:00
@include font-size(1.4rem);
2023-05-25 20:48:36 +00:00
font-weight: 500;
2022-09-09 11:53:35 +00:00
margin-right: 1.6rem;
2023-05-25 20:48:36 +00:00
a:link {
2022-09-09 11:53:35 +00:00
border: none;
2023-06-08 21:29:20 +00:00
color: rgb(0 0 0 / 90%);
position: relative;
z-index: 2;
2022-09-09 11:53:35 +00:00
&:hover {
color: #fff;
}
}
}
.shoutDate {
2023-08-12 14:17:00 +00:00
color: #9fa1a7;
font-weight: 500;
2023-10-17 22:53:29 +00:00
@include font-size(1.2rem);
2022-09-09 11:53:35 +00:00
}
.shoutDetails {
2023-10-17 22:53:29 +00:00
align-items: end;
2022-09-09 11:53:35 +00:00
display: flex;
2023-06-21 20:32:16 +00:00
margin-bottom: 1rem;
}
.shoutDetailsFeedMode {
justify-content: space-between;
2023-10-17 22:53:29 +00:00
.shoutAuthor {
2023-06-21 20:32:16 +00:00
@include font-size(1.2rem);
}
2022-09-09 11:53:35 +00:00
}
.shoutCardTitle {
2022-09-09 11:53:35 +00:00
@include font-size(2.2rem);
font-weight: 700;
2023-06-27 22:47:47 +00:00
line-height: 1.2;
2022-09-09 11:53:35 +00:00
margin-bottom: 0.8rem;
2023-05-29 19:27:25 +00:00
:global(.col-md-12) & {
@include font-size(2.6rem);
}
2022-09-09 11:53:35 +00:00
}
.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
}
2023-06-21 20:32:16 +00:00
.shoutCardTitlesContainerFeedMode & {
@include font-size(3.2rem);
2023-07-09 18:34:59 +00:00
line-height: 1.1;
2023-06-21 20:32:16 +00:00
}
2022-09-09 11:53:35 +00:00
}
.shoutCardDescription {
@include font-size(1.6rem);
color: var(--default-color);
margin-bottom: 1.4rem;
}
.shoutCardSubtitle {
2023-05-25 20:48:36 +00:00
@include font-size(1.8rem);
color: #141414;
2022-09-09 11:53:35 +00:00
font-weight: 400;
line-height: 1.3;
2023-05-25 20:48:36 +00:00
margin-bottom: 1.4rem;
2023-10-17 22:53:29 +00:00
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;
2023-10-17 22:53:29 +00:00
transition:
color 0.2s,
background-color 0.2s,
box-shadow 0.2s;
2022-09-09 11:53:35 +00:00
}
.shoutCardEditControl {
2022-09-09 11:53:35 +00:00
border-radius: 2em;
min-height: 2.6em;
padding: 0 1.4em;
2023-10-17 22:53:29 +00:00
transition:
background-color 0.2s,
color 0.2s;
2022-09-09 11:53:35 +00:00
&:hover {
background: var(--background-color-invert);
color: var(--default-color-invert);
2022-09-09 11:53:35 +00:00
}
}
.shoutCard.withcover {
2022-09-09 11:53:35 +00:00
padding: 2.4rem;
&,
a,
.shoutCardTitle,
.shoutCardSubtitle {
color: var(--default-color-invert);
2022-09-09 11:53:35 +00:00
}
.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
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;
2023-06-27 22:47:47 +00:00
a:link {
background: var(--default-color-invert);
2023-06-27 22:47:47 +00:00
border-radius: 100%;
display: block;
height: 100%;
width: 100%;
&:hover {
background: var(--background-color-invert);
2022-09-09 11:53:35 +00:00
2023-06-27 22:47:47 +00:00
.icon {
2023-07-09 18:34:59 +00:00
display: inline-block;
2023-06-27 22:47:47 +00:00
filter: invert(1);
}
2022-09-09 11:53:35 +00:00
}
}
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
@include media-breakpoint-up(md) {
margin-bottom: 2em;
2022-10-20 15:51:45 +00:00
&:last-child {
margin-bottom: 0;
}
2022-09-09 11:53:35 +00:00
}
}
.floor--topics-group {
h3 {
&::first-letter {
text-transform: uppercase;
}
}
2023-03-10 17:42:48 +00:00
.col-md-12 .col-md-12 {
.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
@include font-size(2.6rem);
2023-05-01 18:32:32 +00:00
display: inline;
2022-09-09 11:53:35 +00:00
line-height: 1.2;
}
.shoutCardSubtitle {
color: var(--background-color-invert);
2022-09-09 11:53:35 +00:00
}
.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;
2023-05-29 19:27:25 +00:00
a:link,
a:visited {
color: rgb(255 255 255 / 50%);
2022-09-09 11:53:35 +00:00
}
2023-05-29 19:27:25 +00:00
a:hover {
background-color: var(--background-color) !important;
2022-09-09 11:53:35 +00:00
}
}
2023-05-29 19:27:25 +00:00
a:link,
a:visited {
color: var(--default-color-invert);
2023-05-29 19:27:25 +00:00
}
a:hover {
background: var(--background-color);
color: var(--default-color);
}
.shoutCardTitlesContainer {
2023-05-25 20:48:36 +00:00
a:link {
border: none;
color: var(--default-color-invert);
2022-09-09 11:53:35 +00:00
&:hover {
.shoutCardTitle .shoutCardLinkContainer {
background-color: var(--background-color);
color: var(--default-color);
2022-09-09 11:53:35 +00:00
}
}
}
}
2023-06-08 21:10:12 +00:00
2023-06-12 19:59:46 +00:00
.shoutCardSubtitle {
color: rgb(255 255 255 / 50%);
2023-06-12 19:59:46 +00:00
}
2023-06-08 21:10:12 +00:00
&:global(.swiper-slide-active) .shoutCardCover {
&::after {
2023-06-08 21:10:12 +00:00
background: linear-gradient(to bottom, rgb(0 0 0 / 0%) 40%, rgb(0 0 0 / 70%) 100%);
}
}
2022-09-09 11:53:35 +00:00
}
.shoutCardWithCover {
2023-05-29 20:46:30 +00:00
aspect-ratio: 16/9;
2023-09-27 21:28:32 +00:00
//padding: 0 2.4rem;
2023-05-29 20:46:30 +00:00
width: 100%;
2022-09-09 11:53:35 +00:00
2023-09-02 22:14:34 +00:00
@include media-breakpoint-down(xl) {
aspect-ratio: auto;
height: 100%;
padding-top: 30%;
2022-09-09 11:53:35 +00:00
}
&.swiper-slide {
.shoutCardContent {
2022-09-09 11:53:35 +00:00
@include media-breakpoint-down(md) {
padding-left: 10%;
}
}
}
2023-08-12 14:17:00 +00:00
&.shoutCardNoImage {
background: rgb(0 0 0 / 50%);
}
2022-09-09 11:53:35 +00:00
&,
a,
.shoutCardTitle,
.shoutCardSubtitle {
color: var(--default-color-invert) !important;
2022-09-09 11:53:35 +00:00
}
.shoutAuthor,
.shoutCardTitlesContainer {
2022-09-09 11:53:35 +00:00
a:hover {
&,
.shoutCardTitle .shoutCardLinkContainer {
background-color: var(--background-color);
color: var(--default-color) !important;
2022-09-09 11:53:35 +00:00
}
}
}
.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;
2023-09-02 22:14:34 +00:00
@include media-breakpoint-down(xl) {
position: relative;
}
2022-09-09 11:53:35 +00:00
}
.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);
}
2023-05-29 20:46:30 +00:00
2023-06-02 22:01:34 +00:00
.shoutTopic a {
&:link,
2023-06-02 22:01:34 +00:00
&:visited {
&:hover {
background: var(--background-color) !important;
color: var(--default-color) !important;
2023-06-02 22:01:34 +00:00
}
}
2023-05-29 20:46:30 +00:00
}
2022-09-09 11:53:35 +00:00
}
.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 {
2023-06-27 22:47:47 +00:00
margin: 4em 0;
&:first-of-type {
margin-top: 0;
}
2022-09-09 11:53:35 +00:00
.shoutCardContent {
2022-09-09 11:53:35 +00:00
margin-bottom: 0;
}
}
.shoutCardDetails {
2023-02-10 01:19:20 +00:00
@include font-size(1.5rem);
2023-02-06 21:35:08 +00:00
align-items: flex-start;
border-top: 2px solid var(--black-500);
2022-09-09 11:53:35 +00:00
display: flex;
justify-content: space-between;
flex-wrap: wrap;
2023-01-25 22:13:01 +00:00
margin-top: 1em;
2023-02-06 21:35:08 +00:00
padding: 1em 0 0;
2022-09-09 11:53:35 +00:00
position: relative;
width: 100%;
2023-02-06 21:35:08 +00:00
z-index: 3;
2022-09-09 11:53:35 +00:00
}
2023-05-16 19:17:47 +00:00
.shoutCardDetailsActive {
z-index: 4;
}
.shoutCardDetailsContent {
2022-09-09 11:53:35 +00:00
display: flex;
font-size: 1.2rem;
font-weight: bold;
2023-02-06 21:35:08 +00:00
&:first-child {
padding: 0 1em 1em 0;
2023-07-09 18:34:59 +00:00
.shoutCardDetailsItem {
margin-right: 2rem;
}
2023-02-06 21:35:08 +00:00
}
2022-09-09 11:53:35 +00:00
}
2022-10-25 21:45:37 +00:00
.shoutCardDetailsItem {
2022-09-09 11:53:35 +00:00
align-items: center;
display: flex;
2023-06-27 22:47:47 +00:00
margin-right: 1.2rem;
2023-01-25 22:13:01 +00:00
white-space: nowrap;
&:last-child {
margin-right: 0;
}
2022-09-09 11:53:35 +00:00
img {
vertical-align: middle;
}
2023-06-27 22:47:47 +00:00
a:link {
border: none;
2022-09-09 11:53:35 +00:00
&:hover {
2023-06-27 22:47:47 +00:00
background: none;
2022-09-09 11:53:35 +00:00
}
}
}
2023-01-25 22:13:01 +00:00
.shoutCardComments,
.shoutCardDetailsViewed {
2022-09-09 11:53:35 +00:00
align-items: center;
display: flex;
.icon {
margin: 0 0.5em 0 0;
vertical-align: middle;
2022-09-09 11:53:35 +00:00
}
2023-06-27 22:47:47 +00:00
a:link {
2022-09-09 11:53:35 +00:00
&:hover {
background: none;
2023-02-06 21:35:08 +00:00
2023-06-27 22:47:47 +00:00
.shoutCardLinkContainer {
background: var(--default-color);
2023-10-25 21:00:21 +00:00
color: var(--link-hover-color);
2023-02-06 21:35:08 +00:00
}
2022-09-09 11:53:35 +00:00
}
}
}
.shoutCardVertical {
aspect-ratio: auto;
height: 100%;
2023-05-29 20:46:30 +00:00
min-height: 250px;
2022-10-20 15:51:45 +00:00
margin: 0;
2023-05-29 20:46:30 +00:00
padding: 0;
2022-09-09 11:53:35 +00:00
2023-05-29 20:46:30 +00:00
@include media-breakpoint-up(sm) {
aspect-ratio: 2/1;
}
@include media-breakpoint-up(md) {
aspect-ratio: 1/1;
}
@include media-breakpoint-up(lg) {
aspect-ratio: 1/1.6;
2022-09-09 11:53:35 +00:00
}
2023-05-29 19:27:25 +00:00
.shoutCardTitle,
.shoutCardSubtitle {
font-size: 2.2rem !important;
2022-09-09 11:53:35 +00:00
@include media-breakpoint-between(lg, xl) {
2023-05-29 19:27:25 +00:00
font-size: 1.8rem !important;
2022-09-09 11:53:35 +00:00
}
}
.shoutCardContent {
2022-09-09 11:53:35 +00:00
justify-content: start;
position: relative;
2023-05-29 19:27:25 +00:00
}
2022-09-09 11:53:35 +00:00
2023-05-29 19:27:25 +00:00
.shoutDate {
color: rgb(255 255 255 / 50%);
2022-09-09 11:53:35 +00:00
}
}
.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 {
color: var(--default-color-invert);
2022-09-09 11:53:35 +00:00
}
}
}
}
.shoutCardBigTitle {
.shoutCardTitle {
2023-06-08 21:29:20 +00:00
@include font-size(3.2rem);
2023-05-01 18:32:32 +00:00
display: block;
2022-09-09 11:53:35 +00:00
padding-right: 0;
}
.shoutCardSubtitle {
2023-05-26 19:22:24 +00:00
@include font-size(2.6rem);
2022-09-09 11:53:35 +00:00
}
}
.shoutCardCompact {
.shoutCardTitle,
.shoutCardSubtitle {
2023-05-29 19:27:25 +00:00
@include font-size(2.2rem);
2023-05-01 18:32:32 +00:00
display: inline;
line-height: 1.2;
}
2023-06-12 19:59:46 +00:00
.shoutCardTitle {
padding-right: 0.3em;
}
.shoutCardSubtitle {
box-decoration-break: slice;
/* stylelint-disable-next-line */
-webkit-box-decoration-break: slice;
}
2023-05-29 19:27:25 +00:00
a:link {
background: none !important;
}
}
.shoutCardShort {
font-size: 1.4rem;
margin-bottom: 0;
2023-09-18 20:28:39 +00:00
position: static;
.shoutCardTitle,
.shoutCardSubtitle {
2023-06-05 21:56:36 +00:00
@include font-size(1.8rem);
display: inline;
}
.shoutCardSubtitle {
color: var(--default-color);
}
.shoutCardTitle {
padding-right: 0.25em;
}
2023-06-05 21:56:36 +00:00
.shoutCardTitlesContainer {
a {
padding: 0.3em 0;
}
}
a:hover {
.shoutCardLinkContainer {
color: var(--default-color-invert);
}
}
}
2022-10-17 16:24:16 +00:00
.shoutCardSingle {
@include media-breakpoint-up(md) {
flex-direction: row;
.shoutCardTitlesContainer {
flex: 1;
}
.shoutCardCover {
margin-bottom: 0;
}
.shoutCardCoverContainer {
flex: 1 58.3333%;
}
.shoutCardContent {
display: flex;
flex-direction: column;
flex: 1 41.6666%;
justify-content: space-between;
margin-bottom: 0;
padding-left: 4rem;
}
.shoutTopic {
margin-bottom: 3.2rem;
}
.shoutCardTitle {
margin-bottom: 2.4rem;
}
.shoutAuthor {
align-items: end;
display: flex;
flex: 1;
}
}
.shoutCardType {
top: 0;
}
.shoutCardTitle {
@include font-size(4rem);
2022-10-17 16:24:16 +00:00
font-weight: 900;
line-height: 1.1;
}
.shoutCardSubtitle {
2023-05-01 18:32:32 +00:00
@include font-size(2.4rem);
2022-10-17 16:24:16 +00:00
flex: 1;
}
}
2022-11-16 21:08:04 +00:00
.shoutCardBeside {
&,
.shoutCardCoverContainer {
flex: 1;
}
}
2023-06-05 21:56:36 +00:00
.shoutTopicTop {
margin-bottom: 0.4rem !important;
}