From: Dessalines Date: Fri, 21 Feb 2020 16:26:42 +0000 (-0500) Subject: Adding a link overlay. Fixes #549 X-Git-Url: http://these/git/%7B%60https:/%7B%60css/themes/%22https:/nerdica.net/%7Bpost.url%7D?a=commitdiff_plain;h=2dec9b5b10098201b6197441d1984f8ff3e4e909;p=lemmy.git Adding a link overlay. Fixes #549 --- diff --git a/ui/assets/css/main.css b/ui/assets/css/main.css index e7784877..00020177 100644 --- a/ui/assets/css/main.css +++ b/ui/assets/css/main.css @@ -187,3 +187,13 @@ hr { color: var(--white); border: unset; } + +.link-overlay { + position: absolute; + top: 0; + right: 0; + padding: 2px; + background: rgba(0,0,0,.4); + border-bottom-left-radius: 0.25rem !important; + border-top-right-radius: 0.25rem !important; +} diff --git a/ui/src/components/post-listing.tsx b/ui/src/components/post-listing.tsx index c0ddedc1..b3bde27f 100644 --- a/ui/src/components/post-listing.tsx +++ b/ui/src/components/post-listing.tsx @@ -162,18 +162,30 @@ export class PostListing extends Component { )} {this.hasImage() && !this.state.imageExpanded && ( - - - +
+ + + + + + + + +
)} {this.state.url && isVideo(this.state.url) && (