2d3d3de8cd
- Lazy load ninja-keys only on CMD+K press (0 requests on initial load) - Use esm.sh bundled module (3 requests vs ~81 previously) - Add esm.sh to CSP whitelist - Implement HTML Invoker Commands API for modals: - commandfor="modal-id" + command="show-modal" for opening - commandfor="modal-id" + command="close" for closing - Removes need for onclick handlers on modal buttons - Refactor index.html into layout partials (head, body-scripts) - Add comprehensive tests for both features
35 lines
1.4 KiB
HTML
35 lines
1.4 KiB
HTML
{{define "action-buttons"}}
|
|
<!-- Right: Action buttons -->
|
|
<div class="action-buttons-right">
|
|
<button
|
|
id="action-bar-pdf-btn"
|
|
class="action-btn pdf-btn has-tooltip"
|
|
commandfor="pdf-modal"
|
|
command="show-modal"
|
|
aria-label="{{.UI.Widgets.ActionButtons.DownloadPdf}}"
|
|
data-tooltip="{{.UI.Widgets.ActionButtons.DownloadPdf}}"
|
|
_="on mouseenter call syncPdfHover(true)
|
|
on mouseleave call syncPdfHover(false)">
|
|
<iconify-icon icon="catppuccin:pdf" width="24" height="24"></iconify-icon>
|
|
{{.UI.Widgets.ActionButtons.DownloadPdf}}
|
|
</button>
|
|
<button
|
|
class="action-btn print-btn action-bar-print-btn has-tooltip"
|
|
aria-label="{{.UI.Widgets.ActionButtons.PrintFriendly}}"
|
|
data-tooltip="{{.UI.Widgets.ActionButtons.PrintFriendly}}"
|
|
_="on click call printFriendly()
|
|
on mouseenter call syncPrintHover(true)
|
|
on mouseleave call syncPrintHover(false)">
|
|
<iconify-icon icon="mdi:leaf" width="24" height="24"></iconify-icon>
|
|
{{.UI.Widgets.ActionButtons.PrintFriendly}}
|
|
</button>
|
|
<button
|
|
class="action-btn search-btn has-tooltip cmd-k-trigger"
|
|
aria-label="{{.UI.Widgets.ActionButtons.SearchAriaLabel}}"
|
|
data-tooltip="{{.UI.Widgets.ActionButtons.Search}}">
|
|
<iconify-icon icon="mdi:magnify" width="24" height="24"></iconify-icon>
|
|
{{.UI.Widgets.ActionButtons.Search}}
|
|
</button>
|
|
</div>
|
|
{{end}}
|