{"id":219,"date":"2024-07-14T12:32:59","date_gmt":"2024-07-14T10:32:59","guid":{"rendered":"https:\/\/ajfood.pl\/?page_id=219"},"modified":"2024-08-12T14:13:12","modified_gmt":"2024-08-12T12:13:12","slug":"favourite","status":"publish","type":"page","link":"https:\/\/ajfood.pl\/en\/ulubione\/","title":{"rendered":"Favourites"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"219\" class=\"elementor elementor-219\" data-elementor-post-type=\"page\">\n\t\t\t\t<div data-dce-background-image-url=\"https:\/\/ajfood.pl\/wp-content\/uploads\/2024\/07\/tlo-tytuly.webp\" class=\"elementor-element elementor-element-3c5a583 e-flex e-con-boxed e-con e-parent\" data-id=\"3c5a583\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-33df9d4 custom-pattern-text elementor-invisible elementor-widget elementor-widget-heading\" data-id=\"33df9d4\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;motion_fx_motion_fx_scrolling&quot;:&quot;yes&quot;,&quot;_animation&quot;:&quot;fadeInUp&quot;,&quot;motion_fx_devices&quot;:[&quot;desktop&quot;,&quot;tablet&quot;,&quot;mobile&quot;]}\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h1 class=\"elementor-heading-title elementor-size-default\">Ulubione<\/h1>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-ff3223a e-flex e-con-boxed e-con e-parent\" data-id=\"ff3223a\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-e1a4e34 custom-acf-repeater-table dce-align-left elementor-widget elementor-widget-dce-dynamic-show-favorites\" data-id=\"e1a4e34\" data-element_type=\"widget\" data-e-type=\"widget\" id=\"listaulubione\" data-widget_type=\"dce-dynamic-show-favorites.table\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"dce-posts-container dce-posts \">\n\t\t\t<div class=\"dce-posts-fallback\">\n\t\t\t\t<p><h2>Nie masz jeszcze nic w ulubionych.<\/h2><p>Przejd\u017a do <span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/ajfood.pl\/produkty\/\">produkt\u00f3w<\/a><\/span> lub <span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/ajfood.pl\/koncept\/\">koncept\u00f3w<\/a><\/span><\/p><\/p>\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-3de20f4 e-con-full e-flex e-con e-child\" data-id=\"3de20f4\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-c857f10 no-print elementor-widget__width-auto elementor-share-buttons--view-icon-text elementor-share-buttons--skin-gradient elementor-share-buttons--shape-square elementor-grid-0 elementor-share-buttons--color-official elementor-widget elementor-widget-share-buttons\" data-id=\"c857f10\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"share-buttons.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-grid\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-grid-item\">\n\t\t\t\t\t\t<div class=\"elementor-share-btn elementor-share-btn_print\" role=\"button\" tabindex=\"0\" aria-label=\"Share on print\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-share-btn__icon\">\n\t\t\t\t\t\t\t\t<svg aria-hidden=\"true\" class=\"e-font-icon-svg e-fas-print\" viewBox=\"0 0 512 512\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M448 192V77.25c0-8.49-3.37-16.62-9.37-22.63L393.37 9.37c-6-6-14.14-9.37-22.63-9.37H96C78.33 0 64 14.33 64 32v160c-35.35 0-64 28.65-64 64v112c0 8.84 7.16 16 16 16h48v96c0 17.67 14.33 32 32 32h320c17.67 0 32-14.33 32-32v-96h48c8.84 0 16-7.16 16-16V256c0-35.35-28.65-64-64-64zm-64 256H128v-96h256v96zm0-224H128V64h192v48c0 8.84 7.16 16 16 16h48v96zm48 72c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z\"><\/path><\/svg>\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"elementor-share-btn__text\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"elementor-share-btn__title\">\n\t\t\t\t\t\t\t\t\t\tDrukuj list\u0119\t\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-248e952 no-print elementor-widget elementor-widget-button\" data-id=\"248e952\" data-element_type=\"widget\" data-e-type=\"widget\" id=\"pobierzPDF\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"#\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t<span class=\"elementor-button-icon\">\n\t\t\t\t<svg aria-hidden=\"true\" class=\"e-font-icon-svg e-far-file-pdf\" viewBox=\"0 0 384 512\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm250.2-143.7c-12.2-12-47-8.7-64.4-6.5-17.2-10.5-28.7-25-36.8-46.3 3.9-16.1 10.1-40.6 5.4-56-4.2-26.2-37.8-23.6-42.6-5.9-4.4 16.1-.4 38.5 7 67.1-10 23.9-24.9 56-35.4 74.4-20 10.3-47 26.2-51 46.2-3.3 15.8 26 55.2 76.1-31.2 22.4-7.4 46.8-16.5 68.4-20.1 18.9 10.2 41 17 55.8 17 25.5 0 28-28.2 17.5-38.7zm-198.1 77.8c5.1-13.7 24.5-29.5 30.4-35-19 30.3-30.4 35.7-30.4 35zm81.6-190.6c7.4 0 6.7 32.1 1.8 40.8-4.4-13.9-4.3-40.8-1.8-40.8zm-24.4 136.6c9.7-16.9 18-37 24.7-54.7 8.3 15.1 18.9 27.2 30.1 35.5-20.8 4.3-38.9 13.1-54.8 19.2zm131.6-5s-5 6-37.3-7.8c35.1-2.6 40.9 5.4 37.3 7.8z\"><\/path><\/svg>\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Pobierz PDF<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8e3f2f2 elementor-widget elementor-widget-html\" data-id=\"8e3f2f2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/html2canvas\/1.4.1\/html2canvas.min.js\"><\/script>\r\n<script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/jspdf\/2.4.0\/jspdf.umd.min.js\"><\/script>\r\n\r\n<script>\r\ndocument.addEventListener('DOMContentLoaded', function() {\r\n    const button = document.getElementById('pobierzPDF');\r\n    \r\n    if (button) {\r\n        button.addEventListener('click', function() {\r\n            const contentElement = document.getElementById('listaulubione');\r\n            const additionalElement = document.getElementById('additional-element'); \/\/ Znajd\u017a dodatkowy element w stopce\r\n\r\n            if (contentElement) {\r\n                html2canvas(contentElement, {\r\n                    scale: 2, \/\/ Skala dla g\u0142\u00f3wnego elementu\r\n                    useCORS: true\r\n                }).then(canvas => {\r\n                    const imgData = canvas.toDataURL('image\/jpeg', 0.8); \/\/ Jako\u015b\u0107 obrazu 0.8\r\n                    const { jsPDF } = window.jspdf;\r\n                    const doc = new jsPDF('p', 'mm', 'a4');\r\n\r\n                    \/\/ Dodanie tytu\u0142u na g\u00f3rze strony\r\n                    doc.setFontSize(22);\r\n                    doc.text(\"Ulubione\", 105, 20, { align: 'center' });\r\n\r\n                    \/\/ Dodanie g\u0142\u00f3wnego elementu do PDF\r\n                    const imgWidth = 190;\r\n                    const pageHeight = doc.internal.pageSize.height;\r\n                    const imgHeight = canvas.height * imgWidth \/ canvas.width;\r\n                    let heightLeft = imgHeight;\r\n                    let position = 30; \/\/ Przesuni\u0119cie w d\u00f3\u0142, aby zmie\u015bci\u0107 tytu\u0142\r\n\r\n                    doc.addImage(imgData, 'JPEG', 10, position, imgWidth, imgHeight);\r\n                    heightLeft -= pageHeight;\r\n\r\n                    while (heightLeft >= 0) {\r\n                        position = heightLeft - imgHeight;\r\n                        doc.addPage();\r\n                        doc.addImage(imgData, 'JPEG', 10, position, imgWidth, imgHeight);\r\n                        heightLeft -= pageHeight;\r\n                    }\r\n\r\n                    \/\/ Dodanie dodatkowego elementu w mniejszym rozmiarze, je\u015bli istnieje\r\n                    if (additionalElement) {\r\n                        html2canvas(additionalElement, {\r\n                            scale: 2, \/\/ Skala dla dodatkowego elementu\r\n                            useCORS: true\r\n                        }).then(additionalCanvas => {\r\n                            const additionalImgData = additionalCanvas.toDataURL('image\/jpeg', 0.8); \/\/ Jako\u015b\u0107 obrazu 0.8\r\n                            const additionalImgWidth = 130; \/\/ Mniejsza szeroko\u015b\u0107 dla drugiego elementu\r\n                            const additionalImgHeight = additionalCanvas.height * additionalImgWidth \/ additionalCanvas.width;\r\n                            position += imgHeight + 10; \/\/ Przesuni\u0119cie w d\u00f3\u0142 o wysoko\u015b\u0107 pierwszego elementu + odst\u0119p\r\n                            doc.addImage(additionalImgData, 'JPEG', 10, position, additionalImgWidth, additionalImgHeight);\r\n\r\n                            doc.save('ulubione.pdf'); \/\/ Zmiana nazwy pliku na \"ulubione.pdf\"\r\n                        }).catch(err => {\r\n                            console.error(\"B\u0142\u0105d podczas generowania dodatkowego obrazu:\", err);\r\n                            doc.save('ulubione.pdf'); \/\/ Zapisz PDF, nawet je\u015bli dodatkowy element si\u0119 nie powi\u00f3d\u0142\r\n                        });\r\n                    } else {\r\n                        doc.save('ulubione.pdf'); \/\/ Zapisz PDF, je\u015bli dodatkowy element nie istnieje\r\n                    }\r\n\r\n                }).catch(err => {\r\n                    console.error(\"B\u0142\u0105d podczas generowania obrazu:\", err);\r\n                });\r\n            } else {\r\n                console.error('Nie znaleziono obszaru z id=\"listaulubione\"!');\r\n            }\r\n        });\r\n    } else {\r\n        console.error('Przycisk \"Pobierz PDF\" nie zosta\u0142 znaleziony!');\r\n    }\r\n});\r\n\r\n\r\n\r\n<\/script>\r\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Set with strips, pops and sauce with crispy onions in Megabox Concepts &amp; Inspirations Carrier 4-pack 1.5 L Top concept 50 packs QUB&amp;GO cup 870 ml Foodlove 200 packs Roasted mild chicken wings Products Print list Download PDF<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-219","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/ajfood.pl\/en\/wp-json\/wp\/v2\/pages\/219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ajfood.pl\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ajfood.pl\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ajfood.pl\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ajfood.pl\/en\/wp-json\/wp\/v2\/comments?post=219"}],"version-history":[{"count":0,"href":"https:\/\/ajfood.pl\/en\/wp-json\/wp\/v2\/pages\/219\/revisions"}],"wp:attachment":[{"href":"https:\/\/ajfood.pl\/en\/wp-json\/wp\/v2\/media?parent=219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}