Osprey landing page and styling #632

Merged
daovist merged 6 commits from multisite-styling into master 2018-10-15 19:42:36 +02:00
4 changed files with 33 additions and 55 deletions
Showing only changes of commit 622cbcfb74 - Show all commits

View file

@ -1,16 +1,16 @@
.asset-preview-image { .asset-preview-image {
width : 100%; width : 100%;
padding: 0px; padding: 0;
margin : 0px margin : 0;
} }
.asset-preview-video { .asset-preview-video {
cursor: pointer; cursor: pointer;
background-color: #ffffff; background-color: #ffffff;
width: calc(100% - 12px - 12px - 2px); width: 100%;
} }
h3.list-title { h6.list-title {
margin: 0; margin: 0;
text-overflow: ellipsis; text-overflow: ellipsis;
word-wrap: break-word; word-wrap: break-word;

View file

@ -1,5 +1,26 @@
.channel-claims-display { .channel-claims-display {
display: grid;
grid-gap: 16px;
.button--secondary { .button--secondary {
margin-right: $secondary-padding; margin-right: $secondary-padding;
} }
} }
@media (min-width: 1040px) {
.channel-claims-display {
grid-template-columns: 1fr 1fr 1fr 1fr;
}
}
@media (min-width: 768px) and (max-width: 1039px) {
.channel-claims-display {
grid-template-columns: 1fr 1fr;
}
}
@media (max-width: 767px) {
.channel-claims-display {
grid-template-columns: 1fr;
}
}

View file

@ -5,7 +5,7 @@ const AssetPreview = ({ defaultThumbnail, claimData: { name, claimId, fileExt, c
const embedUrl = `/${claimId}/${name}.${fileExt}`; const embedUrl = `/${claimId}/${name}.${fileExt}`;
const showUrl = `/${claimId}/${name}`; const showUrl = `/${claimId}/${name}`;
return ( return (
<Link to={showUrl} > <Link to={showUrl} className='asset-preview'>
{(() => { {(() => {
switch (contentType) { switch (contentType) {
case 'image/jpeg': case 'image/jpeg':

View file

@ -27,59 +27,16 @@ class ChannelClaimsDisplay extends React.Component {
} }
render () { render () {
const {channel: {claimsData: {claims, currentPage, totalPages}}, defaultThumbnail} = this.props; const {channel: {claimsData: {claims, currentPage, totalPages}}, defaultThumbnail} = this.props;
const groupedClaimsList = createGroupedList(claims, 4);
if (claims.length > 0) { if (claims.length > 0) {
return ( return (
<div className={'channel-claims-display'}> <div className={'channel-claims-display'}>
<div> {claims.map(claim => (
{groupedClaimsList.map((group, index) => {
const itemA = group[0];
const itemB = group[1];
const itemC = group[2];
const itemD = group[3];
return (
<HorizontalQuadSplit
key={`claims-row-${index}`}
columnA={
itemA && (
<AssetPreview <AssetPreview
defaultThumbnail={defaultThumbnail} defaultThumbnail={defaultThumbnail}
claimData={itemA} claimData={claim}
key={`${itemA.name}-${itemA.id}`} key={`${claim.name}-${claim.id}`}
/> />
) ))}
}
columnB={
itemB && (
<AssetPreview
defaultThumbnail={defaultThumbnail}
claimData={itemB}
key={`${itemB.name}-${itemB.id}`}
/>
)
}
columnC={
itemC && (
<AssetPreview
defaultThumbnail={defaultThumbnail}
claimData={itemC}
key={`${itemC.name}-${itemC.id}`}
/>
)
}
columnD={
itemD && (
<AssetPreview
defaultThumbnail={defaultThumbnail}
claimData={itemD}
key={`${itemD.name}-${itemD.id}`}
/>
)
}
/>
);
})}
</div>
<Row> <Row>
{(currentPage > 1) && {(currentPage > 1) &&
<ButtonSecondary <ButtonSecondary