media assets: add media asset preview component.

Add a view component for rendering thumbnails for media assets.

This lets us properly show thumbnails on the upload listing page and the
media assets listing page, including support for high pixel density thumbnails
and video length icons for videos.

Fixes not being able to see thumbnails on the /media_assets page.

This is mostly copy/pasted from the post preview component. FIXME: don't duplicate code.
This commit is contained in:
evazion
2022-01-30 14:17:43 -06:00
parent 43c4158d36
commit 5d2996d0c2
8 changed files with 130 additions and 17 deletions

View File

@@ -97,6 +97,7 @@ $spacer: 0.25rem; /* 4px */
.pr-2 { padding-right: 2 * $spacer; }
.pr-4 { padding-right: 4 * $spacer; }
.w-auto { width: auto; }
.w-sm { width: 24rem; }
.w-md { width: 28rem; }
.w-1\/4 { width: 25%; }
@@ -104,11 +105,17 @@ $spacer: 0.25rem; /* 4px */
.max-w-full { max-width: 100%; }
.h-1 { height: 1 * $spacer; }
.h-3 { height: 3 * $spacer; }
.h-10 { height: 10 * $spacer; }
.h-auto { height: auto; }
.h-1 { height: 1 * $spacer; }
.h-3 { height: 3 * $spacer; }
.h-10 { height: 10 * $spacer; }
.max-h-150px { max-height: 150px; }
.max-h-180px { max-height: 180px; }
.max-h-225px { max-height: 225px; }
.max-h-270px { max-height: 270px; }
.max-h-360px { max-height: 360px; }
.max-h-720px { max-height: 720px; }
.space-x-1 > * + * { margin-left: 1 * $spacer; }
.space-x-2 > * + * { margin-left: 2 * $spacer; }