-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
54f3b4f
commit 5fbcbda
Showing
79 changed files
with
2,754 additions
and
17,226 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
/*=============== SHOW MENU ===============*/ | ||
const navMenu = document.getElementById('nav-menu'), | ||
navToggle = document.getElementById('nav-toggle'), | ||
navClose = document.getElementById('nav-close') | ||
|
||
/*===== MENU SHOW =====*/ | ||
/* Validate if constant exists */ | ||
if(navToggle){ | ||
navToggle.addEventListener('click', () =>{ | ||
navMenu.classList.add('show-menu') | ||
}) | ||
} | ||
|
||
/*===== MENU HIDDEN =====*/ | ||
/* Validate if constant exists */ | ||
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') | ||
// When we click on each nav__link, we remove the show-menu class | ||
navMenu.classList.remove('show-menu') | ||
} | ||
navLink.forEach(n => n.addEventListener('click', linkAction)) | ||
|
||
/*=============== CHANGE BACKGROUND HEADER ===============*/ | ||
function scrollHeader(){ | ||
const header = document.getElementById('header') | ||
// When the scroll is greater than 80 viewport height, add the scroll-header class to the header tag | ||
if(this.scrollY >= 80) header.classList.add('scroll-header'); else header.classList.remove('scroll-header') | ||
} | ||
window.addEventListener('scroll', scrollHeader) | ||
|
||
/*=============== QUESTIONS ACCORDION ===============*/ | ||
const accordionItems = document.querySelectorAll('.questions__item') | ||
|
||
accordionItems.forEach((item) =>{ | ||
const accordionHeader = item.querySelector('.questions__header') | ||
|
||
accordionHeader.addEventListener('click', () =>{ | ||
const openItem = document.querySelector('.accordion-open') | ||
|
||
toggleItem(item) | ||
|
||
if(openItem && openItem!== item){ | ||
toggleItem(openItem) | ||
} | ||
}) | ||
}) | ||
|
||
const toggleItem = (item) =>{ | ||
const accordionContent = item.querySelector('.questions__content') | ||
|
||
if(item.classList.contains('accordion-open')){ | ||
accordionContent.removeAttribute('style') | ||
item.classList.remove('accordion-open') | ||
}else{ | ||
accordionContent.style.height = accordionContent.scrollHeight + 'px' | ||
item.classList.add('accordion-open') | ||
} | ||
|
||
} | ||
|
||
/*=============== SCROLL SECTIONS ACTIVE LINK ===============*/ | ||
const sections = document.querySelectorAll('section[id]') | ||
|
||
function scrollActive(){ | ||
const scrollY = window.pageYOffset | ||
|
||
sections.forEach(current =>{ | ||
const sectionHeight = current.offsetHeight, | ||
sectionTop = current.offsetTop - 58, | ||
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) | ||
|
||
/*=============== SHOW SCROLL UP ===============*/ | ||
function scrollUp(){ | ||
const scrollUp = document.getElementById('scroll-up'); | ||
// When the scroll is higher than 400 viewport height, add the show-scroll class to the a tag with the scroll-top class | ||
if(this.scrollY >= 400) scrollUp.classList.add('show-scroll'); else scrollUp.classList.remove('show-scroll') | ||
} | ||
window.addEventListener('scroll', scrollUp) | ||
|
||
/*=============== DARK LIGHT THEME ===============*/ | ||
const themeButton = document.getElementById('theme-button') | ||
const darkTheme = 'dark-theme' | ||
const iconTheme = 'ri-sun-line' | ||
|
||
// 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) ? 'ri-moon-line' : 'ri-sun-line' | ||
|
||
// 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 === 'ri-moon-line' ? '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()) | ||
}) | ||
|
||
/*=============== SCROLL REVEAL ANIMATION ===============*/ | ||
const sr = ScrollReveal({ | ||
origin: 'top', | ||
distance: '60px', | ||
duration: 2500, | ||
delay: 400, | ||
// reset: true | ||
}) | ||
|
||
sr.reveal(`.home__data`) | ||
sr.reveal(`.home__img`, {delay: 500}) | ||
sr.reveal(`.home__social`, {delay: 600}) | ||
sr.reveal(`.about__img, .contact__box`,{origin: 'left'}) | ||
sr.reveal(`.about__data, .contact__form`,{origin: 'right'}) | ||
sr.reveal(`.steps__card, .product__card, .questions__group, .footer`,{interval: 100}) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/*=============== BASE ===============*/ | ||
*{ | ||
box-sizing: border-box; | ||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
html{ | ||
scroll-behavior: smooth; | ||
} | ||
|
||
body, | ||
button, | ||
input, | ||
textarea{ | ||
font-family: var(--body-font); | ||
font-size: var(--normal-font-size); | ||
} | ||
|
||
body{ | ||
margin: var(--header-height) 0 0 0; | ||
background-color: var(--body-color); | ||
color: var(--text-color); | ||
transition: .4s; // For animation dark mode | ||
} | ||
|
||
button{ | ||
cursor: pointer; | ||
border: none; | ||
outline: none; | ||
} | ||
|
||
h1,h2,h3{ | ||
color: var(--title-color); | ||
font-weight: var(--font-semi-bold); | ||
} | ||
|
||
ul{ | ||
list-style: none; | ||
} | ||
a{ | ||
text-decoration: none; | ||
} | ||
|
||
img{ | ||
max-width: 100%; | ||
height: auto; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/*=============== ABOUT ===============*/ | ||
.about{ | ||
&__container{ | ||
row-gap: 2rem; | ||
} | ||
&__img{ | ||
width: 280px; | ||
justify-self: center; | ||
} | ||
&__title{ | ||
margin-bottom: var(--mb-1); | ||
} | ||
&__description{ | ||
margin-bottom: var(--mb-2); | ||
} | ||
&__details{ | ||
display: grid; | ||
row-gap: 1rem; | ||
margin-bottom: var(--mb-2-5); | ||
|
||
&-description{ | ||
display: inline-flex; | ||
column-gap: .5rem; | ||
font-size: var(--small-font-size); | ||
} | ||
&-icon{ | ||
font-size: 1rem; | ||
color: var(--first-color); | ||
margin-top: .15rem; | ||
} | ||
} | ||
} |
Oops, something went wrong.