From e0fdb36551a280caf09bc2f786a69e93ea79b7dd Mon Sep 17 00:00:00 2001 From: bill bittner Date: Sat, 24 Feb 2018 10:05:28 -0800 Subject: [PATCH 1/2] added height and width constraints to showlite --- public/assets/css/general.css | 25 ++++++++++++++++++------- react/components/AssetDisplay/view.jsx | 18 +++++++++--------- react/components/ShowAssetLite/view.jsx | 14 +++++++------- 3 files changed, 34 insertions(+), 23 deletions(-) diff --git a/public/assets/css/general.css b/public/assets/css/general.css index 3f6d439c..4ac2a76c 100644 --- a/public/assets/css/general.css +++ b/public/assets/css/general.css @@ -540,19 +540,30 @@ table { margin : 0px } +/* show */ + .asset { - width: 100%; + max-width: 100%; } -#show-body #asset-boilerpate { - display: none; -} - -#showlite-body #asset-display-component { - max-width: 50%; +/* show lite */ +#show-lite-container { text-align: center; } +#show-lite-container #asset-display-component { + max-height: calc(100vh - 3em); +} + +#show-lite-container #asset-display-component .asset { + max-height: calc(100vh - 3em); + max-width: 100vw; +} + +#asset-boilerplate { + max-height: 3em; +} + /* video */ #video-asset { diff --git a/react/components/AssetDisplay/view.jsx b/react/components/AssetDisplay/view.jsx index 733f1bd1..bfc85ca5 100644 --- a/react/components/AssetDisplay/view.jsx +++ b/react/components/AssetDisplay/view.jsx @@ -10,7 +10,7 @@ class AssetDisplay extends React.Component { render () { const { status, error, asset: { claimData: { name, claimId, contentType, fileExt, thumbnail } } } = this.props; return ( -
+
{(status === LOCAL_CHECK) &&

Checking to see if Spee.ch has your asset locally...

@@ -19,14 +19,14 @@ class AssetDisplay extends React.Component { {(status === UNAVAILABLE) &&

Sit tight, we're searching the LBRY blockchain for your asset!

- -

Curious what magic is happening here? Learn more.

+ +

Curious what magic is happening here? Learn more.

} {(status === ERROR) &&
-

Unfortunately, we couldn't download your asset from LBRY. You can help us out by sharing the below error message in the LBRY discord.

-

{error}

+

Unfortunately, we couldn't download your asset from LBRY. You can help us out by sharing the below error message in the LBRY discord.

+

{error}

} {(status === AVAILABLE) && @@ -37,21 +37,21 @@ class AssetDisplay extends React.Component { case 'image/png': return ( {name}/ + alt={name} /> ); case 'image/gif': return ( {name} ); case 'video/mp4': return ( -