Il pulsante di stampa serve a permettere agli utenti di stampare il contenuto della pagina corrente.
Requisiti
Il pattern è semplicissimo e può essere inserito liberamente in un template, pagina singola o globalmente:
<!-- wp:gpci/icon {"SvgContent":"\u003csvg xmlns=\u0022http://www.w3.org/2000/svg\u0022 viewBox=\u00220 0 512 512\u0022\u003e\u003cpath d=\u0022M448 192V77.3c0-8.5-3.4-16.6-9.4-22.6L393.4 9.4c-6-6-14.1-9.4-22.6-9.4H96C78.3 0 64 14.3 64 32v160c-35.4 0-64 28.7-64 64v112c0 8.8 7.2 16 16 16h48v96c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32v-96h48c8.8 0 16-7.2 16-16V256c0-35.4-28.7-64-64-64zm-64 256H128v-96h256v96zm0-224H128V64h192v48c0 8.8 7.2 16 16 16h48v96zm48 72c-13.3 0-24-10.8-24-24 0-13.3 10.8-24 24-24s24 10.7 24 24c0 13.3-10.8 24-24 24z\u0022/\u003e\u003c/svg\u003e","backgroundColor":"grigio-chiaro","textColor":"giallo","style":{"elements":{"link":{"color":{"text":"var:preset|color|giallo"}}},"spacing":{"padding":{"top":"var:preset|spacing|20","bottom":"var:preset|spacing|20","left":"var:preset|spacing|20","right":"var:preset|spacing|20"}}},"ClientId":"05b0c94c-db45-4fcb-a376-f906e8d3678b","styleInline":"cursor:pointer;","AttributesDefinition":[[{"AttributeName":"onclick"},{"AttributeValue":"window.print();"},{"AttributeSelector":"id"},{"AttributeSelectorContent":""},{"RepeatSelection":false},{"prependAttribute":false},{"AttributeValueType":"string"}]],"ForeachArrayInType":"string","AdminOnlySettings":[],"IsInnerBlock":true,"BlockBackendLocation":"GutenbergBackendPost"} -->
<div class="wp-block-gpci-icon has-giallo-color has-grigio-chiaro-background-color has-text-color has-background has-link-color" style="padding-top:var(--wp--preset--spacing--20);padding-right:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20);cursor:pointer;width:3rem;height:3rem;fill:currentColor" onclick="window.print();"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M448 192V77.3c0-8.5-3.4-16.6-9.4-22.6L393.4 9.4c-6-6-14.1-9.4-22.6-9.4H96C78.3 0 64 14.3 64 32v160c-35.4 0-64 28.7-64 64v112c0 8.8 7.2 16 16 16h48v96c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32v-96h48c8.8 0 16-7.2 16-16V256c0-35.4-28.7-64-64-64zm-64 256H128v-96h256v96zm0-224H128V64h192v48c0 8.8 7.2 16 16 16h48v96zm48 72c-13.3 0-24-10.8-24-24 0-13.3 10.8-24 24-24s24 10.7 24 24c0 13.3-10.8 24-24 24z"/></svg></div>
<!-- /wp:gpci/icon -->