icon-desktop
This commit is contained in:
@@ -976,7 +976,7 @@ body.dragging-scroll {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 24px;
|
||||
max-width: 600px;
|
||||
/* max-width: 600px; */
|
||||
}
|
||||
.itemc,
|
||||
.itemr {
|
||||
@@ -994,6 +994,7 @@ body.dragging-scroll {
|
||||
background-repeat: no-repeat;
|
||||
background-position: bottom;
|
||||
background-size: auto;
|
||||
/* flex-basis: 100%; */
|
||||
}
|
||||
.itemr {
|
||||
background-color: #e5efff;
|
||||
|
||||
@@ -1102,21 +1102,37 @@ function handleMobilePopupView() {
|
||||
window.addEventListener('resize', updateOrientationState);
|
||||
window.addEventListener('orientationchange', updateOrientationState);
|
||||
|
||||
updateOrientationState();
|
||||
|
||||
function updateOrientationState() {
|
||||
const isLandscape = window.innerWidth > window.innerHeight;
|
||||
|
||||
const desktopBtn = document.querySelector('.desktop-btn');
|
||||
const phoneBtn = document.querySelector('.phone-btn');
|
||||
const desktopUse = document.getElementById('desktopIcon');
|
||||
const phoneUse = document.getElementById('phoneIcon');
|
||||
if (isLandscape) {
|
||||
portfolioWrapper.classList.remove('mobile-view');
|
||||
sideWrapper.classList.add('rotated-desktop');
|
||||
sideWrapper.classList.add('is-rotated');
|
||||
overlay.classList.add('is-rotated2');
|
||||
|
||||
desktopBtn?.classList.add('active');
|
||||
phoneBtn?.classList.remove('active');
|
||||
|
||||
desktopUse?.setAttribute('href', './src/assets/icons/portfolioP.svg#descktop-icon-active');
|
||||
|
||||
phoneUse?.setAttribute('href', './src/assets/icons/portfolioP.svg#phone-icon');
|
||||
} else {
|
||||
portfolioWrapper.classList.add('mobile-view');
|
||||
sideWrapper.classList.remove('rotated-desktop');
|
||||
sideWrapper.classList.remove('is-rotated');
|
||||
overlay.classList.remove('is-rotated2');
|
||||
|
||||
phoneBtn?.classList.add('active');
|
||||
desktopBtn?.classList.remove('active');
|
||||
|
||||
phoneUse?.setAttribute('href', './src/assets/icons/portfolioP.svg#phone-icon-active');
|
||||
|
||||
desktopUse?.setAttribute('href', './src/assets/icons/portfolioP.svg#descktop-icon');
|
||||
}
|
||||
}
|
||||
updateOrientationState();
|
||||
|
||||
Reference in New Issue
Block a user