From 626128c3558ce3ade53dac6c66f1e06fc373b1ce Mon Sep 17 00:00:00 2001 From: imfunny <36105478+imfunniee@users.noreply.github.com> Date: Mon, 13 May 2019 09:59:59 +0530 Subject: [PATCH] fixed #12 removed background from config.json, we still don't use theme anywhere but its nice to have it :) --- build.js | 16 ---------------- config.json | 7 +++---- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/build.js b/build.js index d030f22..f2f5b84 100644 --- a/build.js +++ b/build.js @@ -50,26 +50,10 @@ function populateCSS(){ if (program.background) { dark = `:root {--bg-color: rgb(10, 10, 10);--text-color: #fff;--blog-gray-color:rgb(180, 180, 180);--background-image: linear-gradient(90deg, rgba(10, 10, 10, 0.6), rgb(10, 10, 10, 1)), url('${('%s', program.background)}');--background-background: linear-gradient(0deg, rgba(10, 10, 10, 1), rgba(10, 10, 10, 0.6)),url('${('%s', program.background)}') center center fixed;--height:50vh;} #display h1 {-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color: #fff;} #blog-display h1 {-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color: #fff;}#projects section {background:rgb(20, 20, 20);}#blog_section section {background:rgb(20, 20, 20);}@media (max-width: 800px){ --background-image: linear-gradient(0deg, rgba(10, 10, 10, 1), rgb(10, 10, 10, 0)), url('${('%s', program.background)}') !important;}`; light = `:root {--bg-color: #fff;--text-color: rgb(10, 10, 10);--blog-gray-color:rgb(80, 80, 80);--background-image: linear-gradient(90deg, rgba(10, 10, 10, 0.4), rgb(10, 10, 10, 0.4)), url('${('%s', program.background)}');--background-background: #fff;}`; - fs.readFile("config.json", function (err , data) { - if (err) throw err; - data = JSON.parse(data); - data[0].background = ('%s', program.background); - fs.writeFile('config.json', JSON.stringify(data, null, ' '), function(err){ - if (err) throw err; - }); - }); populateCSS(); }else{ dark = `:root {--bg-color: rgb(10, 10, 10);--text-color: #fff;--blog-gray-color:rgb(180, 180, 180);--background-image: linear-gradient(90deg, rgba(10, 10, 10, 0.6), rgb(10, 10, 10, 1)), url('https://images.unsplash.com/photo-1553748024-d1b27fb3f960?w=1450');--background-background: linear-gradient(0deg, rgba(10, 10, 10, 1), rgba(10, 10, 10, 0.6)),url('https://images.unsplash.com/photo-1553748024-d1b27fb3f960?w=1450') center center fixed;--height:50vh;} #display h1 {-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color: #fff;} #blog-display h1 {-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color: #fff;}#projects section {background:rgb(20, 20, 20);}#blog_section section {background:rgb(20, 20, 20);}@media (max-width: 800px){ :root {--background-image: linear-gradient(0deg, rgba(10, 10, 10, 1), rgb(10, 10, 10, 0)), url('https://images.unsplash.com/photo-1553748024-d1b27fb3f960?w=1450') !important;}}`; light = `:root {--bg-color: #fff;--text-color: rgb(10, 10, 10);--blog-gray-color:rgb(80, 80, 80);--background-image: linear-gradient(90deg, rgba(10, 10, 10, 0.4), rgb(10, 10, 10, 0.4)), url('https://images.unsplash.com/photo-1553748024-d1b27fb3f960?w=1450');--background-background: #fff;}`; - fs.readFile("config.json", function (err , data) { - if (err) throw err; - data = JSON.parse(data); - data[0].background = "https://images.unsplash.com/photo-1553748024-d1b27fb3f960?w=1450"; - fs.writeFile('config.json', JSON.stringify(data, null, ' '), function(err){ - if (err) throw err; - }); - }); populateCSS(); } diff --git a/config.json b/config.json index f654910..8f558b7 100644 --- a/config.json +++ b/config.json @@ -1,9 +1,8 @@ [ { - "username": null, - "name": null, - "userimg": null, - "background": "https://images.unsplash.com/photo-1553748024-d1b27fb3f960?w=1450", + "username": "imfunniee", + "name": "imfunny", + "userimg": "https://avatars3.githubusercontent.com/u/36105478?v=4", "theme": "light" } ] \ No newline at end of file