-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathscript.js
More file actions
executable file
·94 lines (84 loc) · 2.41 KB
/
script.js
File metadata and controls
executable file
·94 lines (84 loc) · 2.41 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
new WOW().init();
const footerDate = document.getElementById("footer-date");
const year = new Date().getFullYear();
footerDate.innerHTML = year;
var frm = document.querySelector('#contact')
frm.addEventListener("submit", (e) => {
e.preventDefault();
let name = document.getElementById("name").value;
let messege = document.getElementById("messege").value;
var win = window.open(`https://wa.me/+918450996596?text=Hi%20I%27m%20${name},%20${messege}`, '_blank');
});
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth',
block: 'center'
});
});
});
var typed = new Typed("#typed", {
stringsElement: '#typed-strings',
typeSpeed: 40,
backSpeed: 10,
loop: true
});
//
const work = new Siema({
selector: '.siema',
duration: 200,
easing: 'ease-out',
perPage: 1,
startIndex: 0,
draggable: true,
multipleDrag: true,
threshold: 20,
loop: true,
rtl: false,
onInit: () => {},
onChange: () => {},
});
setInterval(() => work.next(), 3000);
const skills = new Siema({
perPage: {
768: 1,
992: 3,
},
selector: '.skill',
duration: 200,
easing: 'ease-out',
startIndex: 0,
draggable: true,
multipleDrag: true,
threshold: 20,
loop: true,
rtl: false,
onInit: () => {},
onChange: () => {},
});
setInterval(() => skills.next(), 1500);
const navbarNav = document.querySelector('.navbar-nav');
const toggle = document.querySelector('.toggle');
const navbar = document.querySelector('.navbar')
toggle.addEventListener('click', () => {
navbarNav.classList.toggle('show');
});
navbarNav.addEventListener('click', () => {
navbarNav.classList.toggle('show');
});
window.addEventListener('scroll', () => {
if (window.pageYOffset > 100) {
navbar.style.height = "64px";
navbar.style.lineHeight = "64px";
navbar.style.backgroundColor = "white";
navbar.style.color = "black";
navbarNav.classList.add('navBar');
} else if (window.pageYOffset == 0) {
navbar.style.height = "77px";
navbar.style.lineHeight = "77px";
navbar.style.backgroundColor = "black";
navbar.style.color = "white";
navbarNav.classList.remove('navBar');
}
});