From e44a72f559248010dff2db4be2599f398596dd3c Mon Sep 17 00:00:00 2001 From: Local Build Date: Thu, 13 Aug 2026 21:20:27 +0200 Subject: [PATCH] feat(pdf): add print FAB + fix color-mix via clean clone approach MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added secondary FAB button 'Печать' with printer icon (window.print) - Created printer.svg icon for the print button - Added .fab-secondary__ico--print CSS class - Fixed html2pdf color-mix() issue: buildCleanClone() creates a deep clone with all computed styles inlined, all stylesheets removed, and pseudo-elements converted to real DOM elements before passing to html2pdf - Two separate handlers: pdfBtn for download, printBtn for print dialog --- public/assets/shared/icons/printer.svg | 1 + public/css/main.css | 6 + public/resume-5.html | 186 ++++++++++++++++++------- src/pages/resume-5.html | 182 ++++++++++++++++++------ src/partials/fab-stack-resume.html | 5 +- 5 files changed, 286 insertions(+), 94 deletions(-) create mode 100644 public/assets/shared/icons/printer.svg diff --git a/public/assets/shared/icons/printer.svg b/public/assets/shared/icons/printer.svg new file mode 100644 index 0000000..b48e039 --- /dev/null +++ b/public/assets/shared/icons/printer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/css/main.css b/public/css/main.css index 5faa16e..15874ee 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -960,6 +960,12 @@ a.fab--secondary:visited { -webkit-mask-image: url("../assets/shared/icons/cv.svg"); } +/* ── Print FAB ── */ +.fab-secondary__ico--print { + mask-image: url("../assets/shared/icons/printer.svg"); + -webkit-mask-image: url("../assets/shared/icons/printer.svg"); +} + .fab--label { width: auto; padding: 0.65rem 1.1rem; diff --git a/public/resume-5.html b/public/resume-5.html index c49867b..1d255a0 100644 --- a/public/resume-5.html +++ b/public/resume-5.html @@ -322,8 +322,10 @@ Скачать в PDF + -
@@ -972,51 +974,152 @@ diff --git a/src/pages/resume-5.html b/src/pages/resume-5.html index de48e70..7442a1a 100644 --- a/src/pages/resume-5.html +++ b/src/pages/resume-5.html @@ -841,51 +841,152 @@ {{> cookie-notice}} diff --git a/src/partials/fab-stack-resume.html b/src/partials/fab-stack-resume.html index 41d1329..2796ffe 100644 --- a/src/partials/fab-stack-resume.html +++ b/src/partials/fab-stack-resume.html @@ -4,4 +4,7 @@ Скачать в PDF -
+ +
\ No newline at end of file