diff --git a/client/src/routes/Details/AssetDetails.tsx b/client/src/routes/Details/AssetDetails.tsx index 5fbeffe..d79736f 100644 --- a/client/src/routes/Details/AssetDetails.tsx +++ b/client/src/routes/Details/AssetDetails.tsx @@ -10,6 +10,13 @@ interface AssetDetailsProps { } export default class AssetDetails extends PureComponent { + private datafilesLine = (files: any) => { + if (files.length === 1) { + return {files.length} data file + } + return {files.length} data files + } + public render() { const { metadata, ddo } = this.props const { base } = metadata @@ -32,18 +39,14 @@ export default class AssetDetails extends PureComponent { /> - {base.categories ? ( + {base.categories && ( // TODO: Make this link to search for respective category {base.categories[0]} - ) : ( - Fake Category )} - {base.files && ( - {base.files.length} data files - )} + {base.files && this.datafilesLine(base.files)} diff --git a/client/src/routes/Details/AssetFilesDetails.module.scss b/client/src/routes/Details/AssetFilesDetails.module.scss index 9eb32b5..9709932 100644 --- a/client/src/routes/Details/AssetFilesDetails.module.scss +++ b/client/src/routes/Details/AssetFilesDetails.module.scss @@ -18,16 +18,29 @@ .file { display: inline-block; - border: .1rem solid $brand-grey-light; + background: $brand-grey; padding: $spacer $spacer / 2; text-align: left; margin-left: $spacer / 4; margin-right: $spacer / 4; + position: relative; + min-height: 100px; + + &:before { + content: ''; + position: absolute; + right: 0; + top: 0; + width: 0; + height: 0; + border-top: 1rem solid $body-background; + border-left: 1rem solid transparent; + } li { font-size: $font-size-small; font-weight: $font-weight-bold; - color: $brand-grey-light; + color: $brand-white; &:before { display: none; diff --git a/client/src/styles/_variables.scss b/client/src/styles/_variables.scss index bd89d12..c645247 100644 --- a/client/src/styles/_variables.scss +++ b/client/src/styles/_variables.scss @@ -18,6 +18,8 @@ $yellow: #eac146; $brand-gradient: linear-gradient(to right bottom, $brand-purple, $brand-pink); +$body-background: darken($brand-white, 1%); + // Fonts $font-family-base: 'Sharp Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; diff --git a/client/src/styles/global.scss b/client/src/styles/global.scss index 006cac5..f48f88d 100644 --- a/client/src/styles/global.scss +++ b/client/src/styles/global.scss @@ -29,7 +29,7 @@ body { font-family: $font-family-base; font-weight: $font-weight-base; line-height: $line-height; - background: darken($brand-white, 1%); + background: $body-background; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;