mirror of
https://github.com/maciejpedzich/maciejpedzi.ch.git
synced 2024-11-10 00:13:02 +01:00
Version 2.1.1 release
This commit is contained in:
parent
761638ebb0
commit
786092f433
11
CHANGELOG.md
11
CHANGELOG.md
@ -1,16 +1,21 @@
|
||||
# Changelog
|
||||
|
||||
## v2.1.0
|
||||
## 2.1.1
|
||||
|
||||
- Minor punctuation and wording changes
|
||||
- Fix calculation of time difference between current date and my date of birth
|
||||
|
||||
## 2.1.0
|
||||
|
||||
- Remove unnecessary "exit" command
|
||||
- Remove native webstie scrollbar
|
||||
- Add command retyping using up and down arrows
|
||||
|
||||
## v2.0.1
|
||||
## 2.0.1
|
||||
|
||||
- Fix "unkown" typo
|
||||
- Add version tag to page header
|
||||
|
||||
## v2.0.0
|
||||
## 2.0.0
|
||||
|
||||
- Initial version 2.x.y release
|
||||
|
@ -1,10 +1,11 @@
|
||||
const input = document.querySelector('#cmd');
|
||||
const cmdHistoryElement = document.querySelector('#cmd-history');
|
||||
const today = new Date();
|
||||
const currentYear = today.getFullYear();
|
||||
const cmdHistory = [];
|
||||
|
||||
let cmdIndex = 0;
|
||||
document.querySelector('#currentYear').textContent = today.getFullYear();
|
||||
document.querySelector('#currentYear').textContent = currentYear;
|
||||
input.focus();
|
||||
|
||||
input.addEventListener('blur', (evt) => input.focus());
|
||||
@ -24,11 +25,18 @@ window.addEventListener('keypress', (evt) => {
|
||||
output.textContent = `ERROR: Unknown command '${command}'`;
|
||||
break;
|
||||
case 'about':
|
||||
const age = today.getFullYear() - new Date('2005-05-08').getFullYear();
|
||||
const daysOfThisYear =
|
||||
currentYear % 400 === 0 ||
|
||||
(currentYear % 100 !== 0 && currentYear % 4 === 0)
|
||||
? 366
|
||||
: 365;
|
||||
const timeDiff = today.getTime() - new Date('2005-05-08').getTime();
|
||||
const age = Math.floor(timeDiff / (3600 * 24 * daysOfThisYear * 1000));
|
||||
|
||||
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 believes that by being creative and cooperating with others, you can achieve success.
|
||||
When not coding he is probably watching an F1 race or playing retro video games.`;
|
||||
When not coding, he is probably watching an F1 race, or playing retro video games.`;
|
||||
break;
|
||||
case 'contact':
|
||||
output.innerHTML = `Email address:
|
||||
@ -43,7 +51,7 @@ window.addEventListener('keypress', (evt) => {
|
||||
<p>github - shows Maciej's Github profile</p>
|
||||
<p>help - displays a list of available commands</p>
|
||||
<p>skills - presents a set of current skills</p>
|
||||
<p>Use up and down arrows to retype previous commands</p>`;
|
||||
<p>Use up and down arrows to retype commands</p>`;
|
||||
break;
|
||||
case 'skills':
|
||||
output.innerHTML = `<p>Frontend: HTML, CSS, JavaScript, TypeScript, Vue.js</p>
|
||||
|
@ -12,7 +12,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
<p>maciejpedzi.ch [Version 2.1.0]</p>
|
||||
<p>maciejpedzi.ch [Version 2.1.1]</p>
|
||||
<p>(c) Maciej Pedzich, 2020-<span id="currentYear"></span></p>
|
||||
<p id="hint">Welcome! Type 'help' for more information</p>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user