mirror of
https://github.com/urbit/shrub.git
synced 2024-12-18 15:55:00 +03:00
Merge pull request #2274 from urbit/m/link-fe-previews
link fe: properly downscale wide images to fit screen
This commit is contained in:
commit
ffff42d371
@ -74,9 +74,8 @@ export class LinkPreview extends Component {
|
||||
if (imgMatch) {
|
||||
embed = <a href={props.url}
|
||||
target="_blank"
|
||||
className="db m0a"
|
||||
style={{width: "max-content"}}>
|
||||
<img src={props.url} style={{maxHeight: "500px", maxWidth: "500px"}}/>
|
||||
<img src={props.url} style={{maxHeight: "500px", maxWidth: "100%"}}/>
|
||||
</a>
|
||||
}
|
||||
|
||||
@ -97,7 +96,7 @@ export class LinkPreview extends Component {
|
||||
return (
|
||||
<div className="pb6 w-100">
|
||||
<div
|
||||
className={"w-100 " + (ytMatch ? "embed-container" : "")}>
|
||||
className={"w-100 tc " + (ytMatch ? "embed-container" : "")}>
|
||||
{embed}
|
||||
</div>
|
||||
<div className="flex flex-column ml2 pt6">
|
||||
|
Loading…
Reference in New Issue
Block a user