μΉμμ λ§λλ μ κΈ°μ°¨μ λ―Έν: ν¬λ₯΄μ λμμΈ κ°λ°κΈ°
μΉμ¬μ΄νΈμ ν΅μ¬ μμ: FOOTER, LOGOS, λ€λΉκ²μ΄μ
λ©λ΄ ꡬννκΈ°
μΉ κ°λ°μ μΈκ³μμ, μ¬μ©μ κ²½ν(UX)λ μ΅μ°μ μ
λλ€. μ€λμ μΉμ¬μ΄νΈμμ μ€μν μΈ λΆλΆμΈ FOOTER, LOGOS, κ·Έλ¦¬κ³ λ€λΉκ²μ΄μ
λ©λ΄λ₯Ό μ΄λ»κ² ꡬννλμ§ μ΄ν΄λ³΄κ² μ΅λλ€.
1. FOOTERμ μ€μμ±κ³Ό ꡬν
μΉμ¬μ΄νΈμ νλ¨μ μμΉνλ FOOTERλ μ¬μ©μμκ² μ μ©ν μ 보λ₯Ό μ 곡νλ μ€μν μμμ
λλ€. μ¬κΈ°μλ μ μκΆ μ 보, μ°λ½μ², μ¬μ΄νΈ λ§΅, μμ
λ―Έλμ΄ λ§ν¬ λ±μ΄ ν¬ν¨λ μ μμ΅λλ€. ν¨κ³Όμ μΈ FOOTER λμμΈμ μ¬μ©μμ μΉμ¬μ΄νΈ νμμ λκ³ , νμν μ 보λ₯Ό μ½κ² μ°Ύμ μ μλλ‘ ν©λλ€.
(μ΄μ μ½λμ¬μ©μ λ©λ΄λ°κ° μ΄λ¦°μ΄ν νλ¨ μ€ν¬λ‘€λ§μ ν¨κ» λΈλ¬μ²λ¦¬κ°λμ ν면ꡬμ±μ΄ ν¬λͺ νκ² λ³΄μ΄λ μ€λ₯λ₯Ό
μ μμ€ λ§λκ² λμμ΅λλ€ μλ°μ€ν¬λ¦½νΈμ½λμ κ·Έλμ λ©λ΄κ° μ΄λ¦¬κ³ λ«νλ λΈλ¬ν¨κ³Όκ° μ μ©λκ³ μ κ±°λλλ‘ λ€μ μ€κ³νμμ΅λλ€)
2. LOGOS μΉμ
LOGOS μΉμ
μ λΈλλ μΈμ§λλ₯Ό λμ΄λ λ° μ€μν μν μ ν©λλ€. μ¬κΈ°μμλ μΉμ¬μ΄νΈκ° νλ ₯νλ λ€μν λΈλλλ νμμ¬μ λ‘κ³ λ₯Ό νμν μ μμ΅λλ€. λ‘κ³ λ μκ°μ μΌλ‘ λ§€λ ₯μ μ΄λ©΄μλ μΉμ¬μ΄νΈμ μ λ°μ μΈ λμμΈκ³Ό μ‘°νλ₯Ό μ΄λ£¨μ΄μΌ ν©λλ€.
3. λμ μΈ λ€λΉκ²μ΄μ
λ©λ΄
μ¬μ©μμ μΉμ¬μ΄νΈ λ΄ νμμ μ½κ² λ§λλ μμ μ€ νλλ λ€λΉκ²μ΄μ
λ©λ΄μ
λλ€. μλ°μ€ν¬λ¦½νΈλ₯Ό μ΄μ©ν΄ λ©λ΄λ₯Ό ν¨κ³Όμ μΌλ‘ μ μ΄ν μ μμ΅λλ€. μλ₯Ό λ€μ΄, λ©λ΄ νμ λ° μ¨κΉ, λΈλ¬ ν¨κ³Ό μ μ©, λͺ¨λ°μΌμμμ λ©λ΄ κ΄λ¦¬ λ±μ΄ μμ΅λλ€. μ΄λ¬ν κΈ°λ₯μ μΉμ¬μ΄νΈμ μ¬μ©μ μΉνμ±μ ν¬κ² ν₯μμν΅λλ€.
μ΄ ν¬μ€νΈμμλ κ° μΉμ
μ ꡬ체μ μΈ κ΅¬ν λ°©λ²κ³Ό μ½λ μμλ₯Ό μ 곡νκ² μ΅λλ€. μΉ κ°λ°μ κ΄μ¬ μλ λΆλ€μκ² μ΄ μ λ³΄κ° λμμ΄ λκΈ°λ₯Ό λ°λλλ€.
λ³κ²½λ μλ°μ€ν¬λ¦½νΈ μ½λ
const navMenu = document.getElementById('nav-menu'),
navToggle = document.getElementById('nav-toggle'),
navClose = document.getElementById('nav-close'),
header = document.getElementById('header'); // ν€λ μμ
/*===== MENU SHOW =====*/
/* Validate if constant exists */
if(navToggle){
navToggle.addEventListener('click', () =>{
navMenu.classList.add('show-menu');
header.style.backdropFilter = 'none'; // λ©λ΄κ° μ΄λ¦΄ λ λΈλ¬ ν¨κ³Ό μ κ±°
})
}
/*===== MENU HIDDEN =====*/
/* Validate if constant exists */
if(navClose){
navClose.addEventListener('click', () =>{
navMenu.classList.remove('show-menu');
header.style.backdropFilter = 'blur(10px)'; // λ©λ΄κ° λ«ν λ λΈλ¬ ν¨κ³Ό μ μ©
})
}
/*===== SCROLL EVENT FOR BLUR EFFECT =====*/
window.addEventListener('scroll', () => {
if (!navMenu.classList.contains('show-menu')) {
// λ©λ΄κ° λ«ν μμ λ μ€ν¬λ‘€μ λ°λΌ λΈλ¬ ν¨κ³Ό μ‘°μ
header.style.backdropFilter = window.scrollY > 50 ? 'blur(10px)' : 'none';
}
});
/*=============== REMOVE MENU MOBILE ===============*/
const navLink = document.querySelectorAll('.nav__link')
const 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 50 viewport height, add the scroll-header class to the header tag
if(this.scrollY >= 50) header.classList.add('scroll-header');
else header.classList.remove('scroll-header')
}
window.addEventListener('scroll', scrollHeader)
/*=============== CHANGE BACKGROUND HEADER ===============*/
document.querySelectorAll('.home__car-number').forEach(number => {
const updateCount = () => {
const target = +number.getAttribute('data-target');
const count = +number.innerText;
const increment = target / 100;
if (count < target) {
number.innerText = Math.ceil(count + increment);
number.classList.add('is-visible'); // μ¬κΈ°μ ν΄λμ€ μΆκ°
setTimeout(updateCount, 10);
} else {
number.innerText = target;
number.classList.add('is-visible'); // λͺ©νμ λλ¬νμ λλ ν΄λμ€ μΆκ°
}
};
updateCount();
});
/*=============== POPULAR SWIPER ===============*/
let swiperPopular = new Swiper(".popular__container", {
loop: true,
spaceBetween: 24,
slidesPerView: 'auto',
grabCursor: true,
pagination: {
el: ".swiper-pagination",
dynamicBullets: true,
},
breakpoints: {
768: {
slidesPerView: 3,
},
1024: {
spaceBetween: 48,
},
},
});
/*=============== MIXITUP FILTER FEATURED ===============*/
let mixerFeatured = mixitup('.featured__content', {
selectors: {
target: '.featured__card'
},
animation: {
duration: 300
}
});
/* Link active featured */
const linkFeatured = document.querySelectorAll('.featured__item')
function activeFeatured(){
linkFeatured.forEach(l=> l.classList.remove('active-featured'))
this.classList.add('active-featured')
}
linkFeatured.forEach(l=> l.addEventListener('click',activeFeatured))
/*=============== SHOW SCROLL UP ===============*/
const scrollUp = () =>{
const scrollUp = document.getElementById('scroll-up')
// When the scroll is higher than 350 viewport height, add the show-scroll class to the a tag with the scrollup class
this.scrollY >= 350 ? scrollUp.classList.add('show-scroll')
: scrollUp.classList.remove('show-scroll')
}
window.addEventListener('scroll', scrollUp)
/*=============== SCROLL SECTIONS ACTIVE LINK ===============*/
const sections = document.querySelectorAll('section[id]')
const scrollActive = () =>{
const scrollDown = window.scrollY
sections.forEach(current =>{
const sectionHeight = current.offsetHeight,
sectionTop = current.offsetTop - 58,
sectionId = current.getAttribute('id'),
sectionsClass = document.querySelector('.nav__menu a[href*=' + sectionId + ']')
if(scrollDown > sectionTop && scrollDown <= sectionTop + sectionHeight){
sectionsClass.classList.add('active-link')
}else{
sectionsClass.classList.remove('active-link')
}
})
}
window.addEventListener('scroll', scrollActive)
/*=============== OFFER ===============*/
.offer{
position: relative;
}
.offer__container{
grid-template-rows: max-content 224px;
}
.offer__bg{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
}
.offer__data,
.offer__img{
position: relative;
}
.offer__data{
text-align: center;
}
.offer__title{
margin-bottom: 2rem;
}
.offer__description{
margin-bottom: 3rem;
}
.offer__img{
position: absolute;
max-width: initial;
width: 400px;
bottom: 2rem;
right: -5.5rem;
}
/*=============== LOGOS ===============*/
.logos__img{
width: 40px;
opacity: .4;
transition: .3s;
}
.logos__container{
grid-template-columns: repeat(3, max-content);
justify-content: center;
align-items: center;
gap: 4rem;
padding-bottom: 2rem;
}
.logos__img:hover{
opacity: 1;
}
/*=============== FOOTER ===============*/
.footer{
position: relative;
overflow: hidden;
}
.footer .shape__big,
.footer .shape__small{
position: absolute;
}
.footer .shape__big{
width: 300px;
height: 300px;
left: -12rem;
top: 6rem;
}
.footer .shape__small{
right: -13rem;
bottom: -6rem;
}
.footer__container{
row-gap: 2.5rem;
position: relative;
}
.footer__logo{
display: inline-flex;
align-items: center;
column-gap: .25rem;
color: var(--title-color);
font-size: var(--h2-font-size);
font-weight: var(--font-semi-bold);
margin-bottom: 1.25rem;
transition: .3s;
}
.footer__logo i{
font-size: 1.5rem;
font-weight: 500;
}
.footer__logo:hover{
color: var(--first-color);
}
.footer__title{
font-size: var(--h3-font-size);
margin-bottom: 1.25rem;
}
.footer__links{
display: flex;
flex-direction: column;
row-gap: .5rem;
}
.footer__link,
.footer__social-link{
color: var(--text-color);
transition: .3s;
}
.footer__link:hover,
.footer__social-link:hover{
color: var(--title-color);
}
.footer__social{
display: flex;
column-gap: 1.5rem;
}
.footer__social-link{
font-size: 1.25rem;
}
.footer__copy{
display: block;
margin-top: 4.5rem;
text-align: center;
font-size: var(--small-font-size);
color: var(--text-color-light);
}
/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar{
width: .6rem;
background-color: hsl(219, 4%, 16%);
border-radius: 1rem;
}
::-webkit-scrollbar-thumb{
background-color: hsl(219, 4%, 24%);
}
::-webkit-scrollbar-thumb:hover{
background-color: hsl(219, 4%, 32%);
}
/*=============== SCROLL UP ===============*/
.scrollup{
position: fixed;
right: 1rem;
bottom: -30%;
background-color: hsla(0, 0%, 100%, .1);
backdrop-filter: blur(16px);
display: inline-flex;
padding: .45rem;
border-radius: .5rem;
font-size: 1.15rem;
color: var(--white-color);
z-index: var(--z-tooltip);
transition: .4s;
}
.scrollup:hover{
transform: translateY(-.25rem);
}
/* Show Scroll Up*/
.show-scroll{
bottom: 3rem;
}
μ€νμΌλ§μ μΆκ°νμ΅λλ€
Featured Luxury Cars
μλ‘μ΄ λΌμ΄λΈλ¬λ¦¬ kunkalabsλ₯Ό μ¬μ©νμ¬ Featured Luxury Carsλ©λ΄λ₯Ό ꡬμ±νμμ΅λλ€
λ²νΌ ꡬνμμ²΄κ° λ§€μ° λΆλλ½κ²λ©λλ€ γ γ
ν΄λ¦μ 컬λ¬κ° μμ°μ€λ½κ² μ½μ λλ©΄μ μ¬λΌμ€λκ² μμλ€κ³ μκ°λ¬λ λΆλΆμ€ νλμ λλ€
μ¬μ©λ ν¨μ 리뷰ν΄λ³΄μλ©΄
const linkFeatured = document.querySelectorAll('.featured__item'): .featured__item ν΄λμ€λ₯Ό κ°μ§ λͺ¨λ μμλ₯Ό μ ννκ³ , linkFeatured μμμ μ΄λ€μ λͺ©λ‘μ μ μ₯ν©λλ€.
function activeFeatured() { ... }: activeFeaturedλΌλ ν¨μλ₯Ό μ μν©λλ€.
μ΄ ν¨μλ ν΄λ¦λ μμμ 'active-featured' ν΄λμ€λ₯Ό μΆκ°νκ³ , λ€λ₯Έ λͺ¨λ μμμμ μ΄ ν΄λμ€λ₯Ό μ κ±°ν©λλ€.
linkFeatured.forEach(l => l.classList.remove('active-featured')): linkFeaturedμ
μ μ₯λ λͺ¨λ μμλ₯Ό μννλ©΄μ, κ° μμμμ 'active-featured' ν΄λμ€λ₯Ό μ κ±°ν©λλ€.
this.classList.add('active-featured'): νμ¬ ν΄λ¦λ μμ(thisλ₯Ό ν΅ν΄ μ°Έμ‘°)μ 'active-featured' ν΄λμ€λ₯Ό μΆκ°ν©λλ€.
μ΄λ μ¬μ©μκ° ν΄λ¦ν μμλ₯Ό μκ°μ μΌλ‘ κ°μ‘°νλ λ° μ¬μ©λ©λλ€.
linkFeatured.forEach(l => l.addEventListener('click', activeFeatured)): linkFeaturedμ μ μ₯λ λͺ¨λ μμμ λν΄
ν΄λ¦ μ΄λ²€νΈ 리μ€λλ₯Ό μΆκ°ν©λλ€. μ¬μ©μκ° μ΄ μμλ€ μ€ νλλ₯Ό ν΄λ¦νλ©΄ activeFeatured ν¨μκ° μ€νλμ΄,
ν΄λ¦λ μμμ 'active-featured' ν΄λμ€κ° μΆκ°λκ³ λ€λ₯Έ μμλ€μμλ μ κ±°λ©λλ€.
μ΄ μ½λλ μ¬μ©μκ° 'featured' μΉμ
μ λ€λ₯Έ νλͺ©μ ν΄λ¦ν λλ§λ€ μκ°μ νΌλλ°±μ μ 곡νμ¬, νμ¬ μ νλ νλͺ©μ λͺ
ννκ² νμν©λλ€.
μ΄λ κ² λλ²μ§Έ νλ‘μ νΈλ μ±ν©λ¦¬μ λ§μ³€μ΅λλ€
λ€μ νλ‘μ νΈλ 리μ‘νΈλ‘ λμμ€λλ‘ νκ² μ΅λλ€π€