Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Denngrh committed Aug 14, 2024
0 parents commit a0e4870
Show file tree
Hide file tree
Showing 16 changed files with 9,901 additions and 0 deletions.
1,140 changes: 1,140 additions & 0 deletions Assets/Css/style.css

Large diffs are not rendered by default.

Binary file added Assets/Icons/aboutimg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Icons/contactme.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Icons/logo1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Icons/testimonial1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Icons/testimonial2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Icons/testimonial3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
709 changes: 709 additions & 0 deletions Assets/Libraries/swiper-bundle.min.css

Large diffs are not rendered by default.

7,179 changes: 7,179 additions & 0 deletions Assets/Libraries/swiper-bundle.min.js

Large diffs are not rendered by default.

Binary file added Assets/Resume.pdf
Binary file not shown.
180 changes: 180 additions & 0 deletions Assets/js/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
const navMenu = document.getElementById("nav-menu"),
navToggle = document.getElementById("nav-toggle"),
navClose = document.getElementById("nav-close");

if (navToggle) {
navToggle.addEventListener("click", () => {
navMenu.classList.add("show-menu");
});
}

if (navClose) {
navClose.addEventListener("click", () => {
navMenu.classList.remove("show-menu");
});
}

// remove menu mobile
const navLink = document.querySelectorAll(".nav-link");

function linkAction() {
const navMenu = document.getElementById("nav-menu");
navMenu.classList.remove("show-menu");
}

navLink.forEach((n) => n.addEventListener("click", linkAction));

// qualifi
const tabs = document.querySelectorAll("[data-target]"),
tabContents = document.querySelectorAll("[data-content]");

tabs.forEach((tab) => {
tab.addEventListener("click", () => {
const target = document.querySelector(tab.dataset.target);

tabContents.forEach((tabContent) => {
tabContent.classList.remove("qualification-active");
});
target.classList.add("qualification-active");

tabs.forEach((tab) => {
tab.classList.remove("qualification-active");
});

tab.classList.add("qualification-active");
});
});

// services box
const boxViews = document.querySelectorAll(".services-box"),
boxBtns = document.querySelectorAll(".services-button"),
boxCloses = document.querySelectorAll(".services-box-close");

let box = function (boxClick) {
boxViews[boxClick].classList.add("active-box");
};

boxBtns.forEach((boxBtn, i) => {
boxBtn.addEventListener("click", () => {
box(i);
});
});

boxCloses.forEach((boxClose) => {
boxClose.addEventListener("click", () => {
boxViews.forEach((boxView) => {
boxView.classList.remove("active-box");
});
});
});

//scroll section active link
const sections = document.querySelectorAll("section[id]");

function scrollActive() {
const scrollY = window.pageYOffset;

sections.forEach((current) => {
const sectionHeight = current.offsetHeight;
const sectionTop = current.offsetTop - 50;
sectionId = current.getAttribute("id");

if (scrollY > sectionTop && scrollY <= sectionTop + sectionHeight) {
document
.querySelector(".nav-menu a[href*=" + sectionId + "]")
.classList.add("active-link");
} else {
document
.querySelector(".nav-menu a[href*=" + sectionId + "]")
.classList.remove("active-link");
}
});
}
window.addEventListener("scroll", scrollActive);

// change bg header
function scrollHeader() {
const nav = document.getElementById("header");
// When the scroll is greater than 200 viewport height, add the scroll-header class to the header tag
if (this.scrollY >= 200) nav.classList.add("scroll-header");
else nav.classList.remove("scroll-header");
}
window.addEventListener("scroll", scrollHeader);

/*==================== SHOW SCROLL TOP ====================*/
function scrollUp() {
const scrollUp = document.getElementById("scroll-up");
// When the scroll is higher than 560 viewport height, add the show-scroll class to the a tag with the scroll-top class
if (this.scrollY >= 560) scrollUp.classList.add("show-scroll");
else scrollUp.classList.remove("show-scroll");
}
window.addEventListener("scroll", scrollUp);

//dark light mode------------------
const themeButton = document.getElementById("theme-button");
const darkTheme = "dark-theme";
const iconTheme = "fa-sun";

// Previously selected topic (if user selected)
const selectedTheme = localStorage.getItem("selected-theme");
const selectedIcon = localStorage.getItem("selected-icon");

// We obtain the current theme that the interface has by validating the dark-theme class
const getCurrentTheme = () =>
document.body.classList.contains(darkTheme) ? "dark" : "light";
const getCurrentIcon = () =>
themeButton.classList.contains(iconTheme) ? "fa-moon" : "fa-sun";

// We validate if the user previously chose a topic
if (selectedTheme) {
// If the validation is fulfilled, we ask what the issue was to know if we activated or deactivated the dark
document.body.classList[selectedTheme === "dark" ? "add" : "remove"](
darkTheme
);
themeButton.classList[selectedIcon === "fa-moon" ? "add" : "remove"](
iconTheme
);
}

// Activate / deactivate the theme manually with the button
themeButton.addEventListener("click", () => {
// Add or remove the dark / icon theme
document.body.classList.toggle(darkTheme);
themeButton.classList.toggle(iconTheme);
// We save the theme and the current icon that the user chose
localStorage.setItem("selected-theme", getCurrentTheme());
localStorage.setItem("selected-icon", getCurrentIcon());
});

//swiper
let swiperPortfolio = new Swiper(".portfolio-container", {
cssMode: true,
loop: true,

navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
},

pagination: {
el: ".swiper-pagination",
clickable: true,
},
});

let swiperTestimonial = new Swiper(".testimonial-container", {
cssMode: true,
loop: true,
spaceBetween: 48,

pagination: {
el: ".swiper-pagination",
clickable: true,
},

breakpoints: {
568: {
slidesPerView: 2,
},
},
});
1 change: 1 addition & 0 deletions Assets/mouse.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Assets/project1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Assets/project2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Assets/project3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a0e4870

Please sign in to comment.