monday last fixes before printing

This commit is contained in:
juanatsap
2025-11-17 08:34:50 +00:00
parent fbc270278e
commit 7fc4f76706
24 changed files with 4496 additions and 132 deletions
+37 -17
View File
@@ -108,15 +108,38 @@
_="on load call initScrollBehavior()
on scroll from window call handleScroll()
on keydown
if event.key is '?' and not event.ctrlKey and not event.metaKey and not event.altKey
set tagName to event.target.tagName
if tagName is not 'INPUT' and tagName is not 'TEXTAREA'
halt the event
set modal to #shortcuts-modal
if modal
call modal.showModal()
end
end
set tagName to event.target.tagName
set isInputField to (tagName is 'INPUT' or tagName is 'TEXTAREA')
-- Show shortcuts modal with '?'
if event.key is '?' and not event.ctrlKey and not event.metaKey and not event.altKey and not isInputField
halt the event
set modal to #shortcuts-modal
if modal then call modal.showModal() end
end
-- Toggle CV length with 'L'
if event.key is 'l' or event.key is 'L' and not event.ctrlKey and not event.metaKey and not event.altKey and not isInputField
halt the event
set paper to the first .cv-paper
set isCurrentlyLong to paper.classList.contains('cv-long')
call toggleCVLength(not isCurrentlyLong)
end
-- Toggle icons with 'I'
if event.key is 'i' or event.key is 'I' and not event.ctrlKey and not event.metaKey and not event.altKey and not isInputField
halt the event
set paper to the first .cv-paper
set hasIcons to paper.classList.contains('show-icons')
call toggleIcons(not hasIcons)
end
-- Toggle theme with 'V'
if event.key is 'v' or event.key is 'V' and not event.ctrlKey and not event.metaKey and not event.altKey and not isInputField
halt the event
set container to the first .cv-container
set isClean to container.classList.contains('theme-clean')
call toggleTheme(not isClean)
end
end">
<!-- Top anchor for back-to-top link -->
@@ -136,15 +159,12 @@
</div> <!-- End zoom-wrapper -->
{{template "error-toast" .}}
<!-- Fixed buttons container - Flexbox layout (desktop: left side bottom-to-top, mobile: bottom center horizontal) -->
<div class="fixed-buttons-container">
{{template "download-button" .}}
{{template "print-friendly-button" .}}
{{template "zoom-toggle-button" .}}
{{template "shortcuts-button" .}}
{{template "info-button" .}}
</div>
{{template "back-to-top" .}}
{{template "info-button" .}}
{{template "download-button" .}}
{{template "print-friendly-button" .}}
{{template "zoom-toggle-button" .}}
{{template "shortcuts-button" .}}
{{template "info-modal" .}}
{{template "shortcuts-modal" .}}
{{template "pdf-modal" .}}
@@ -8,7 +8,7 @@
aria-label="{{if eq .Lang "es"}}Descargar como PDF{{else}}Download as PDF{{end}}"
_="on mouseenter call syncPdfHover(true)
on mouseleave call syncPdfHover(false)">
<iconify-icon icon="catppuccin:pdf" width="18" height="18"></iconify-icon>
<iconify-icon icon="catppuccin:pdf" width="24" height="24"></iconify-icon>
{{if eq .Lang "es"}}Descargar como PDF{{else}}Download as PDF{{end}}
</button>
<button
@@ -17,7 +17,7 @@
_="on click call printFriendly()
on mouseenter call syncPrintHover(true)
on mouseleave call syncPrintHover(false)">
<iconify-icon icon="mdi:leaf" width="18" height="18"></iconify-icon>
<iconify-icon icon="mdi:leaf" width="24" height="24"></iconify-icon>
{{if eq .Lang "es"}}Imprimir amigable{{else}}Print Friendly{{end}}
</button>
</div>