fix: responsive layout on file page for #2219 #2226

Merged
neb-b merged 1 commit from responsive into master 2019-01-27 00:42:33 +01:00
4 changed files with 13 additions and 17 deletions

View file

@ -18,7 +18,7 @@
position: absolute;
background-position: 50% 50%;
background-repeat: no-repeat;
background-size: cover;
background-size: 100%;
margin: auto;
&:not(.card__media--nsfw) {

View file

@ -14,28 +14,23 @@
}
.main--file-page {
max-width: 1787px;
max-width: var(--file-page-max-width);
display: grid;
grid-template-areas:
'content related'
'info related';
grid-gap: var(--spacing-vertical-large);
grid-template-rows: auto 1fr;
grid-template-columns: 1fr auto;
grid-template-areas:
'content content'
'info related';
// TODO: Get responsive grid working, to many issues with different thumbnails messing stuff up on small screens with the file taking up the full width
// I will conquer this one day
// grid-template-areas:
// 'content content'
// 'info related';
//
// @media (min-width: 1470px) {
//
// }
@media (min-width: 1470px) {
grid-template-areas:
'content related'
'info related';
}
.grid-area--content {
grid-area: content;
max-width: var(--file-max-width);
}
.grid-area--info {
grid-area: info;

View file

@ -17,6 +17,7 @@
font-size: 1.15rem;
margin-bottom: var(--spacing-vertical-medium);
white-space: pre-line;
word-break: break-all;
svg {
width: 1rem;

View file

@ -18,9 +18,9 @@ $large-breakpoint: 1921px;
--spacing-vertical-medium: calc(2rem / 2);
--spacing-vertical-large: 2rem;
--file-max-width: 1400px;
// --file-max-height: calc(var(--file-max-height) * 9 / 16);
--file-page-max-width: 1787px;
--file-max-height: 788px;
--file-max-width: 1400px;
--video-aspect-ratio: 56.25%; // 9 x 16