added zoom in buttons
This commit is contained in:
+65
-14
@@ -2922,7 +2922,7 @@ html {
|
||||
.info-modal-cv-title {
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
color: #27ae60;
|
||||
color: #f39c12; /* Orange subtitle */
|
||||
margin-bottom: 0;
|
||||
letter-spacing: 0.05em;
|
||||
display: flex;
|
||||
@@ -2931,6 +2931,10 @@ html {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#info-modal .info-modal-cv-title {
|
||||
color: #27ae60;
|
||||
}
|
||||
|
||||
.info-modal-photo {
|
||||
width: 40px;
|
||||
height: 53px;
|
||||
@@ -3669,6 +3673,11 @@ html {
|
||||
user-select: none; /* Prevent text selection while dragging */
|
||||
}
|
||||
|
||||
/* Hidden state for zoom control and show button */
|
||||
.zoom-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Close button for zoom control */
|
||||
.zoom-close-btn {
|
||||
position: absolute;
|
||||
@@ -3838,9 +3847,9 @@ html {
|
||||
|
||||
/* Green hover only when zoom is not at default (100) */
|
||||
.zoom-reset-btn.zoom-not-default:hover {
|
||||
background: rgb(23 210 102 / 50%);
|
||||
border-color: rgb(21 103 55 / 20%);
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
background: #74aacd;
|
||||
border-color: #74aacd;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.zoom-reset-btn:active {
|
||||
@@ -3893,6 +3902,46 @@ html {
|
||||
============================================================================= */
|
||||
|
||||
/* Shortcuts Button (Fixed Left) - Mirrors info-button on opposite side */
|
||||
/* Zoom Toggle Button (above shortcuts button) */
|
||||
.zoom-toggle-btn {
|
||||
position: fixed;
|
||||
bottom: 10rem; /* Above shortcuts button */
|
||||
left: 2rem;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background: var(--black-bar);
|
||||
color: white; /* Match other buttons when inactive */
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||
transition: all 0.3s ease;
|
||||
z-index: 999;
|
||||
opacity: 0.6; /* Match shortcuts button opacity */
|
||||
}
|
||||
|
||||
.zoom-toggle-btn:hover {
|
||||
opacity: 1;
|
||||
transform: translateY(-3px);
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
|
||||
background: #3498db; /* Blue hover */
|
||||
}
|
||||
|
||||
.zoom-toggle-btn.zoom-active {
|
||||
opacity: 1;
|
||||
background: #3498db; /* Blue when active */
|
||||
color: white;
|
||||
}
|
||||
|
||||
.zoom-toggle-btn.zoom-active:hover {
|
||||
background: #2980b9; /* Darker blue on hover when active */
|
||||
transform: translateY(-3px);
|
||||
box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4); /* Blue glow */
|
||||
}
|
||||
|
||||
.shortcuts-btn {
|
||||
position: fixed;
|
||||
bottom: 6rem; /* Above back-to-top button (2rem + 50px + gap) */
|
||||
@@ -3917,12 +3966,12 @@ html {
|
||||
opacity: 1;
|
||||
transform: translateY(-3px);
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
|
||||
background: #3498db;
|
||||
background: #f39c12; /* Orange hover */
|
||||
}
|
||||
|
||||
.shortcuts-btn.at-bottom {
|
||||
opacity: 1;
|
||||
background: #3498db;
|
||||
background: #f39c12; /* Orange when at bottom */
|
||||
}
|
||||
|
||||
.shortcuts-btn:active {
|
||||
@@ -3960,9 +4009,9 @@ html {
|
||||
left: 2px;
|
||||
font-size: 2rem;
|
||||
font-weight: 700;
|
||||
color: #27ae60; /* Green brackets - matching info modal */
|
||||
color: #575757ff; /* Dark brackets - matching info modal */
|
||||
line-height: 1;
|
||||
top: 4px;
|
||||
top: -3px;
|
||||
}
|
||||
|
||||
.keyboard-icon-wrapper::after {
|
||||
@@ -3971,13 +4020,15 @@ html {
|
||||
right: 2px;
|
||||
font-size: 2rem;
|
||||
font-weight: 700;
|
||||
color: #27ae60; /* Green brackets - matching info modal */
|
||||
color: #575757ff; /* Dark brackets - matching info modal */
|
||||
line-height: 1;
|
||||
top: 4px;
|
||||
top: -3px;
|
||||
}
|
||||
|
||||
.keyboard-icon-wrapper iconify-icon {
|
||||
color: #27ae60; /* Green icon - matching info modal */
|
||||
color: #f39c12;
|
||||
position: relative;
|
||||
top: 1px;
|
||||
}
|
||||
|
||||
/* Add margin-bottom to subtitle */
|
||||
@@ -4009,17 +4060,17 @@ html {
|
||||
.shortcuts-section-title {
|
||||
font-size: 1.05rem;
|
||||
font-weight: 600;
|
||||
color: #27ae60; /* GREEN for section headers (matching info dialog) */
|
||||
color: #827a6e; /* Brownish-gray for section header text */
|
||||
margin-bottom: 0.75rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
border-bottom: 2px solid rgba(39, 174, 96, 0.2); /* Green border */
|
||||
border-bottom: 2px solid rgba(130, 122, 110, 0.2); /* Matching border */
|
||||
}
|
||||
|
||||
.shortcuts-section-title iconify-icon {
|
||||
color: #27ae60; /* GREEN icons for section headers */
|
||||
color: #f39c12; /* ORANGE icons for section headers */
|
||||
}
|
||||
|
||||
.shortcuts-list {
|
||||
|
||||
@@ -347,6 +347,75 @@
|
||||
// INITIALIZATION
|
||||
// =============================================================================
|
||||
|
||||
/**
|
||||
* Initialize zoom control button handlers
|
||||
* Handles close button, show button, and toggle button
|
||||
*/
|
||||
function initZoomControlButtons() {
|
||||
const closeBtn = document.getElementById('zoom-close');
|
||||
const showBtn = document.getElementById('show-zoom-menu-btn');
|
||||
const toggleBtn = document.getElementById('zoom-toggle-button');
|
||||
const zoomControl = document.getElementById('zoom-control');
|
||||
|
||||
// Helper function to toggle zoom visibility
|
||||
function toggleZoom(show) {
|
||||
if (show) {
|
||||
zoomControl.classList.remove('zoom-hidden');
|
||||
if (showBtn) showBtn.classList.add('zoom-hidden');
|
||||
if (toggleBtn) toggleBtn.classList.add('zoom-active');
|
||||
localStorage.setItem('cv-zoom-visible', 'true');
|
||||
} else {
|
||||
zoomControl.classList.add('zoom-hidden');
|
||||
if (showBtn) showBtn.classList.remove('zoom-hidden');
|
||||
if (toggleBtn) toggleBtn.classList.remove('zoom-active');
|
||||
localStorage.setItem('cv-zoom-visible', 'false');
|
||||
}
|
||||
}
|
||||
|
||||
// Close button handler
|
||||
if (closeBtn && zoomControl) {
|
||||
closeBtn.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
console.log('Zoom close clicked');
|
||||
toggleZoom(false);
|
||||
});
|
||||
}
|
||||
|
||||
// Show button handler (hamburger menu)
|
||||
if (showBtn && zoomControl) {
|
||||
showBtn.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
console.log('Zoom show clicked');
|
||||
toggleZoom(true);
|
||||
});
|
||||
}
|
||||
|
||||
// Toggle button handler (fixed button)
|
||||
if (toggleBtn && zoomControl) {
|
||||
toggleBtn.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
const isVisible = !zoomControl.classList.contains('zoom-hidden');
|
||||
console.log('Zoom toggle clicked, currently visible:', isVisible);
|
||||
toggleZoom(!isVisible);
|
||||
});
|
||||
}
|
||||
|
||||
// Set initial toggle button state (only active if explicitly 'true')
|
||||
const isVisible = localStorage.getItem('cv-zoom-visible');
|
||||
if (toggleBtn) {
|
||||
if (isVisible === 'true') {
|
||||
toggleBtn.classList.add('zoom-active');
|
||||
} else {
|
||||
toggleBtn.classList.remove('zoom-active');
|
||||
}
|
||||
}
|
||||
|
||||
console.log('Zoom control initialized. localStorage cv-zoom-visible:', isVisible);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize all CV interactive features when DOM is ready
|
||||
*/
|
||||
@@ -356,6 +425,7 @@
|
||||
initPreferences();
|
||||
initErrorToastClose();
|
||||
initHTMXHandlers();
|
||||
initZoomControlButtons();
|
||||
});
|
||||
|
||||
// =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user