Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KDT5_LeeJiHun #75

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added asset/font/SSTBold.TTF
Binary file not shown.
Binary file added asset/font/SSTBoldCn.TTF
Binary file not shown.
Binary file added asset/font/SSTBoldIt.TTF
Binary file not shown.
Binary file added asset/font/SSTHeavy.TTF
Binary file not shown.
Binary file added asset/font/SSTHeavyIt.TTF
Binary file not shown.
Binary file added asset/font/SSTLight.TTF
Binary file not shown.
Binary file added asset/font/SSTLightIt.TTF
Binary file not shown.
Binary file added asset/font/SSTMedium.TTF
Binary file not shown.
Binary file added asset/font/SSTMediumCn.TTF
Binary file not shown.
Binary file added asset/font/SSTMediumIt.TTF
Binary file not shown.
Binary file added asset/font/SSTRg.TTF
Binary file not shown.
Binary file added asset/font/SSTRgCn.TTF
Binary file not shown.
Binary file added asset/font/SSTRgIt.TTF
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added asset/images/PlayStation-5.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added asset/images/horizontal-product-0.webp
Binary file not shown.
Binary file added asset/images/horizontal-product-1.webp
Binary file not shown.
Binary file added asset/images/horizontal-product-2.webp
Binary file not shown.
Binary file added asset/images/horizontal-product-3.webp
Binary file not shown.
Binary file added asset/images/horizontal-product-4.webp
Binary file not shown.
Binary file added asset/images/horizontal-product-5.webp
Binary file not shown.
Binary file added asset/images/horizontal-product-6.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added asset/images/logo/atsv-logo-01-en-05apr23.webp
Binary file not shown.
Binary file not shown.
Binary file added asset/images/logo/nba2k23-logo-01-en-28mar23.webp
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
525 changes: 525 additions & 0 deletions css/main.css

Large diffs are not rendered by default.

485 changes: 485 additions & 0 deletions index.html

Large diffs are not rendered by default.

72 changes: 72 additions & 0 deletions js/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
const sharedNav = document.querySelector('.shared-nav-container');
const gameWrapper = document.querySelector('.game-wrapper');
let navIsScrolled = false;

window.addEventListener('scroll', () => {
if (!navIsScrolled && scrollY > 37) {
navIsScrolled = true;
sharedNav.classList.add('scrolled');
gameWrapper.classList.add('scrolled');
} else if (navIsScrolled && scrollY < 37) {
navIsScrolled = false;
sharedNav.classList.remove('scrolled');
gameWrapper.classList.remove('scrolled');
}
});
Comment on lines +5 to +15
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

position: sticky; 로도 같은 스타일을 재연할 수 있습니다.
css로 처리가능한 로직들은 css로 처리하는게 좋습니다.

참고사항 : https://developer.mozilla.org/en-US/docs/Web/CSS/position


const fadeEls = document.querySelectorAll('.fade-in');
fadeEls.forEach((fadeEl, index) => {
gsap.to(fadeEl, 1, {
delay: (index + 1) * 0.6,
opacity: 1,
});
});

new Swiper('.game-wrapper .swiper-container', {
allowTouchMove: false,
slidesPerView: 1,
});

new Swiper('.hardware-wrapper .swiper-container', {
centeredSlides: true,
allowTouchMove: false,
effect: 'fade',
fadeEffect: {
crossFade: true,
fadeOut: 500,
fadeIn: 500,
delay: 2000,
},
slidesPerView: 1,
pagination: {
el: '.hardware-wrapper .swiper-pagination',
clickable: true,
renderBullet: function (index, className) {
let spanArray = [
`PS5 Console`,
`DualSense™ Wireless Controller`,
`PULSE 3D™ Wireless Headset`,
`DualSense Edge`,
`Media Remote`,
`HD Camera`,
`PS5 Console Covers`,
];
let paginationTemplate = `
<div class="${className}">
<div class="media-block">
<div class="media-block__inner">
<img src="asset/images/horizontal-product-${index}.webp">
</div>
<div class="media-block__inner text">
<span>
${spanArray[index]}
</span>
</div>
</div>
</div>
</div>
`;
return paginationTemplate;
},
},
});