-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.js
34 lines (27 loc) · 898 Bytes
/
main.js
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
var typed = new Typed(".text", {
strings: ["Frontend Developer" , "Web Developer"],
typeSpeed: 100,
backSpeed: 100,
backDelay: 1000,
loop: true
});
'use strict';
function progressBarAndCountNumber () {
const progress = document.querySelectorAll('.progress');
let count = 0;
// You must put the maximum number in the MAX variable.
let MAX = 95;
let run = setInterval(() => {
count++;
progress.forEach(element => {
if (count <= element.dataset.progress) {
element.parentElement.style.background = `conic-gradient(#0ef ${count}%, #212428 0)`;
element.firstElementChild.textContent = `${count}%`;
};
if (count == MAX) {
clearInterval(run);
};
});
}, 20);
}
progressBarAndCountNumber();