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