more htmx

This commit is contained in:
juanatsap
2025-11-14 21:38:09 +00:00
parent 15b73a915d
commit 06eb490950
32 changed files with 2517 additions and 354 deletions
@@ -11,41 +11,7 @@
<button
class="action-btn print-btn"
aria-label="{{if eq .Lang "es"}}Imprimir amigable{{else}}Print Friendly{{end}}"
_="on click
-- Store current state
set wasClean to .cv-container.classList.contains('theme-clean')
set wasLong to .cv-paper.classList.contains('cv-long')
set currentZoom to localStorage.getItem('cv-zoom') or '100'
-- Apply print-friendly settings
if not wasClean then add .theme-clean to .cv-container end
remove .cv-long from .cv-paper
add .cv-short to .cv-paper
-- Reset zoom for printing (directly set wrapper zoom to 1)
set #zoom-wrapper's *zoom to 1
-- Let CSS apply, then print
wait 50ms
call window.print()
-- Wait for print dialog to close, then restore
wait 100ms
-- Restore original theme
if not wasClean then remove .theme-clean from .cv-container end
-- Restore original length
if wasLong
remove .cv-short from .cv-paper
add .cv-long to .cv-paper
end
-- Restore original zoom by triggering slider input event
if currentZoom !== '100'
set #zoom-slider's value to currentZoom
send input to #zoom-slider
end">
_="on click call printFriendly()">
<iconify-icon icon="mdi:leaf" width="18" height="18"></iconify-icon>
{{if eq .Lang "es"}}Imprimir amigable{{else}}Print Friendly{{end}}
</button>