Skip to content

Commit 3053fe3

Browse files
committed
replaced the redirectTo function with an actual link
1 parent f4fe78e commit 3053fe3

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

JS/functions.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ const worksData = [
2323
{img:"Files/Work/ios.webp",name:"ArsenTech Shorts",category:"Quick Tutorials, Tips and Tricks",attr:"Photo: Tracy Le Blanc from Pexels",imgAlt:"phone"},
2424
]
2525
const removeCss = ()=>document.querySelector("link[href='CSS/dark-mode.css']").remove();
26-
const redirectTo = (link) => document.location=link;
2726
function lazyCss(e) {const t = document.createElement( "link" );t.href = e, t.rel = "stylesheet", t.type = "text/css", t.media="screen", document.getElementsByTagName("head")[0].appendChild(t);}
2827
function handleScroll(scrlY, pageY){scrlY < this.scrollY ? navbar.classList.add("sticky") : navbar.classList.remove("sticky");window.scrollY > pageY ? gotop.classList.add("active") : gotop.classList.remove("active");}
2928
function toggleActive(){toggler.classList.toggle("active"); navMenu.classList.toggle("active");}
@@ -46,9 +45,9 @@ const addSkills=()=>skillData.map(val=>{
4645
document.querySelector(".skills").append(el);
4746
})
4847
const addServices=()=>serviceData.map(val=>{
49-
const el = document.createElement("div");
48+
const el = document.createElement("a");
49+
el.href = val.link
5050
el.classList.add("service");
51-
el.addEventListener("click",()=>redirectTo(val.link));
5251
el.innerHTML = `<span class="iconify icon" data-icon="${val.icon}" data-inline="false"></span>
5352
<h3>${val.name}</h3>
5453
<p>${val.desc}</p>`;
@@ -75,8 +74,7 @@ function addWorks(){
7574
}
7675
function isChristmas() {
7776
const today = new Date();
78-
const month = today.getMonth() + 1;
79-
const day = today.getDate();
77+
const month = today.getMonth() + 1,day = today.getDate();
8078
return (month === 12 && day >= 1) || (month === 1 && day <= 8);
8179
}
8280
function init(){

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ <h2 class="section-title">Works</h2>
8383
<div class="inner-width">
8484
<h2 class="section-title">Get in Touch</h2>
8585
<div class="contact-info">
86-
<div class="item" onclick='redirectTo("https://www.google.com/maps/place/Yerevan/");'><span class="iconify contact-icon" data-icon="fluent:location-28-filled" data-inline="false"></span>Yerevan, Armenia</div>
87-
<div class="item" onclick='redirectTo("https://www.youtube.com/@ArsenTech");'><span class="iconify contact-icon" data-icon="dashicons:youtube" data-inline="false"></span>ArsenTech</div>
88-
<div class="item" onclick='redirectTo("https://github.com/ArsenTech");'><span class="iconify contact-icon" data-icon="ant-design:github-outlined" data-inline="false"></span>ArsenTech</div>
86+
<a href="https://www.google.com/maps/place/Yerevan/" class="item"><span class="iconify contact-icon" data-icon="fluent:location-28-filled" data-inline="false"></span>Yerevan, Armenia</a>
87+
<a href="https://www.youtube.com/@ArsenTech" class="item"><span class="iconify contact-icon" data-icon="dashicons:youtube" data-inline="false"></span>ArsenTech</a>
88+
<a href="https://github.com/ArsenTech" class="item"><span class="iconify contact-icon" data-icon="ant-design:github-outlined" data-inline="false"></span>ArsenTech</a>
8989
</div>
9090
<form action="https://formspree.io/f/xnqolaog" method="POST" class="contact-form">
9191
<input type="text" name="name" aria-label="name" class="nameZone" placeholder="Your Full Name" required>

0 commit comments

Comments
 (0)