Osprey landing page and styling #632

Merged
daovist merged 6 commits from multisite-styling into master 2018-10-15 19:42:36 +02:00
2 changed files with 26 additions and 11 deletions
Showing only changes of commit b87a768803 - Show all commits

View file

@ -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;
}

View file

@ -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 (