From 34cdf7cb5df7c78a64fe35dafe3cd50e9d0e0346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9D=E3=83=BC=E3=83=AB=20=E3=82=A6=E3=82=A7=E3=83=83?= =?UTF-8?q?=E3=83=96?= Date: Mon, 25 Mar 2019 10:00:45 -0500 Subject: [PATCH] Playground fixes to match updated daemon --- app/sass/pages/_playground.scss | 1 + app/sockets.js | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/sass/pages/_playground.scss b/app/sass/pages/_playground.scss index 67a52d9..b8398f1 100644 --- a/app/sass/pages/_playground.scss +++ b/app/sass/pages/_playground.scss @@ -250,6 +250,7 @@ } .media__thumb { + background-image: linear-gradient(135deg, var(--lbry-teal-2), var(--lbry-blue-3) 100%); background-position: center; background-repeat: no-repeat; background-size: cover; diff --git a/app/sockets.js b/app/sockets.js index c528c7c..5d067d0 100644 --- a/app/sockets.js +++ b/app/sockets.js @@ -123,8 +123,8 @@ function generateContent(exampleNumber, displayTrendingContent) { class="media__thumb" data-action="choose claim" data-claim-id="${part.name}" - style="background-image: url(${makeImageSourceSecure(part.value.stream.metadata.thumbnail)})"> - + ${part.value.stream.metadata.thumbnail.length ? `style="background-image: url(${makeImageSourceSecure(part.value.stream.metadata.thumbnail)})"` : ""} + >
${part.value.stream.metadata.title} @@ -359,6 +359,9 @@ async function getTrendingContent() { } function makeImageSourceSecure(url) { + if (!url || !url.length) + return url; + const originalUrl = new URL(url); if (originalUrl.protocol !== "https")