-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
85 lines (64 loc) · 2.12 KB
/
app.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
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
///////////////////////////////////////////////////////////
// Make mobile navigation work
const btnNavEl = document.querySelector(".btn-mobile-nav");
const headerEl = document.querySelector(".header");
const navEl = document.querySelector(".main-nav");
btnNavEl.addEventListener("click", function () {
headerEl.classList.toggle("nav-open");
navEl.style.display = "flex";
});
///////////////////////////////////////////////////////////
// Smooth scrolling animation
const allLinks = document.querySelectorAll("a:link");
allLinks.forEach(function (link) {
link.addEventListener("click", function (e) {
e.preventDefault();
const href = link.getAttribute("href");
// Scroll back to top
if (href === "#")
window.scrollTo({
top: 0,
behavior: "smooth",
});
// Scroll to other links
if (href !== "#" && href.startsWith("#") ) {
const sectionEl = document.querySelector(href);
sectionEl.scrollIntoView({ behavior: "smooth" });
}
// Close mobile naviagtion
if (link.classList.contains("main-nav-link"))
headerEl.classList.toggle("nav-open");
});
});
document.querySelectorAll('.image-container img').forEach(image =>{
image.onclick =()=>{
document.querySelector('.popup-image').style.display ='block';
document.querySelector('.popup-image img').src = image.getAttribute('src');
}
});
document.querySelector('.popup-image span').onclick=()=>{
document.querySelector('.popup-image').style.display ='none';
}
function Project1() {
window.open(
"https://github.com/Sreejita14/Book-Store-Inventory-and-Library-Management-System", "_blank");
}
function Project2() {
window.open(
"https://github.com/Sreejita14/VLMS", "_blank");
}
function insta(){
window.open("https://www.instagram.com/artsy_sreejita/" ,"_blank");
}
function hr(){
window.open("https://www.hackerrank.com/Sree_Banerjee14?hr_r=1","_blank");
}
function gh(){
window.open("https://github.com/Sreejita14","_blank");
}
function lin(){
window.open("https://www.linkedin.com/in/sreejitabanerjee/","_blank");
}
function fb(){
window.open("","_blank");
}