This commit is contained in:
juanatsap
2025-11-15 15:59:54 +00:00
parent aeab81dd42
commit 1f7757c848
39 changed files with 3781 additions and 797 deletions
+239 -1
View File
@@ -2697,7 +2697,7 @@ html {
border: none;
border-radius: 24px;
padding: 0;
max-width: 500px;
max-width: 420px;
width: calc(100% - 2rem);
background: transparent;
/* Force centering - override any browser defaults */
@@ -3756,3 +3756,241 @@ html {
.cv-page-content-wrapper {
position: relative;
}
/* =============================================================================
KEYBOARD SHORTCUTS BUTTON & MODAL
============================================================================= */
/* Shortcuts Button (Fixed Left) - Mirrors info-button on opposite side */
.shortcuts-btn {
position: fixed;
bottom: 6rem; /* Above back-to-top button (2rem + 50px + gap) */
left: 2rem; /* LEFT SIDE instead of right */
width: 50px;
height: 50px;
background: var(--black-bar);
color: white;
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);
z-index: 99;
transition: all 0.3s ease;
opacity: 0.2;
}
.shortcuts-btn:hover {
opacity: 1;
transform: translateY(-3px);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
background: #3498db;
}
.shortcuts-btn.at-bottom {
opacity: 1;
background: #3498db;
}
.shortcuts-btn:active {
transform: translateY(-1px);
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}
/* Mobile adjustments */
@media (max-width: 768px) {
.shortcuts-btn {
bottom: 5.5rem; /* Above back-to-top button (1.5rem + 45px + gap) */
left: 1.5rem; /* LEFT SIDE on mobile too */
width: 45px;
height: 45px;
}
}
/* Shortcuts Modal - Very wide for 3-column grid, less tall */
#shortcuts-modal {
max-width: 900px; /* Much wider - was 750px */
max-height: 80vh; /* Limit height */
}
/* Keyboard icon with green curly brackets (matching info modal style) */
.keyboard-icon-wrapper {
position: relative;
display: inline-flex;
align-items: center;
padding: 0 22px;
}
.keyboard-icon-wrapper::before {
content: '{';
position: absolute;
left: 2px;
font-size: 2rem;
font-weight: 700;
color: #27ae60; /* Green brackets - matching info modal */
line-height: 1;
top: 4px;
}
.keyboard-icon-wrapper::after {
content: '}';
position: absolute;
right: 2px;
font-size: 2rem;
font-weight: 700;
color: #27ae60; /* Green brackets - matching info modal */
line-height: 1;
top: 4px;
}
.keyboard-icon-wrapper iconify-icon {
color: #27ae60; /* Green icon - matching info modal */
}
/* Add margin-bottom to subtitle */
#shortcuts-modal .info-modal-cv-title {
margin-bottom: 0.5rem;
}
#shortcuts-modal .info-modal-body {
display: grid;
grid-template-columns: 1fr 1fr 1fr; /* 3 equal columns - less tall! */
gap: 1.2rem 1.5rem; /* row gap, column gap */
margin-top: 1.5rem; /* Increased spacing since no description */
}
/* Shortcuts Modal Content - Extends info-modal styles */
.shortcuts-section {
margin-top: 0; /* Grid handles spacing */
background: #f8f9fa;
border: 1px solid #e1e4e8;
border-radius: 8px;
padding: 1rem;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.shortcuts-section:first-of-type {
margin-top: 0;
}
.shortcuts-section-title {
font-size: 1.05rem;
font-weight: 600;
color: #27ae60; /* GREEN for section headers (matching info dialog) */
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 */
}
.shortcuts-section-title iconify-icon {
color: #27ae60; /* GREEN icons for section headers */
}
.shortcuts-list {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.shortcut-item {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 0.5rem 0;
}
.shortcut-keys {
display: flex;
align-items: center;
gap: 0.4rem;
flex-wrap: wrap;
}
.shortcut-keys kbd {
font-family: 'Monaco', 'Courier New', monospace;
font-size: 0.75rem;
font-weight: 600;
background: rgba(52, 152, 219, 0.08); /* Light blue background */
border: 1px solid rgba(52, 152, 219, 0.35); /* Blue border */
border-radius: 6px;
padding: 0.3rem 0.6rem;
box-shadow: 0 2px 4px rgba(52, 152, 219, 0.12), inset 0 -1px 0 rgba(52, 152, 219, 0.25);
white-space: nowrap;
text-align: center;
color: #3498db; /* Blue text */
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.2rem;
transition: all 0.2s ease;
min-width: 2rem;
}
/* Iconify icons inside kbd elements */
.shortcut-keys kbd iconify-icon {
color: inherit;
vertical-align: middle;
display: inline-flex;
}
.shortcut-item:hover .shortcut-keys kbd {
background: rgba(52, 152, 219, 0.15);
border-color: rgba(52, 152, 219, 0.5);
box-shadow: 0 2px 6px rgba(52, 152, 219, 0.25);
}
.shortcut-desc {
flex: 1;
font-size: 0.95rem;
color: var(--text-gray);
line-height: 1.4;
}
/* Mobile responsive */
@media (max-width: 768px) {
#shortcuts-modal {
max-width: calc(100% - 2rem);
}
#shortcuts-modal .info-modal-body {
grid-template-columns: 1fr; /* Single column on mobile */
gap: 1.5rem;
}
}
/* Tablet - 2 columns */
@media (min-width: 769px) and (max-width: 1024px) {
#shortcuts-modal {
max-width: 700px;
}
#shortcuts-modal .info-modal-body {
grid-template-columns: 1fr 1fr; /* 2 columns on tablet */
gap: 1.2rem 1.5rem;
}
.shortcuts-section-title {
font-size: 1rem;
}
.shortcut-item {
flex-direction: column;
align-items: flex-start;
gap: 0.35rem;
}
.shortcut-keys kbd {
font-size: 0.7rem;
padding: 0.2rem 0.4rem;
}
.shortcut-desc {
font-size: 0.9rem;
}
}
+43 -23
View File
@@ -8,7 +8,6 @@
-- PRINT FUNCTIONS
-- ==============================================================================
-- Print friendly - applies clean theme and short version for printing
def printFriendly()
-- Store current state
set container to the first .cv-container
@@ -18,7 +17,9 @@ def printFriendly()
set currentZoom to localStorage.getItem('cv-zoom') or '100'
-- Apply print-friendly settings
if wasClean is false then add .theme-clean to container end
if wasClean is false
add .theme-clean to container
end
remove .cv-long from paper
add .cv-short to paper
@@ -33,7 +34,9 @@ def printFriendly()
wait 100ms
-- Restore original theme
if wasClean is false then remove .theme-clean from container end
if wasClean is false
remove .theme-clean from container
end
-- Restore original length
if wasLong is true
@@ -52,14 +55,12 @@ end
-- SCROLL BEHAVIOR
-- ==============================================================================
-- Initialize scroll behavior state
def initScrollBehavior()
set :lastScroll to 0
set :scrollThreshold to 100
set :keepHeaderVisible to false
end
-- Handle scroll events
def handleScroll()
set currentScroll to window.pageYOffset
set menu to the first .navigation-menu
@@ -75,39 +76,58 @@ def handleScroll()
set :keepHeaderVisible to false
end
-- Header visibility based on scroll direction
if currentScroll > :scrollThreshold
if currentScroll > :lastScroll and :keepHeaderVisible is false
-- Scrolling down - hide header
add .header-hidden to .action-bar
if isMenuOpen is true then add .header-hidden to menu end
else
-- Scrolling up - show header
remove .header-hidden from .action-bar
if isMenuOpen is true then remove .header-hidden from menu end
-- Header visibility: Scrolling down past threshold
if currentScroll > :scrollThreshold and currentScroll > :lastScroll and :keepHeaderVisible is false
add .header-hidden to .action-bar
if isMenuOpen is true
add .header-hidden to menu
end
else
-- At top - always show header
remove .header-hidden from .action-bar
if isMenuOpen is true then remove .header-hidden from menu end
end
-- Back to top button visibility (show after 300px scroll)
-- Header visibility: Scrolling up past threshold
if currentScroll > :scrollThreshold and (currentScroll <= :lastScroll or :keepHeaderVisible is true)
remove .header-hidden from .action-bar
if isMenuOpen is true
remove .header-hidden from menu
end
end
-- Header visibility: At top
if currentScroll <= :scrollThreshold
remove .header-hidden from .action-bar
if isMenuOpen is true
remove .header-hidden from menu
end
end
-- Back to top button visibility
if currentScroll > 300
set #back-to-top's *display to 'flex'
else
end
if currentScroll <= 300
set #back-to-top's *display to 'none'
end
-- At-bottom positioning for fixed buttons
-- At-bottom class for fixed buttons
if isAtBottom
add .at-bottom to #back-to-top
add .at-bottom to #info-button
else
add .at-bottom to #shortcuts-button
end
if not isAtBottom
remove .at-bottom from #back-to-top
remove .at-bottom from #info-button
remove .at-bottom from #shortcuts-button
end
-- Update last scroll position
set :lastScroll to currentScroll
end
-- ==============================================================================
-- KEYBOARD SHORTCUTS
-- ==============================================================================
-- Note: Keyboard event handlers are now defined inline in the body tag
-- because hyperscript 0.9.12 doesn't support nested event handlers (on ... inside def)