linted
This commit is contained in:
parent
a95686d12b
commit
6d30964a8b
|
@ -30,12 +30,14 @@
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
@include font-size(2.2rem);
|
@include font-size(2.2rem);
|
||||||
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-bottom: 0.8rem;
|
margin-bottom: 0.8rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.description {
|
.description {
|
||||||
@include font-size(1.6rem);
|
@include font-size(1.6rem);
|
||||||
|
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
-webkit-line-clamp: 3;
|
-webkit-line-clamp: 3;
|
||||||
}
|
}
|
||||||
|
@ -70,6 +72,7 @@
|
||||||
|
|
||||||
.statsItem {
|
.statsItem {
|
||||||
@include font-size(1.4rem);
|
@include font-size(1.4rem);
|
||||||
|
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
margin-right: 1.6rem;
|
margin-right: 1.6rem;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
|
@ -15,17 +15,17 @@ export const getImageUrl = (
|
||||||
src: string,
|
src: string,
|
||||||
options: { width?: number; height?: number; noSizeUrlPart?: boolean } = {},
|
options: { width?: number; height?: number; noSizeUrlPart?: boolean } = {},
|
||||||
) => {
|
) => {
|
||||||
if (!src.includes('discours.io') && src.includes('http')) {
|
if (!src.includes('discours.io') && src.includes('http')) {
|
||||||
return src
|
return src
|
||||||
}
|
}
|
||||||
const filename = src.toLowerCase().split('/').pop()
|
const filename = src.toLowerCase().split('/').pop()
|
||||||
const ext = filename.split('.').pop()
|
const ext = filename.split('.').pop()
|
||||||
const isAudio = ext in ['wav', 'mp3', 'ogg', 'aif', 'flac']
|
const isAudio = ext in ['wav', 'mp3', 'ogg', 'aif', 'flac']
|
||||||
const base = isAudio ? cdnUrl : `${thumborUrl}/unsafe/`
|
const base = isAudio ? cdnUrl : `${thumborUrl}/unsafe/`
|
||||||
const suffix = isAudio || options.noSizeUrlPart ? '' : getSizeUrlPart(options)
|
const suffix = isAudio || options.noSizeUrlPart ? '' : getSizeUrlPart(options)
|
||||||
const subfolder = isAudio ? 'audio' : 'image'
|
const subfolder = isAudio ? 'audio' : 'image'
|
||||||
|
|
||||||
return `${base}${suffix}production/${subfolder}/${filename}`
|
return `${base}${suffix}production/${subfolder}/${filename}`
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getOpenGraphImageUrl = (
|
export const getOpenGraphImageUrl = (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user