From 7664c9664ba00f6be1a171af9111d7f2d472c964 Mon Sep 17 00:00:00 2001 From: NKIPSC <15067635+NKIPSC@users.noreply.github.com> Date: Sun, 10 Apr 2022 16:45:19 +0200 Subject: [PATCH] Blur nsfw thumbnails --- static/style.css | 18 +++++++++++++++--- templates/utils.html | 14 ++++++++------ 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/static/style.css b/static/style.css index 3c7e7ce..5ce5416 100644 --- a/static/style.css +++ b/static/style.css @@ -955,13 +955,25 @@ a.search_subreddit:hover { margin: 5px; } -.post_thumbnail svg { +.post_thumbnail div { grid-area: 1 / 1 / 2 / 2; - width: 100%; - height: auto; object-fit: cover; align-self: center; justify-self: center; + overflow: hidden; +} + +.post_thumbnail div svg { + width: 100%; + height: auto; +} + +.post_thumbnail span { + z-index: 0; +} + +.thumb_nsfw_blur { + filter: blur(0.3rem) } .post_thumbnail.no_thumbnail { diff --git a/templates/utils.html b/templates/utils.html index ca3e0bc..6e91637 100644 --- a/templates/utils.html +++ b/templates/utils.html @@ -133,12 +133,14 @@ {% else %} - - - - Thumbnail - - +
+ + + + Thumbnail + + +
{% endif %} {% if post.post_type == "link" %}{{ post.domain }}{% else %}{{ post.post_type }}{% endif %}