-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
35 lines (28 loc) · 1.12 KB
/
index.js
File metadata and controls
35 lines (28 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import './src/components/scrolltop.js';
import './src/components/menu.js';
import './src/components/workplaces.js';
import './src/components/community.js';
import './src/components/skills.js';
(() => {
fetch('./resume.json')
.then(res => res.json())
.then(displayResume);
const portfolioDismiss = document.querySelector('p.art-portfolio > a.dismiss');
portfolioDismiss.addEventListener('click', () => {
portfolioDismiss.parentElement.classList.add('fadeout');
setTimeout(() => portfolioDismiss.parentElement.remove(), 300);
});
})();
function displayResume(json) {
const menu = document.querySelector('side-menu');
menu.currentCount = json.current.length;
menu.items = Object.keys(json).filter((s) => s !== "version");
const current = document.getElementById('current-content');
current.item = json.current;
const skills = document.getElementById('skillset-content');
skills.items = json.skills;
const community = document.getElementById('community-content');
community.items = json.community;
const past = document.getElementById('past-content');
past.items = json.past;
}