7ab150a48e
- Move initZoomControlButtons() from main.js to hyperscript handlers - zoom-toggle-button: on click call toggleZoomControl() - zoom-close: on click call hideZoomControl() - show-zoom-menu-btn: on click call showZoomControl() - Move expandAllSections/collapseAllSections from JS to utils._hs - Add zoom visibility functions to zoom._hs: - showZoomControl(), hideZoomControl(), toggleZoomControl() - Update hamburger menu links to use hyperscript calls Eliminates ~75 more lines of JavaScript in favor of declarative hyperscript, continuing the pattern of moving behavior to ._hs files.
14 lines
614 B
HTML
14 lines
614 B
HTML
{{define "zoom-toggle-button"}}
|
|
<!-- Zoom Toggle Button (Fixed Left, above shortcuts button) -->
|
|
<button
|
|
id="zoom-toggle-button"
|
|
class="fixed-btn zoom-toggle-btn no-print has-tooltip"
|
|
aria-label="{{if eq .Lang "es"}}Alternar control de zoom{{else}}Toggle zoom control{{end}}"
|
|
data-tooltip="{{if eq .Lang "es"}}Control de zoom{{else}}Zoom control{{end}}"
|
|
_="on click call toggleZoomControl()
|
|
on mouseenter call highlightZoomControl(true)
|
|
on mouseleave call highlightZoomControl(false)">
|
|
<iconify-icon icon="mdi:magnify" width="28" height="28"></iconify-icon>
|
|
</button>
|
|
{{end}}
|