Add leading newline to asset cbs
This commit is contained in:
@@ -323,15 +323,15 @@ async function parseAdditionalAssets(data:string, char:simpleCharacterArgument|c
|
|||||||
case 'path':
|
case 'path':
|
||||||
return path.path
|
return path.path
|
||||||
case 'img':
|
case 'img':
|
||||||
return `<img src="${path.path}" alt="${path.path}" style="${assetWidthString} "/>`
|
return `<img src="${path.path}" alt="${path.path}" style="${assetWidthString} "/>\n`
|
||||||
case 'image':
|
case 'image':
|
||||||
return `<div class="risu-inlay-image"><img src="${path.path}" alt="${path.path}" style="${assetWidthString}"/></div>\n`
|
return `<div class="risu-inlay-image"><img src="${path.path}" alt="${path.path}" style="${assetWidthString}"/></div>\n`
|
||||||
case 'video':
|
case 'video':
|
||||||
return `<video controls autoplay loop><source src="${path.path}" type="video/mp4"></video>`
|
return `<video controls autoplay loop><source src="${path.path}" type="video/mp4"></video>\n`
|
||||||
case 'video-img':
|
case 'video-img':
|
||||||
return `<video autoplay muted loop><source src="${path.path}" type="video/mp4"></video>`
|
return `<video autoplay muted loop><source src="${path.path}" type="video/mp4"></video>\n`
|
||||||
case 'audio':
|
case 'audio':
|
||||||
return `<audio controls autoplay loop><source src="${path.path}" type="audio/mpeg"></audio>`
|
return `<audio controls autoplay loop><source src="${path.path}" type="audio/mpeg"></audio>\n`
|
||||||
case 'bg':
|
case 'bg':
|
||||||
if(mode === 'back'){
|
if(mode === 'back'){
|
||||||
return `<div style="width:100%;height:100%;background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),url(${path.path}); background-size: cover;"></div>`
|
return `<div style="width:100%;height:100%;background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),url(${path.path}); background-size: cover;"></div>`
|
||||||
@@ -339,9 +339,9 @@ async function parseAdditionalAssets(data:string, char:simpleCharacterArgument|c
|
|||||||
break
|
break
|
||||||
case 'asset':{
|
case 'asset':{
|
||||||
if(path.ext && videoExtention.includes(path.ext)){
|
if(path.ext && videoExtention.includes(path.ext)){
|
||||||
return `<video autoplay muted loop><source src="${path.path}" type="video/mp4"></video>`
|
return `<video autoplay muted loop><source src="${path.path}" type="video/mp4"></video>\n`
|
||||||
}
|
}
|
||||||
return `<img src="${path.path}" alt="${path.path}" style="${assetWidthString} "/>`
|
return `<img src="${path.path}" alt="${path.path}" style="${assetWidthString} "/>\n`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ''
|
return ''
|
||||||
|
|||||||
Reference in New Issue
Block a user