From 2dec9b5b10098201b6197441d1984f8ff3e4e909 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 21 Feb 2020 11:26:42 -0500 Subject: [PATCH] Adding a link overlay. Fixes #549 --- ui/assets/css/main.css | 10 +++++++++ ui/src/components/post-listing.tsx | 36 ++++++++++++++++++++---------- 2 files changed, 34 insertions(+), 12 deletions(-) diff --git a/ui/assets/css/main.css b/ui/assets/css/main.css index e7784877b..000201773 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 c0ddedc18..b3bde27fe 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) && (