Merge branch 'master' into io-to-com
This commit is contained in:
commit
831495f066
3 changed files with 7 additions and 3 deletions
|
@ -250,6 +250,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.media__thumb {
|
.media__thumb {
|
||||||
|
background-image: linear-gradient(135deg, var(--lbry-teal-2), var(--lbry-blue-3) 100%);
|
||||||
background-position: center;
|
background-position: center;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
|
|
|
@ -123,8 +123,8 @@ function generateContent(exampleNumber, displayTrendingContent) {
|
||||||
class="media__thumb"
|
class="media__thumb"
|
||||||
data-action="choose claim"
|
data-action="choose claim"
|
||||||
data-claim-id="${part.name}"
|
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)})"` : ""}
|
||||||
</figure>
|
></figure>
|
||||||
|
|
||||||
<div class="media__title">
|
<div class="media__title">
|
||||||
${part.value.stream.metadata.title}
|
${part.value.stream.metadata.title}
|
||||||
|
@ -359,6 +359,9 @@ async function getTrendingContent() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeImageSourceSecure(url) {
|
function makeImageSourceSecure(url) {
|
||||||
|
if (!url || !url.length)
|
||||||
|
return url;
|
||||||
|
|
||||||
const originalUrl = new URL(url);
|
const originalUrl = new URL(url);
|
||||||
|
|
||||||
if (originalUrl.protocol !== "https")
|
if (originalUrl.protocol !== "https")
|
||||||
|
|
|
@ -110,5 +110,5 @@
|
||||||
"app/dist"
|
"app/dist"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"version": "3.8.0"
|
"version": "4.0.0"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue