From e58188d13640721d2da866bfbab9c036df7acb5d Mon Sep 17 00:00:00 2001 From: Diogo Cordeiro Date: Tue, 7 Apr 2020 02:45:48 +0100 Subject: [PATCH] [UI] Small improvement on attachment's visual --- lib/media/attachmentlistitem.php | 2 ++ .../SensitiveContent/SensitiveContentPlugin.php | 17 +++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/media/attachmentlistitem.php b/lib/media/attachmentlistitem.php index c5455b8220..ebb7e0bdfc 100644 --- a/lib/media/attachmentlistitem.php +++ b/lib/media/attachmentlistitem.php @@ -111,6 +111,8 @@ class AttachmentListItem extends Widget $this->out->element('a', $this->linkAttr(), $this->title()); $this->out->elementEnd('label'); + $this->out->element('br'); + if (!empty($enclosure->mimetype)) { // First, prepare a thumbnail if it exists. $thumb = null; diff --git a/plugins/SensitiveContent/SensitiveContentPlugin.php b/plugins/SensitiveContent/SensitiveContentPlugin.php index 5dce37d414..ed3794fe67 100644 --- a/plugins/SensitiveContent/SensitiveContentPlugin.php +++ b/plugins/SensitiveContent/SensitiveContentPlugin.php @@ -148,11 +148,12 @@ html .tagcontainer > footer > .attachments > .inline-attachment > .attachment-wr html[data-hidesensitive='true'] .tagcontainer.data-tag-nsfw > footer > .attachments > .inline-attachment > .attachment-wrapper > .sensitive-blocker { display: block; -width: 100%; -height: 100%; +/* hugh, two magic numbers below, sorry :( */ +width: 98%; +height: 90%; position: absolute; -z-index: 100; -/*background-color: #d4baba;*/ +/* z-index: 100; */ +/* background-color: #d4baba; */ background-color: black; background-image: url({$blocker}); background-repeat: no-repeat; @@ -179,17 +180,17 @@ EOB; } catch (Exception $e) { $thumbnail = null; } - $thumb_width_css = $thumbnail ? $thumbnail->width . 'px' : '100%'; - $thumb_height_css = $thumbnail ? $thumbnail->height . 'px' : '100%'; + // $thumb_width_css = $thumbnail ? $thumbnail->width . 'px' : '100%'; + // $thumb_height_css = $thumbnail ? $thumbnail->height . 'px' : '100%'; $out->elementStart('div', [ 'class' => 'attachment-wrapper', - 'style' => "height: {$thumb_height_css}; width: {$thumb_width_css};", + /* 'style' => "height: {$thumb_height_css}; width: {$thumb_width_css};", */ ]); // needs height of thumb $out->elementStart('div', [ 'class' => $classes, 'onclick' => 'toggleSpoiler(event)', - 'style' => "height: {$thumb_height_css}; width: {$thumb_width_css};", + /* 'style' => "height: {$thumb_height_css}; width: {$thumb_width_css};", */ ]); $out->raw(' '); $out->elementEnd('div');