mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-28 05:57:58 +01:00
135 lines
2.6 KiB
SCSS
135 lines
2.6 KiB
SCSS
.image-constrained {
|
|
@extend .flex__row--centered;
|
|
}
|
|
|
|
.media-list {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(var(--media-container-width), 1fr));
|
|
grid-auto-rows: 1fr;
|
|
grid-gap: var(--padding-small);
|
|
}
|
|
|
|
.media-list::before {
|
|
content: '';
|
|
width: 0;
|
|
padding-bottom: calc(100% + var(--media-header-height));
|
|
grid-row: 1 / 1;
|
|
grid-column: 1 / 1;
|
|
}
|
|
|
|
@include if-phone {
|
|
.media-list {
|
|
grid-template-columns: repeat(auto-fill, minmax(var(--media-small-container-width), 1fr));
|
|
}
|
|
}
|
|
|
|
.media-box {
|
|
background: var(--background-color);
|
|
border: 1px solid var(--secondary-muted-color);
|
|
border-radius: var(--border-radius-inner);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.media-box:first-child {
|
|
grid-row: 1 / 1;
|
|
grid-column: 1 / 1;
|
|
}
|
|
|
|
.media-box__header {
|
|
display: flex;
|
|
line-height: var(--media-header-height);
|
|
padding: 0 var(--padding-small);
|
|
justify-content: center;
|
|
font-size: var(--font-tiny-size);
|
|
}
|
|
|
|
.media-box__header--link-row {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr 1.5fr 1fr 1fr;
|
|
text-align: center;
|
|
width: fit-content;
|
|
}
|
|
|
|
.media-box__content {
|
|
width: 100%;
|
|
padding-top: 100%;
|
|
position: relative;
|
|
border-radius: 0 0 var(--border-radius-inner) var(--border-radius-inner);
|
|
overflow: hidden;
|
|
|
|
.image-container {
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
}
|
|
}
|
|
|
|
.media-box__content--featured {
|
|
.media-box__image {
|
|
max-height: var(--media-featured-width);
|
|
}
|
|
}
|
|
|
|
.media-box__overlay {
|
|
display: block;
|
|
position: absolute;
|
|
z-index: 4;
|
|
min-width: 95%;
|
|
text-align: left;
|
|
font-weight: bold;
|
|
word-wrap: break-word;
|
|
color: var(--text-color);
|
|
background: var(--primary-color);
|
|
padding: 0 var(--padding-normal);
|
|
line-height: var(--media-header-height);
|
|
pointer-events: none;
|
|
top: 0;
|
|
}
|
|
|
|
.media-box__overlay:nth-child(2) {
|
|
top: var(--media-header-height);
|
|
}
|
|
|
|
.image-container {
|
|
@extend .flex__column--centered;
|
|
}
|
|
|
|
.image-container a {
|
|
display: flex;
|
|
max-height: 100%;
|
|
|
|
// For some reason tall images don't center properly within the container
|
|
// without this hack. I blame CSS.
|
|
& > img {
|
|
max-height: 100%;
|
|
margin: auto;
|
|
}
|
|
}
|
|
|
|
.media-box__image {
|
|
max-width: 100%;
|
|
height: auto;
|
|
}
|
|
|
|
.media-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
grid-template-rows: auto;
|
|
grid-gap: var(--padding-small);
|
|
}
|
|
|
|
.image-scaled {
|
|
max-width: 100%;
|
|
}
|
|
|
|
.media-tiny-container {
|
|
width: var(--media-tiny-container-width);
|
|
height: var(--media-tiny-container-width);
|
|
}
|
|
|
|
.thumb_tiny {
|
|
max-width: var(--media-tiny-container-width);
|
|
max-height: var(--media-tiny-container-width);
|
|
}
|