Osprey landing page and styling #632
2 changed files with 26 additions and 11 deletions
|
@ -9,3 +9,12 @@
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
width: calc(100% - 12px - 12px - 2px);
|
width: calc(100% - 12px - 12px - 2px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h6.list-title {
|
||||||
|
margin: 0;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
word-wrap: break-word;
|
||||||
|
overflow: hidden;
|
||||||
|
line-height: 1em;
|
||||||
|
max-height: 2em;
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
const AssetPreview = ({ defaultThumbnail, claimData: { name, claimId, fileExt, contentType, thumbnail } }) => {
|
const AssetPreview = ({ defaultThumbnail, claimData: { name, claimId, fileExt, contentType, thumbnail, title } }) => {
|
||||||
const embedUrl = `/${claimId}/${name}.${fileExt}`;
|
const embedUrl = `/${claimId}/${name}.${fileExt}`;
|
||||||
const showUrl = `/${claimId}/${name}`;
|
const showUrl = `/${claimId}/${name}`;
|
||||||
return (
|
return (
|
||||||
|
@ -13,19 +13,25 @@ const AssetPreview = ({ defaultThumbnail, claimData: { name, claimId, fileExt, c
|
||||||
case 'image/png':
|
case 'image/png':
|
||||||
case 'image/gif':
|
case 'image/gif':
|
||||||
return (
|
return (
|
||||||
|
<div>
|
||||||
|
<h6 class='list-title'>{title}</h6>
|
||||||
<img
|
<img
|
||||||
className={'asset-preview-image'}
|
className={'asset-preview-image'}
|
||||||
src={embedUrl}
|
src={embedUrl}
|
||||||
alt={name}
|
alt={name}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
case 'video/mp4':
|
case 'video/mp4':
|
||||||
return (
|
return (
|
||||||
|
<div>
|
||||||
|
<h6 class='list-title'>{title}</h6>
|
||||||
<img
|
<img
|
||||||
className={'asset-preview-video'}
|
className={'asset-preview-video'}
|
||||||
src={thumbnail || defaultThumbnail}
|
src={thumbnail || defaultThumbnail}
|
||||||
alt={name}
|
alt={name}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
default:
|
default:
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue