mirror of
https://github.com/anatolykopyl/vk-nft-feed.git
synced 2026-03-26 12:54:33 +00:00
Initial commit
This commit is contained in:
12
post2Svg.js
Normal file
12
post2Svg.js
Normal file
@@ -0,0 +1,12 @@
|
||||
function makeSvg(image) {
|
||||
image = image.replaceAll('&', '&')
|
||||
|
||||
return `<svg viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="100%" height="100%" fill="white" />
|
||||
<image x="50" y="50" width="900" height="900" href="${image}"/>
|
||||
</svg>`;
|
||||
}
|
||||
|
||||
export default function(post) {
|
||||
return makeSvg(post.attachments[0].photo.sizes[0].url)
|
||||
}
|
||||
Reference in New Issue
Block a user