Fix sensitive image indicators

This commit is contained in:
Ryan Fox 2021-01-11 19:32:29 +00:00
parent b59ac87c81
commit 7e26999ff2
Signed by: flewkey
GPG Key ID: 94F56ADFD848851E
2 changed files with 13 additions and 3 deletions

View File

@ -380,10 +380,9 @@ form.search {
opacity: .95;
font-weight: normal;
font-size: 95%;
height: 10vh;
margin-bottom: -10vh;
text-align: center;
padding-top: 2rem;
padding-bottom: 2rem;
cursor: pointer;
border-radius: 2px;
}
@ -392,6 +391,14 @@ form.search {
display: none;
}
.attachment-entry .nsfw {
display: none;
}
.attachment-entry input:checked~.nsfw {
display: block !important;
}
.attachment-image {
display: block;
width: 100%;

View File

@ -37,7 +37,10 @@ attachmentPreview context sensitive attachments ({ url, preview_url } as attachm
media =
a
[ class "attachment-image"
[ if nsfw then
class "attachment-image nsfw"
else
class "attachment-image"
, href url
, onClickWithPreventAndStop <|
ViewerEvent (OpenViewer attachments attachment)