mirror of
https://github.com/urbit/shrub.git
synced 2024-12-24 03:14:30 +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) {
|
if (imgMatch) {
|
||||||
embed = <a href={props.url}
|
embed = <a href={props.url}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
className="db m0a"
|
|
||||||
style={{width: "max-content"}}>
|
style={{width: "max-content"}}>
|
||||||
<img src={props.url} style={{maxHeight: "500px", maxWidth: "500px"}}/>
|
<img src={props.url} style={{maxHeight: "500px", maxWidth: "100%"}}/>
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,7 +96,7 @@ export class LinkPreview extends Component {
|
|||||||
return (
|
return (
|
||||||
<div className="pb6 w-100">
|
<div className="pb6 w-100">
|
||||||
<div
|
<div
|
||||||
className={"w-100 " + (ytMatch ? "embed-container" : "")}>
|
className={"w-100 tc " + (ytMatch ? "embed-container" : "")}>
|
||||||
{embed}
|
{embed}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-column ml2 pt6">
|
<div className="flex flex-column ml2 pt6">
|
||||||
|
Loading…
Reference in New Issue
Block a user