Files
cv-site/static/css/logo-toggle.css
T
juanatsap a8d6805e27 feat: enhance shortcuts modal and complete logos-to-icons rename
This commit includes graphical keyboard icons integration, modal styling
improvements, and comprehensive "Logos" to "Icons" terminology update.

Changes:
- Add graphical keyboard icons using Iconify MDI (Tab, Ctrl, Cmd, Esc, etc.)
- Implement color scheme: black title, green subtitle/headers, blue kbd elements
- Add visual boxes with borders and shadows for section grouping
- Change modal from 3-column to 2-column grid layout (900px width)
- Fix critical bug: all 5 sections now render (was only showing 2)

Rename "Logos" to "Icons" across entire codebase:
- Go models: ToggleLogos → ToggleIcons, ShowLogos → ShowIcons
- Routes: /toggle/logos → /toggle/icons
- Templates: desktop-logo-toggle → desktop-icon-toggle, #logoToggle → #iconToggle
- JavaScript: logoToggles → iconToggles, sync logic updated
- CSS: .show-logos → .show-icons
- UI JSON: toggleLogos → toggleIcons
- Comments and labels updated

Technical details:
- Rebuilt Go binary to fix template rendering error
- Fixed JSON struct tag: json:"toggleLogos" → json:"toggleIcons"
- Updated kbd element styling for icon alignment (inline-flex)
- Added margin-bottom to subtitle (0.5rem)
- Grid now 2 columns for better 5-section layout

All 5 sections now render correctly:
1. Zoom Control
2. View Controls
3. Navigation
4. Actions
5. Browser Defaults
2025-11-15 18:42:35 +00:00

230 lines
5.0 KiB
CSS

/* Toggle Components - Unified Design */
.language-toggle,
.cv-length-toggle,
.logo-toggle {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
white-space: nowrap;
}
.toggle-switch {
display: inline-block;
cursor: pointer;
user-select: none;
position: relative;
}
.toggle-switch input[type="checkbox"] {
position: absolute;
opacity: 0;
width: 0;
height: 0;
}
.toggle-slider {
position: relative;
display: inline-block;
width: 50px;
height: 26px;
background-color: #555;
border-radius: 26px;
transition: background-color 0.3s ease;
}
.toggle-slider::after {
content: '';
position: absolute;
width: 20px;
height: 20px;
border-radius: 50%;
background-color: white;
top: 3px;
left: 3px;
transition: transform 0.3s ease;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.toggle-switch input[type="checkbox"]:checked + .toggle-slider {
background-color: var(--accent-blue);
}
.toggle-switch input[type="checkbox"]:checked + .toggle-slider::after {
transform: translateX(24px);
}
.toggle-switch input[type="checkbox"]:focus + .toggle-slider {
box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
}
.toggle-label-left,
.toggle-label-right {
font-size: 0.8rem;
font-weight: 500;
color: #999;
transition: all 0.3s ease;
white-space: nowrap;
display: flex;
align-items: center;
justify-content: center;
height: 28px;
}
/* Flag icons - special styling */
.flag-icon {
border-radius: 50%;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
}
/* Highlight active label/icon based on parent container state */
.language-toggle:has(#langToggle:not(:checked)) .toggle-label-left,
.cv-length-toggle:has(#lengthToggle:not(:checked)) .toggle-label-left,
.logo-toggle:has(#logoToggle:not(:checked)) .toggle-label-left {
color: #fff;
opacity: 1;
}
.language-toggle:has(#langToggle:checked) .toggle-label-right,
.cv-length-toggle:has(#lengthToggle:checked) .toggle-label-right,
.logo-toggle:has(#logoToggle:checked) .toggle-label-right {
color: #fff;
opacity: 1;
}
/* Dim inactive icons */
.language-toggle:has(#langToggle:not(:checked)) .toggle-label-right,
.cv-length-toggle:has(#lengthToggle:not(:checked)) .toggle-label-right,
.logo-toggle:has(#logoToggle:not(:checked)) .toggle-label-right {
opacity: 0.4;
}
.language-toggle:has(#langToggle:checked) .toggle-label-left,
.cv-length-toggle:has(#lengthToggle:checked) .toggle-label-left,
.logo-toggle:has(#logoToggle:checked) .toggle-label-left {
opacity: 0.4;
}
/* Experience Item with Logo Support */
.experience-item {
margin-bottom: 2.5rem;
padding-bottom: 2rem;
border-bottom: 2px solid #ddd;
page-break-inside: avoid;
display: flex;
gap: 1.2rem;
position: relative;
transition: gap 0.3s ease-in-out;
}
.experience-item:last-child {
border-bottom: none;
padding-bottom: 0;
}
/* Adjust gap when icons are hidden */
.cv-paper:not(.show-icons) .experience-item {
gap: 0;
}
.company-logo {
display: block;
flex-shrink: 0;
}
.company-logo img {
width: 80px;
height: 80px;
object-fit: contain;
border-radius: 4px;
border: 1px solid #ddd;
background: white;
padding: 10px;
}
.default-company-icon {
width: 80px;
height: 80px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
border: 1px solid #ddd;
background: #f5f5f5;
color: #999;
padding: 10px;
}
.experience-content {
flex: 1;
min-width: 0; /* Prevents flex item from overflowing */
}
/* Animate icons with fade and scale */
.company-logo,
.award-logo {
overflow: hidden;
transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out, width 0.3s ease-in-out, height 0.3s ease-in-out, margin 0.3s ease-in-out;
opacity: 1;
transform: scale(1);
width: auto;
height: auto;
}
/* Hide icons when toggle is OFF - with animation */
.cv-paper:not(.show-icons) .company-logo,
.cv-paper:not(.show-icons) .award-logo {
opacity: 0;
transform: scale(0.8);
width: 0;
height: 0;
margin: 0;
padding: 0;
pointer-events: none;
overflow: hidden;
}
/* Show icons when toggle is ON (default) - with animation */
.show-icons .company-logo,
.show-icons .award-logo {
opacity: 1;
transform: scale(1);
width: auto;
height: auto;
}
/* Company icons visible in print - styling controlled by print.css */
/* Mobile responsiveness */
@media (max-width: 768px) {
.logo-toggle {
order: 3; /* Move to bottom on mobile */
}
.toggle-label {
font-size: 0.85rem;
}
.toggle-slider {
width: 38px;
height: 20px;
}
.toggle-slider::after {
width: 14px;
height: 14px;
}
.toggle-switch input[type="checkbox"]:checked + .toggle-slider::after {
transform: translateX(18px);
}
.company-logo img {
width: 40px;
height: 40px;
}
}