Giter VIP home page Giter VIP logo
class Myself {
  constructor(info) {
    this.info = info;
  }

  introduction() {
    const currentDate = new Date();
    const birthDate = new Date(this.info.birthYear, this.info.birthMonth - 1, this.info.birthDay);
    const age = currentDate.getFullYear() - birthDate.getFullYear() - (currentDate.getMonth() < birthDate.getMonth() || (currentDate.getMonth() === birthDate.getMonth() && currentDate.getDate() < birthDate.getDate()) ? 1 : 0);
    const yearsOfExperienceFirst = currentDate.getFullYear() - 2017;

    const introLines = [
      `Hello, I'm ${this.info.nickname}.`,
      `I'm ${age} years old.`,
      `I'm ${this.info.nacionality}.`,
      `I'm a ${this.info.occupation} with ${yearsOfExperienceFirst} years of experience in ${this.info.devLanguagesFirst}.`,
      `GitHub profile: <a href="${this.info.github}" target="_blank">${this.info.github}</a>`,
      `GitLab profile: <a href="${this.info.gitlab}" target="_blank">${this.info.gitlab}</a>`,
      `My YouTube channel: <a href="${this.info.youtube}" target="_blank">${this.info.youtube}</a>`,
      `My Instagram profile: <a href="${this.info.instagram}" target="_blank">${this.info.instagram}</a>`,
      `My Mastodon profile: <a href="${this.info.mastodon}" target="_blank">${this.info.mastodon}</a>`,
      `My website: <a href="${this.info.website}" target="_blank">${this.info.website}</a>`
    ];

    const style = document.createElement('style');
    style.innerHTML = `
      body {
        font-family: Arial, sans-serif;
        background-color: #f0f0f0;
        padding: 20px;
      }

      #intro {
        background-color: #fff;
        border-radius: 5px;
        padding: 20px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        max-width: 500px;
        margin: 0 auto;
      }

      #intro p {
        margin: 0 0 10px;
      }

      #intro a {
        color: #007bff;
        text-decoration: none;
      }

      #intro a:hover {
        text-decoration: underline;
      }
    `;

    document.head.appendChild(style);

    const introDiv = document.createElement('div');
    introDiv.id = 'intro';
    document.body.appendChild(introDiv);

    let lineIndex = 0;
    const interval = setInterval(() => {
      if (lineIndex < introLines.length) {
        introDiv.innerHTML += `<p>${introLines[lineIndex]}</p>`;
        lineIndex++;
      } else {
        clearInterval(interval);
      }
    }, 1000);
  }
}

// Define my informations
const MyInfo = {
  nickname: "Cavifeal",
  nacionality: "Brazilian",
  birthYear: 2008,
  birthMonth: 12,
  birthDay: 31,
  occupation: "Developer",
  devLanguagesFirst: "JavaScript and Node.js",
  github: "https://github.com/CVFA-Dev",
  gitlab: "https://gitlab.com/CVFA",
  mastodon: "https://mastodon.social/@CVFA",
  instagram: "https://instagram.com/cvfa_dev",
  youtube: "https://youtube.com/@Cavifeal",
  website: "https://cvfa.vercel.app/"
};

// Create a Myself object
const me = new Myself(MyInfo);

// Introduce myself
me.introduction();

Cavifeal's Projects

1hosts icon 1hosts

World's most advanced DNS filter-/blocklists!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.