1
0
Fork 0
mirror of https://github.com/dilllxd/gitfolio.git synced 2024-08-14 22:28:09 +00:00

fixed issue #12

This commit is contained in:
imfunny 2019-05-13 09:40:24 +05:30 committed by GitHub
parent 24c982c55e
commit eea39f7b56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 15 deletions

View file

@ -18,6 +18,7 @@ function populateCSS(){
if (err) throw err;
fs.appendFile('index.css', dark, function (err) {
if (err) throw err;
});
fs.readFile("config.json", function (err , data) {
if (err) throw err;
data = JSON.parse(data);
@ -27,19 +28,18 @@ function populateCSS(){
});
});
});
});
}else{
fs.copyFile('./assets/index.css', 'index.css', (err) => {
if (err) throw err;
fs.appendFile('index.css', light, function (err) {
if (err) throw err;
fs.readFile("config.json", function (err , data) {
if (err) throw err;
});
fs.readFile("config.json", function (error , data) {
if (error) throw err;
data = JSON.parse(data);
data[0].theme = "light";
fs.writeFile('config.json', JSON.stringify(data, null, ' '), function(err){
if (err) throw err;
});
fs.writeFile('config.json', JSON.stringify(data, null, ' '), function(error){
if (error) throw err;
});
});
});

View file

@ -3,7 +3,7 @@
"username": null,
"name": null,
"userimg": null,
"background": null,
"background": "https://images.unsplash.com/photo-1553748024-d1b27fb3f960?w=1450",
"theme": "light"
}
]