Files
cv-site/templates/partials/widgets/zoom-control.html
T

48 lines
1.9 KiB
HTML
Raw Normal View History

2025-11-12 18:26:18 +00:00
{{define "zoom-control"}}
2025-11-12 22:54:46 +00:00
<!-- Zoom Control (Fixed Bottom Center, Draggable) - Hyperscript Enhanced -->
2025-11-16 12:48:12 +00:00
<div id="zoom-control" class="zoom-control no-print zoom-hidden" role="group" aria-label="{{if eq .Lang "es"}}Control de zoom{{else}}Zoom control{{end}}"
_="on load call initZoomControl(me)
on mousedown(clientX, clientY) if isZoomDragTarget(event.target) call startZoomDrag(me, clientX, clientY) then halt the event end
on mousemove(clientX, clientY) from document if moveZoomDrag(me, clientX, clientY) halt the event end
on mouseup from document call endZoomDrag(me)">
2025-11-12 22:54:46 +00:00
2025-11-12 18:26:18 +00:00
<button
id="zoom-close"
class="zoom-close-btn"
aria-label="{{if eq .Lang "es"}}Cerrar control de zoom{{else}}Close zoom control{{end}}"
title="{{if eq .Lang "es"}}Cerrar{{else}}Close{{end}}"
_="on click call hideZoomControl()">
2025-11-16 12:48:12 +00:00
<iconify-icon icon="mdi:close" width="16" height="16" style="pointer-events: none;"></iconify-icon>
2025-11-12 18:26:18 +00:00
</button>
<span class="zoom-value zoom-value-min" aria-hidden="true">25</span>
<input
type="range"
id="zoom-slider"
class="zoom-slider"
min="25"
2025-11-17 17:03:17 +00:00
max="300"
2025-11-12 18:26:18 +00:00
step="1"
value="100"
aria-label="{{if eq .Lang "es"}}Ajustar nivel de zoom del CV{{else}}Adjust CV zoom level{{end}}"
aria-valuemin="25"
2025-11-17 17:03:17 +00:00
aria-valuemax="300"
2025-11-12 18:26:18 +00:00
aria-valuenow="100"
2025-11-12 22:54:46 +00:00
aria-valuetext="100%"
_="on input call handleZoomInput(me)">
2025-11-12 18:26:18 +00:00
2025-11-17 17:03:17 +00:00
<span class="zoom-value zoom-value-max" aria-hidden="true">300</span>
2025-11-12 18:26:18 +00:00
<button
id="zoom-reset"
class="zoom-reset-btn"
aria-label="{{if eq .Lang "es"}}Restablecer zoom al 100%{{else}}Reset zoom to 100%{{end}}"
title="{{if eq .Lang "es"}}Restablecer{{else}}Reset{{end}}"
2025-11-12 22:54:46 +00:00
aria-live="polite"
_="on click call handleZoomReset()">
2025-11-12 18:26:18 +00:00
<span id="zoom-value-current">100</span>
</button>
</div>
{{end}}