Skip to content

Commit

Permalink
Improve media preview sizing
Browse files Browse the repository at this point in the history
  • Loading branch information
giuscris committed Oct 24, 2024
1 parent 68e435e commit 4d9737d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion panel/src/scss/components/_pages.scss
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,16 @@
}

.page-file-preview-image {
max-height: 40.5rem;
max-height: 42.5rem;
object-fit: contain;
@include checkered-background(1.5rem, 0.125);
}

.page-file-preview-video {
width: 100%;
max-height: 42.5rem;
}

.page-file-preview-image.has-no-width {
width: 20rem;
}
Expand Down
2 changes: 1 addition & 1 deletion panel/views/pages/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<span class="caption"><?= $this->translate('panel.pages.file.preview') ?></span>
</div>
<div class="section-content page-file-preview-container">
<video style="width: 100%" controls playsinline>
<video class="page-file-preview-video" controls playsinline>
<source src="<?= $file->uri() ?>" type="<?= $file->mimeType() ?>" />
</video>
</div>
Expand Down

0 comments on commit 4d9737d

Please sign in to comment.