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
This commit is contained in:
+10
-10
@@ -125,8 +125,8 @@
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
/* Adjust gap when logos are hidden */
|
||||
.cv-paper:not(.show-logos) .experience-item {
|
||||
/* Adjust gap when icons are hidden */
|
||||
.cv-paper:not(.show-icons) .experience-item {
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
min-width: 0; /* Prevents flex item from overflowing */
|
||||
}
|
||||
|
||||
/* Animate logos with fade and scale */
|
||||
/* Animate icons with fade and scale */
|
||||
.company-logo,
|
||||
.award-logo {
|
||||
overflow: hidden;
|
||||
@@ -174,9 +174,9 @@
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* Hide logos when toggle is OFF - with animation */
|
||||
.cv-paper:not(.show-logos) .company-logo,
|
||||
.cv-paper:not(.show-logos) .award-logo {
|
||||
/* 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;
|
||||
@@ -187,16 +187,16 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Show logos when toggle is ON (default) - with animation */
|
||||
.show-logos .company-logo,
|
||||
.show-logos .award-logo {
|
||||
/* 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 logos visible in print - styling controlled by print.css */
|
||||
/* Company icons visible in print - styling controlled by print.css */
|
||||
|
||||
/* Mobile responsiveness */
|
||||
@media (max-width: 768px) {
|
||||
|
||||
+28
-28
@@ -1082,7 +1082,7 @@ iconify-icon {
|
||||
color: var(--text-gray);
|
||||
}
|
||||
|
||||
/* Responsibilities with company logos (similar to main experience layout) */
|
||||
/* Responsibilities with company icons (similar to main experience layout) */
|
||||
.responsibilities li:has(img),
|
||||
.responsibilities li:has(iconify-icon) {
|
||||
display: grid;
|
||||
@@ -1806,63 +1806,63 @@ a:focus {
|
||||
/* Keep border on all award items including last one */
|
||||
|
||||
/* ========================================
|
||||
HIDE LOGOS, ICONS, AND BADGES MODE
|
||||
HIDE ICONS, ICONS, AND BADGES MODE
|
||||
======================================== */
|
||||
|
||||
/* Adjust gap when logos are hidden */
|
||||
.cv-paper:not(.show-logos) .award-item {
|
||||
/* Adjust gap when icons are hidden */
|
||||
.cv-paper:not(.show-icons) .award-item {
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
/* Hide all logos when .show-logos is not present */
|
||||
.cv-paper:not(.show-logos) .company-logo,
|
||||
.cv-paper:not(.show-logos) .award-logo,
|
||||
.cv-paper:not(.show-logos) .project-icon,
|
||||
.cv-paper:not(.show-logos) .course-icon {
|
||||
/* Hide all icons when .show-icons is not present */
|
||||
.cv-paper:not(.show-icons) .company-logo,
|
||||
.cv-paper:not(.show-icons) .award-logo,
|
||||
.cv-paper:not(.show-icons) .project-icon,
|
||||
.cv-paper:not(.show-icons) .course-icon {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Hide logos inside responsibilities (Drolosoft sub-clients, Third Party projects) */
|
||||
.cv-paper:not(.show-logos) .responsibilities li img,
|
||||
.cv-paper:not(.show-logos) .responsibilities li iconify-icon.default-company-icon {
|
||||
/* Hide icons inside responsibilities (Drolosoft sub-clients, Third Party projects) */
|
||||
.cv-paper:not(.show-icons) .responsibilities li img,
|
||||
.cv-paper:not(.show-icons) .responsibilities li iconify-icon.default-company-icon {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Adjust layout for responsibilities without logos */
|
||||
.cv-paper:not(.show-logos) .responsibilities li:has(img),
|
||||
.cv-paper:not(.show-logos) .responsibilities li:has(iconify-icon) {
|
||||
/* Adjust layout for responsibilities without icons */
|
||||
.cv-paper:not(.show-icons) .responsibilities li:has(img),
|
||||
.cv-paper:not(.show-icons) .responsibilities li:has(iconify-icon) {
|
||||
display: block !important;
|
||||
grid-template-columns: none !important;
|
||||
padding-left: 1.2rem !important;
|
||||
}
|
||||
|
||||
/* Restore bullet points for responsibilities without logos */
|
||||
.cv-paper:not(.show-logos) .responsibilities li:has(img):before,
|
||||
.cv-paper:not(.show-logos) .responsibilities li:has(iconify-icon):before {
|
||||
/* Restore bullet points for responsibilities without icons */
|
||||
.cv-paper:not(.show-icons) .responsibilities li:has(img):before,
|
||||
.cv-paper:not(.show-icons) .responsibilities li:has(iconify-icon):before {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
/* Hide all section icons */
|
||||
.cv-paper:not(.show-logos) .section-icon {
|
||||
.cv-paper:not(.show-icons) .section-icon {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Hide all badges (Current, Expired, Maintained By) */
|
||||
.cv-paper:not(.show-logos) .current-badge,
|
||||
.cv-paper:not(.show-logos) .expired-badge,
|
||||
.cv-paper:not(.show-logos) .maintained-badge {
|
||||
.cv-paper:not(.show-icons) .current-badge,
|
||||
.cv-paper:not(.show-icons) .expired-badge,
|
||||
.cv-paper:not(.show-icons) .maintained-badge {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Adjust experience items layout when logos are hidden */
|
||||
.cv-paper:not(.show-logos) .experience-item {
|
||||
/* Adjust experience items layout when icons are hidden */
|
||||
.cv-paper:not(.show-icons) .experience-item {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
/* Adjust project and course items layout when icons are hidden */
|
||||
.cv-paper:not(.show-logos) .project-item,
|
||||
.cv-paper:not(.show-logos) .course-item,
|
||||
.cv-paper:not(.show-logos) .award-item {
|
||||
.cv-paper:not(.show-icons) .project-item,
|
||||
.cv-paper:not(.show-icons) .course-item,
|
||||
.cv-paper:not(.show-icons) .award-item {
|
||||
display: block !important;
|
||||
gap: 0 !important;
|
||||
}
|
||||
@@ -3856,7 +3856,7 @@ html {
|
||||
|
||||
#shortcuts-modal .info-modal-body {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr; /* 3 equal columns - less tall! */
|
||||
grid-template-columns: 1fr 1fr; /* 2 columns for 5 sections (3+2) */
|
||||
gap: 1.2rem 1.5rem; /* row gap, column gap */
|
||||
margin-top: 1.5rem; /* Increased spacing since no description */
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
}
|
||||
|
||||
/* ===================================
|
||||
SHOW ALL ICONS, LOGOS, AND BADGES - Print Default
|
||||
SHOW ALL ICONS, ICONS, AND BADGES - Print Default
|
||||
=================================== */
|
||||
|
||||
/* Section title icons - smaller for print */
|
||||
@@ -56,7 +56,7 @@
|
||||
margin-right: 4px !important;
|
||||
}
|
||||
|
||||
/* Company/Project/Course logos - compact for print */
|
||||
/* Company/Project/Course icons - compact for print */
|
||||
.company-logo,
|
||||
.project-icon,
|
||||
.course-icon,
|
||||
@@ -304,7 +304,7 @@
|
||||
EXPERIENCE - REDUCED SPACING (60px → 26px)
|
||||
=================================== */
|
||||
.experience-item {
|
||||
display: flex !important; /* Show logos side-by-side with content */
|
||||
display: flex !important; /* Show icons side-by-side with content */
|
||||
gap: 12px !important;
|
||||
margin-bottom: 4mm !important; /* ~15px, down from 40px */
|
||||
padding-bottom: 3mm !important; /* ~11px, down from 32px */
|
||||
@@ -365,7 +365,7 @@
|
||||
.project-item,
|
||||
.course-item,
|
||||
.award-item {
|
||||
display: flex !important; /* Show logos side-by-side with content */
|
||||
display: flex !important; /* Show icons side-by-side with content */
|
||||
gap: 12px !important;
|
||||
margin-bottom: 4mm !important;
|
||||
padding-bottom: 3mm !important;
|
||||
|
||||
+19
-19
@@ -84,7 +84,7 @@
|
||||
|
||||
/**
|
||||
* Initialize user preferences from localStorage
|
||||
* Handles language, theme, length, and logos persistence across sessions
|
||||
* Handles language, theme, length, and icons persistence across sessions
|
||||
*/
|
||||
function initPreferences() {
|
||||
// Language preference
|
||||
@@ -105,7 +105,7 @@
|
||||
// This ensures client-side preferences override server defaults
|
||||
const savedTheme = localStorage.getItem('cv-theme');
|
||||
const savedLength = localStorage.getItem('cv-length');
|
||||
const savedLogos = localStorage.getItem('cv-logos');
|
||||
const savedIcons = localStorage.getItem('cv-icons');
|
||||
|
||||
// Apply theme preference
|
||||
if (savedTheme === 'clean') {
|
||||
@@ -134,16 +134,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Apply logos preference
|
||||
if (cvPaper && savedLogos !== null) {
|
||||
if (savedLogos === 'true') {
|
||||
cvPaper.classList.add('show-logos');
|
||||
const logoToggles = document.querySelectorAll('#logoToggle, #logoToggleMenu');
|
||||
logoToggles.forEach(toggle => toggle.checked = true);
|
||||
// Apply icons preference
|
||||
if (cvPaper && savedIcons !== null) {
|
||||
if (savedIcons === 'true') {
|
||||
cvPaper.classList.add('show-icons');
|
||||
const iconToggles = document.querySelectorAll('#iconToggle, #iconToggleMenu');
|
||||
iconToggles.forEach(toggle => toggle.checked = true);
|
||||
} else {
|
||||
cvPaper.classList.remove('show-logos');
|
||||
const logoToggles = document.querySelectorAll('#logoToggle, #logoToggleMenu');
|
||||
logoToggles.forEach(toggle => toggle.checked = false);
|
||||
cvPaper.classList.remove('show-icons');
|
||||
const iconToggles = document.querySelectorAll('#iconToggle, #iconToggleMenu');
|
||||
iconToggles.forEach(toggle => toggle.checked = false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -271,14 +271,14 @@
|
||||
console.log(`Toggle sync - Length: desktop=${isLong}, mobile=${isLong}`);
|
||||
}
|
||||
|
||||
// Sync logo toggles
|
||||
const desktopLogoToggle = document.getElementById('logoToggle');
|
||||
const mobileLogoToggle = document.getElementById('logoToggleMenu');
|
||||
if (desktopLogoToggle && mobileLogoToggle) {
|
||||
const showLogos = target.classList.contains('show-logos');
|
||||
desktopLogoToggle.checked = showLogos;
|
||||
mobileLogoToggle.checked = showLogos;
|
||||
console.log(`Toggle sync - Logos: desktop=${showLogos}, mobile=${showLogos}`);
|
||||
// Sync icon toggles
|
||||
const desktopIconToggle = document.getElementById('iconToggle');
|
||||
const mobileIconToggle = document.getElementById('iconToggleMenu');
|
||||
if (desktopIconToggle && mobileIconToggle) {
|
||||
const showIcons = target.classList.contains('show-icons');
|
||||
desktopIconToggle.checked = showIcons;
|
||||
mobileIconToggle.checked = showIcons;
|
||||
console.log(`Toggle sync - Icons: desktop=${showIcons}, mobile=${showIcons}`);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user