diff --git a/client/css/post-main-view.styl b/client/css/post-main-view.styl index e643dfbd..33529009 100644 --- a/client/css/post-main-view.styl +++ b/client/css/post-main-view.styl @@ -44,6 +44,8 @@ .post-content margin: 0 + background-size: cover + background-repeat: no-repeat .darktheme .post-view >.sidebar diff --git a/client/html/post_content.tpl b/client/html/post_content.tpl index fd5b094c..1fb232d6 100644 --- a/client/html/post_content.tpl +++ b/client/html/post_content.tpl @@ -1,4 +1,4 @@ -
+
style='background-image: url(<%- ctx.post.thumbnailUrl %>)'<% } %>> <% if (['image', 'animation'].includes(ctx.post.type)) { %> @@ -6,7 +6,7 @@ <% } else if (ctx.post.type === 'flash') { %> - + diff --git a/client/js/main.js b/client/js/main.js index cb37fb42..294e0dcd 100644 --- a/client/js/main.js +++ b/client/js/main.js @@ -48,7 +48,6 @@ window.RufflePlayer = window.RufflePlayer || {}; window.RufflePlayer.config = { "polyfills": true, "autoplay": "off", - "backgroundColor": rgb2hex(window.getComputedStyle(document.body).backgroundColor), "warnOnUnsupportedContent": false, "splashScreen": false, }; @@ -112,8 +111,6 @@ Promise.resolve() } window.RufflePlayer.config.autoplay = settings.get().autoplayVideos ? "auto" : "off" - const topNav = document.getElementById("top-navigation") - if (topNav) window.RufflePlayer.config.backgroundColor = rgb2hex(window.getComputedStyle(topNav).backgroundColor) }) .then(() => api.loginFromCookies()) .then(