Version 2.1.2 release

This commit is contained in:
Maciej Pędzich 2021-01-01 12:17:06 +01:00
parent 786092f433
commit c5af399638
3 changed files with 9 additions and 10 deletions

View File

@ -1,5 +1,9 @@
# Changelog # Changelog
## 2.1.2
- Even more minor changes
## 2.1.1 ## 2.1.1
- Minor punctuation and wording changes - Minor punctuation and wording changes

View File

@ -5,7 +5,7 @@ const currentYear = today.getFullYear();
const cmdHistory = []; const cmdHistory = [];
let cmdIndex = 0; let cmdIndex = 0;
document.querySelector('#currentYear').textContent = currentYear; document.querySelector('#current-year').textContent = currentYear;
input.focus(); input.focus();
input.addEventListener('blur', (evt) => input.focus()); input.addEventListener('blur', (evt) => input.focus());
@ -25,13 +25,8 @@ window.addEventListener('keypress', (evt) => {
output.textContent = `ERROR: Unknown command '${command}'`; output.textContent = `ERROR: Unknown command '${command}'`;
break; break;
case 'about': case 'about':
const daysOfThisYear =
currentYear % 400 === 0 ||
(currentYear % 100 !== 0 && currentYear % 4 === 0)
? 366
: 365;
const timeDiff = today.getTime() - new Date('2005-05-08').getTime(); const timeDiff = today.getTime() - new Date('2005-05-08').getTime();
const age = Math.floor(timeDiff / (3600 * 24 * daysOfThisYear * 1000)); const age = Math.floor(timeDiff / (3600 * 24 * 365 * 1000));
output.textContent = `Maciej Pedzich is a ${age}-year-old high school student from Kielce, Poland. output.textContent = `Maciej Pedzich is a ${age}-year-old high school student from Kielce, Poland.
He makes web applications using Vue.js, Node.js, Express and MongoDB/PostgreSQL, but he likes experimenting with other solutions too. He makes web applications using Vue.js, Node.js, Express and MongoDB/PostgreSQL, but he likes experimenting with other solutions too.
@ -48,7 +43,7 @@ window.addEventListener('keypress', (evt) => {
case 'help': case 'help':
output.innerHTML = `<p>about - shows everything you need to know about Maciej</p> output.innerHTML = `<p>about - shows everything you need to know about Maciej</p>
<p>contact - displays contact information</p> <p>contact - displays contact information</p>
<p>github - shows Maciej's Github profile</p> <p>github - opens Maciej's Github profile</p>
<p>help - displays a list of available commands</p> <p>help - displays a list of available commands</p>
<p>skills - presents a set of current skills</p> <p>skills - presents a set of current skills</p>
<p>Use up and down arrows to retype commands</p>`; <p>Use up and down arrows to retype commands</p>`;

View File

@ -12,8 +12,8 @@
</head> </head>
<body> <body>
<div id="header"> <div id="header">
<p>maciejpedzi.ch [Version 2.1.1]</p> <p>maciejpedzi.ch [Version 2.1.2]</p>
<p>(c) Maciej Pedzich, 2020-<span id="currentYear"></span></p> <p>(c) Maciej Pedzich, 2020-<span id="current-year"></span></p>
<p id="hint">Welcome! Type 'help' for more information</p> <p id="hint">Welcome! Type 'help' for more information</p>
</div> </div>
<div id="cmd-history"></div> <div id="cmd-history"></div>