Skip to main content

About.js

Raw Code

This is the raw code which will be downloaded at time of building the portfolio.

info

Portfolio Generator will ask you for data which can replace the variables. If you don't enter correct data, then you can change variables manually also.

Data/About.js
let currDate = new Date();
let year = currDate.getFullYear() - [[birthYear]];
let month = currDate.getMonth() - [[birthMonth]];
let date = currDate.getDate() - [[birthDate]];

const givenDate = new Date([[birthYear]], [[birthMonth]] - 1, [[birthDate]]);
const birthday = givenDate
.toLocaleDateString("en-GB", {
day: "numeric",
month: "short",
year: "numeric",
})
.replace(/ /g, "-");

if (month < 0) year -= 1;
else if (month === 0) {
if (date < [[birthDate]]) year -= 1;
}

const about = {
name: "[[name]]",
about: "[[about]]",
bio: "[[shortBio]]",
longBio: "[[longBio]]",
birthday,
city: "[[city]]",
age: year,
degree: "[[degree]]",
};

export default about;

Variables

caution

You can refer this table if you have any kind of confusion regarding adding data into variables. Remember variables are very sensitive respect to their types and data format. Data should be added in the instructed format only.

VariableDescriptionTypeConstraintExample
nameName of userTextLength 3 to 20Saksham Bindal
aboutProfessions of userListMinimum length 1["Frontend Developer","Designer"]
shortBioOne line about userTextLength 40 to 100
birthDate*Birth DateIntegerValue 1 to 31
birthMonth*Birth MonthIntegerValue 1 to 12
birthYear*Birth YearIntegerValue upto current year
cityCity or location of userTextValue upto current year
degreeHighest degree user have pursuedTextValue upto current yearUG
tip
  • Some variables are marked as * in above table. Those variables will not be asked directly in portfolio-generator.
  • Instead a variable named dob will be asked.
  • You are expected to add your complete date of birth in that variable.

Final Code Example

After adding the data, the code will look like:

Data/About.js
let currDate = new Date();
let year = currDate.getFullYear() - 2000;
let month = currDate.getMonth() - 1;
let date = currDate.getDate() - 1;

const givenDate = new Date(2000, 1 - 1, 1);
const birthday = givenDate
.toLocaleDateString("en-GB", {
day: "numeric",
month: "short",
year: "numeric",
})
.replace(/ /g, "-");

if (month < 0) year -= 1;
else if (month === 0) {
if (date < 1) year -= 1;
}

const about = {
name: "Saksham Bindal",
about:
"Full Stack Developer, Flutter App Developer, Blockchain Developer, Competitive Coder, Entrepreneur",
bio: "Pursuing B. Tech at MNIT Jaipur in Computer Science Branch. 3rd Year Student.",
longBio:
"I'm a developer with experience in building full-stack websites for individuals and organizations. I also develop flutter android apps. I am expert in Python, CPP, MERN Stack, Next JS, Flask. I am a competitive coder. I develop Web 3.0 Decentralized apps (DApps) based on blockchain technology & ICP (Internet Computer Protocol)",
birthday,
city: "Hindaun, Rajasthan, India",
age: year,
degree: "UG",
};

export default about;
danger
  • Above data is dummy data which will be produced when you run portfolio-project with --dummy option.
  • This data is the personal data of Saksham Bindal
  • This data is only for testing purpose. You are not allowed to misuse the data.
  • You are not allowed to distribute or publish this data.