fix: add ui improvements

This commit is contained in:
João Peixoto
2021-06-08 22:53:15 +01:00
parent aa64f3333e
commit d34cbaef86
9 changed files with 60 additions and 13 deletions

19
scripts/data/news.json Normal file
View File

@@ -0,0 +1,19 @@
{
"news": [
{
"title": "Top NFT Projects — Rediscovered (Indorse)",
"date": "20 May 2021",
"url": "https://blog.indorse.io/top-nft-projects-rediscovered-5ec0e117b53d/"
},
{
"title": "Meet Metadata Guardians Trying to Make Your NFT Collection Available 100 Years from Now",
"date": "17 May 2021",
"url": "https://rarible.medium.com/meet-metadata-guardians-trying-to-make-your-nft-collection-available-100-years-from-now-60a18baeed6c/"
},
{
"title": "Understanding the different types of NFTs (Indorse)(opens new window)",
"date": "14 May 2021",
"url": "https://blog.indorse.io/what-is-a-non-fungible-token-understanding-the-different-types-of-nfts-3ef29a2b2876/"
}
]
}

16
scripts/data/videos.json Normal file
View File

@@ -0,0 +1,16 @@
{
"videos": [
{
"title": "Beeple Explains: What is an NFT?",
"date": "21 March 2021",
"url": "https://www.youtube.com/watch?v=13U573keZ3A/",
"thumbnail": "https://img.youtube.com/vi/13U573keZ3A/maxresdefault.jpg"
},
{
"title": "Minty Fresh NFTs with IPFS",
"date": "18 March 2021",
"url": "https://www.youtube.com/watch?v=WNukgBtlWeU/",
"thumbnail": "https://img.youtube.com/vi/WNukgBtlWeU/maxresdefault.jpg"
}
]
}

View File

@@ -17,6 +17,8 @@ const dayjs = require('dayjs')
const xmlFilePath = 'dist/index.xml'
const jsonFilePath = 'dist/index.json'
const newsJsonPath = 'scripts/data/news.json'
const videosJsonPath = 'scripts/data/videos.json'
function generateJsonFile(xml) {
xml2js.parseString(xml, (error, dataObj) => {
@@ -56,3 +58,15 @@ fs.readFile(xmlFilePath, { encoding: 'utf-8' }, (error, data) => {
generateJsonFile(data)
})
fs.copyFile(newsJsonPath, 'dist/news.json', (err) => {
if (err) {
console.log('Error: ', err)
}
})
fs.copyFile(videosJsonPath, 'dist/videos.json', (err) => {
if (err) {
console.log('Error: ', err)
}
})