0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…
A print button with optional toggle to disable VB print style optimizations.
Overview
The <print-page> component wraps window.print() in a progressive enhancement button with a printer icon. It never appears on the printed page and optionally lets users toggle VB’s print style optimizations on or off.
Basic print button
<print-page>Print this page</print-page>
By default (variant="icon") the button shows only a printer icon; the label — the element’s text or the labelattribute — becomes its accessible name. Use variant="icon-label" to show the text as well. Without JavaScript, the element renders as inert text. With JavaScript, it becomes a functional print button.
When raw-toggle is present, the component adds a checkbox. If checked, it sets data-print-raw on the <html> element before opening the print dialog, which disables all VB print optimizations. The attribute is removed after printing.
With raw-mode toggle
<!-- With checkbox to disable VB print optimizations --><print-pageraw-toggle>Print this page</print-page><!-- Localised checkbox text --><print-pageraw-toggledata-label-raw="Ohne VB-Stile drucken">Seite drucken</print-page>
This is useful for users who want to see the page print exactly as it appears on screen — with theme colors, shadows, and layout intact.
Custom Label
Set the button text via label or as the element’s text content. It is shown with variant="label" or variant="icon-label", and is always the accessible name.
Custom label
<print-pagelabel="Save as PDF"variant="icon-label"></print-page>
Usage in Context
Place the component wherever makes sense. Its own stylesheet hides it in @media print — including raw-toggle prints, where VB’s print optimisations are switched off. Adding data-no-print is redundant but makes intent explicit.