diff --git a/.gitignore b/.gitignore index a4b31a3..e76efde 100644 --- a/.gitignore +++ b/.gitignore @@ -10,5 +10,5 @@ plugins/* !plugins/pandaGadzety/** themes/* -!themes/pandaTheme/ -!themes/pandaTheme/** +!themes/panda-theme/ +!themes/panda-theme/** diff --git a/themes/panda-theme/404.php b/themes/panda-theme/404.php new file mode 100644 index 0000000..06eb8fb --- /dev/null +++ b/themes/panda-theme/404.php @@ -0,0 +1,15 @@ + + +
+
+
404
+ + Powrót do sklepu + +
+ panda_placz +
+ + + + \ No newline at end of file diff --git a/themes/panda-theme/assets/css/base.css b/themes/panda-theme/assets/css/base.css new file mode 100644 index 0000000..9d06214 --- /dev/null +++ b/themes/panda-theme/assets/css/base.css @@ -0,0 +1,24 @@ +* { + margin: 0; + padding: 0; + box-sizing: border-box; + font-family: 'Poppins', sans-serif; +} + +body { + background-color: var(--background); + overflow-x: hidden; +} + +a { + text-decoration: none; + color: inherit; +} + +.woocommerce-LoopProduct-link .woocommerce-Price-amount { + display: none !important; +} + +.single-product__calculator .woocommerce-Price-amount { + display: none !important; +} \ No newline at end of file diff --git a/themes/panda-theme/assets/css/components/account.css b/themes/panda-theme/assets/css/components/account.css new file mode 100644 index 0000000..92121fd --- /dev/null +++ b/themes/panda-theme/assets/css/components/account.css @@ -0,0 +1,23 @@ + +.woocommerce { + color: var(--primary); +} + +.woocommerce:has(.woocommerce-MyAccount-navigation) { + width: 90%; + margin: 50px auto; +} + +.woocommerce-MyAccount-navigation ul { + list-style: none; +} + +.woocommerce-MyAccount-navigation li { + background-color: var(--button-color); + width: 50%; + text-align: center; + margin: 10px 0px; + padding: 10px 16px; + border-radius: 10px; + color: var(--white); +} \ No newline at end of file diff --git a/themes/panda-theme/assets/css/components/bestseller.css b/themes/panda-theme/assets/css/components/bestseller.css new file mode 100644 index 0000000..5e16adc --- /dev/null +++ b/themes/panda-theme/assets/css/components/bestseller.css @@ -0,0 +1,131 @@ +/* ================ Bestseller ================ */ + +.bestseller { + display: flex; + flex-direction: column; + align-items: center; + padding-top: 100px; + padding-bottom: 100px; +} + +.bestseller__heading { + text-align: center; + margin-bottom: 60px !important; +} + +.bestseller__shop-button { + margin-top: 60px; + padding: .75rem 1.5rem; + background: var(--button-color); + color: #fff; + border-radius: 40px; + cursor: pointer; + user-select: none; + transition: all 0.25s ease; + text-decoration: none; +} + +.bestseller__shop-button:hover { + background: var(--primary); +} + +.bestseller .product-slider { + position: relative; + display: flex; + justify-content: center; + width: 100%; +} + +.bestseller .product-slider .slick-dots { + display: none !important; +} + +.bestseller .product-slider a { + text-decoration: none; +} + +.slick-list { + width: 80%; +} + +.slick-track { + display: flex; + justify-content: space-between; +} + +.bestseller .product-slider .slide-item { + background: #ffffff; + border-radius: 15px; + padding: 1.5rem; + display: flex; + height: 425px; + flex-direction: column; + color: var(--primary); + margin: 0px 16px; + border: 1px solid #B0D5DE; +} + +.bestseller .product-slider .slide-item img { + width: 100%; + height: 180px; + object-fit: contain; + margin-bottom: 1rem; + background: #fff; +} + +.slide-item__description { + display: -webkit-box; + line-clamp: 2; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; +} + +.bestseller .product-slider .slide-item__text { + height: 245px; + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.bestseller .product-slider .slide-item h2 { + font-size: 1rem; + font-weight: 700; +} + +.bestseller .product-slider .slide-item .slide-item__price { + font-size: .9rem; + color: var(--primary); + font-weight: 700; +} + +.bestseller .product-slider .slide-item a { + text-align: center; + color: var(--white); + text-decoration: none; + padding: 5px 0px; + border-radius: 38px; +} + +.bestseller .slick-prev, +.bestseller .slick-next { + position: absolute; + top: 50%; + transform: translateY(-50%); + z-index: 10; +} +.bestseller .slick-prev { left: 0px; } +.bestseller .slick-next { right: 0px; } + +.bestseller .slider-arrow { + background: #fff; + border: none; + width: 40px; + height: 40px; + border-radius: 50%; +} + +@media (min-width: 768px) { + .bestseller .slick-prev { left: 50px; } + .bestseller .slick-next { right: 50px; } +} \ No newline at end of file diff --git a/themes/panda-theme/assets/css/components/breadcrumbs.css b/themes/panda-theme/assets/css/components/breadcrumbs.css new file mode 100644 index 0000000..1acbe8f --- /dev/null +++ b/themes/panda-theme/assets/css/components/breadcrumbs.css @@ -0,0 +1,34 @@ +/* ================ Breadcrumbs ================ */ + + +.woocommerce-breadcrumb { + display: flex; + align-items: center; + color: #00424B !important; + font-size: 10px !important; + margin-left: 20px !important; + margin-top: 10px !important; +} + +@media (min-width: 900px) { + .woocommerce-breadcrumb { + font-size: 16px !important; + margin-left: 50px !important; + margin-top: 20px !important; + } +} + + +.woocommerce-breadcrumb * { + margin-right: 10px !important; +} + +.woocommerce-breadcrumb a { + text-decoration: none; + color: #404041 !important; +} + +.woocommerce-breadcrumb .breadcrumb-sep { + color: #404041 !important; + font-size: 24px !important; +} \ No newline at end of file diff --git a/themes/panda-theme/assets/css/components/buttons.css b/themes/panda-theme/assets/css/components/buttons.css new file mode 100644 index 0000000..d2b3bc1 --- /dev/null +++ b/themes/panda-theme/assets/css/components/buttons.css @@ -0,0 +1,9 @@ + +.btn-primary { + background-color: var(--button-color); + transition: 0.3s ease all; +} + +.btn-primary:hover { + background-color: var(--primary); +} \ No newline at end of file diff --git a/themes/panda-theme/assets/css/components/cart.css b/themes/panda-theme/assets/css/components/cart.css new file mode 100644 index 0000000..0160b33 --- /dev/null +++ b/themes/panda-theme/assets/css/components/cart.css @@ -0,0 +1,35 @@ +/* ================ Cart ================ */ + +.woocommerce:has(.woocommerce-cart-form){ + width: 90%; + color: var(--primary); + margin: auto; + margin-top: 50px; +} + +.checkout-button, .wc-block-components-button{ + background-color: var(--button-color) !important; + color: var(--white); + border: 0; + border-radius: 10px; +} + +.wc-block-components-product-name { + font-weight: 700; +} + +.wp-block-woocommerce-checkout { + width: 90%; + margin: auto !important; + margin-bottom: 50px !important; +} + +td.product-thumbnail { + background-color: var(--white); +} + +.product-thumbnail img { + width: 100% !important; + height: 200px !important; + object-fit: contain; +} \ No newline at end of file diff --git a/themes/panda-theme/assets/css/components/categories-main.css b/themes/panda-theme/assets/css/components/categories-main.css new file mode 100644 index 0000000..03f9854 --- /dev/null +++ b/themes/panda-theme/assets/css/components/categories-main.css @@ -0,0 +1,233 @@ +/* ================ Categories Landing Page ================ */ + +.hero-uv { + display: none; + align-items: center; + justify-content: center; + margin-top: 40px; +} + +.hero-uv__inner { + width: 70%; + display: flex; + justify-content: center; + background-color: var(--white); + padding: 20px 0px 20px 77px; + border-radius: 40px; +} + +.hero-uv__text { + width: 50%; + color: var(--primary); + display: flex; + flex-direction: column; + justify-content: space-around; +} + +.hero-uv__text h2 { + font-weight: 400; + font-size: 36px; +} + +.hero-uv__text p { + font-size: 20px; +} + +.hero-uv__text a { + width: 80%; + background-color: var(--button-color); + text-align: center; + padding: 15px 25px; + border-radius: 40px; + color: var(--white); + text-decoration: none; +} + +.hero-uv__slider { + width: 50% !important; +} + +.hero-uv__slider * { + width: 100%; +} + +.hero-uv__slider .slick-dots li button:before { + content: ''; + display: inline-block; + width: 8px; + height: 8px; + background-color: #00bcd4; + border-radius: 50%; + opacity: 1; + transition: all .3s ease; +} + +.hero-uv__slider .slick-dots li.slick-active button:before { + width: 24px; + height: 8px; + background-color: #00bcd4; + border-radius: 25px; +} + +.categories { + width: 75%; + display: flex; + flex-direction: column; + grid-template-columns: repeat(2, 1fr); + gap: 1rem; + margin: auto; + padding-top: 20px; + font-weight: bold; +} + +@media (min-width: 430px) { + .categories { + width: 100%; + display: grid; + } +} + +.categories__item { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + text-decoration: none; + background: #fff; + padding: 1rem; + border-radius: 40px; + color: var(--white); + height: 200px; + transition: transform 0.3s ease; + + font-size: 24px; +} + +.categories__item--wide { + grid-column: span 2; + transition: all 0.3s ease; +} + +.categories__item--wide:hover { + background-color: var(--white); + color: var(--button-color); +} + +.biuro-i-praca { + background-color: var(--yellow); +} + +.do-kluczy-i-narzedzi { + background-color: var(--button-color); +} + +.do-pisania { + background-color: var(--secondary); +} + +.do-zywnosci-i-napojow { + background-color: var(--secondary); +} + +.dzieci-i-zabawki { + background-color: var(--button-color); +} + +.moda-i-odziez { + background-color: var(--yellow); +} + +.torby-i-podroze { + background-color: var(--yellow); +} + +.sport-i-wypoczynek { + color: var(--button-color); +} + +.sport-i-wypoczynek svg g path { + fill: var(--button-color) !important; +} + +.technologia-i-telefon { + color: var(--button-color); +} + +.technologia-i-telefon svg path { + fill: var(--button-color) !important; +} + +.categories__icon svg { + transform: scale(1.5); +} + +.categories__icon svg g path { + fill: var(--white); +} + +.categories__icon svg path { + fill: var(--white); +} + +.categories__label { + text-align: center; +} + +.categories__item--all { + background: var(--white); + color: var(--primary); + transition: all 0.3s ease; +} + +.categories__item--all:hover { + background: var(--primary); + color: var(--white); +} + +.categories__item--wide { + background-color: var(--button-color); + color: var(--white); +} + +.categories__icon svg { + transition: all 0.3s ease; +} + +.upscale svg { + transform: scale(2.0); +} + +@media (min-width: 768px) { + .hero-uv { + display: flex; + } + + .hero-uv__slider { + display: none !important; + } + + .hero-uv__text { + width: 90%; + } + + .categories { + display: grid; + grid-template-columns: repeat(2, 1fr); + width: 70%; + } + + +} + +@media (min-width: 1024px) { + .categories { + grid-template-columns: repeat(4, 1fr); + } + .hero-uv__slider { + display: block !important; + } + + .hero-uv__text { + width: 50%; + } +} diff --git a/themes/panda-theme/assets/css/components/error404.css b/themes/panda-theme/assets/css/components/error404.css new file mode 100644 index 0000000..6973e58 --- /dev/null +++ b/themes/panda-theme/assets/css/components/error404.css @@ -0,0 +1,53 @@ +/* ================ Error 404 ================ */ + +.error { + display: flex; + justify-content: center; + align-items: center; + height: calc(100vh - 80px); + gap: 2rem; + padding: 0 1rem; + box-sizing: border-box; +} + +.error__info { + display: flex; + flex-direction: column; + align-items: center; + text-align: center; +} + +.error__text { + font-weight: bold; + font-size: 128px; + color: #053C45; +} + +.error__button { + margin-top: 1rem; + padding: .75rem 1.5rem; + background: var(--button-color); + color: #fff; + border-radius: 40px; + cursor: pointer; + user-select: none; + transition: all 0.25s ease; + text-decoration: none; +} + +.error__button:hover { + background: var(--primary); +} + +.error__image { + display: none; +} + +@media (min-width: 768px) { + .error__image { + display: block; + width: 300px; + max-width: 100%; + } +} + diff --git a/themes/panda-theme/assets/css/components/footer.css b/themes/panda-theme/assets/css/components/footer.css new file mode 100644 index 0000000..69167b3 --- /dev/null +++ b/themes/panda-theme/assets/css/components/footer.css @@ -0,0 +1,144 @@ +/* ================ Footer ================ */ + +.founds { + background-color: var(--white); + display: flex; + justify-content: center; +} + +.founds img { + max-width: 100%; + max-height: 110px; +} + +footer { + background-color: var(--footer-bg); + color: var(--primary); + padding-top: 50px; + padding-bottom: 50px; + display: flex; + justify-content: center; +} + +.site-footer__inner { + max-width: 80%; +} + +.site-footer__logo { + text-align: center; + margin-bottom: 2.5rem; +} +.site-footer__logo img { + max-width: 150px; + height: auto; +} + +.site-footer__info { + display: grid; + grid-template-columns: 1fr; + gap: 1.5rem; + margin-bottom: 2rem; +} + +.site-footer__section { + text-align: center; +} +.site-footer__section-header { + font-weight: 600; + margin-bottom: 0.75rem; +} +.site-footer__section-text { + font-size: 0.9rem; + line-height: 1.4; + margin-bottom: 10px; +} +.site-footer__section-text--featured { + font-weight: 600; +} + +.site-footer__section-icons svg { + width: 40px; + margin-top: 30px; +} + +.site-footer__section-icons svg:last-child { + margin-left: 30px; +} + +.site-footer__copyright { + display: flex; + flex-direction: column; + align-items: center; + gap: 0.5rem; + margin-top: 100px; +} +.site-footer__copyright-text, +.site-footer__design-text { + font-size: 0.85rem; + margin: 0; + text-align: center; +} + +@media (min-width: 768px) { + .founds img { + max-width: 75vw; + } + + .site-footer__logo { + text-align: left; + } + + .site-footer__info { + grid-template-columns: repeat(4, 1fr); + gap: 2rem; + margin-bottom: 2.5rem; + } + .site-footer__section { + text-align: left; + } + + .site-footer__copyright { + flex-direction: row; + justify-content: space-between; + align-items: center; + margin-top: 150px; + } + .site-footer__copyright-text, + .site-footer__design-text { + text-align: left; + } +} + +@media (min-width: 1024px) { + .site-footer__logo img { + max-width: 350px; + } + + .site-footer__section-header { + font-size: 30px; + } + + .site-footer__section-text { + font-size: 20px; + } + + .site-footer__copyright { + margin-top: 200px; + } + + .site-footer__copyright-text, + .site-footer__design-text { + font-size: 18px; + } + + .shop-sidebar { + height: 800px; + padding: 50px; + border-top-right-radius: 32px; + border-bottom-right-radius: 32px; + } + + .shop-products { + margin-left: 50px; + } +} \ No newline at end of file diff --git a/themes/panda-theme/assets/css/components/header.css b/themes/panda-theme/assets/css/components/header.css new file mode 100644 index 0000000..f536eed --- /dev/null +++ b/themes/panda-theme/assets/css/components/header.css @@ -0,0 +1,256 @@ +/* ================ Header ================ */ + +header { + background-color: var(--white); +} + +.site-header__container { + width: 90%; + display: flex; + justify-content: space-between; + align-items: center; + padding: 20px 0px; + margin: auto; +} + +.logo { + width: 130px; + height: 60px; +} + +.logo img { + width: 100%; + height: 100%; +} + +.site-header__utils { + display: flex; + align-items: center; + gap: 36px; + color: var(--white); +} + +.site-header__utils a { + text-decoration: none; + color: white; +} + +.site-header__search { + display: none; + flex: 1; + max-width: 400px; + background: #F5F5F5; + border-radius: 10px; + overflow: hidden; + border: 1px solid #D6E9EE; +} + +.site-header__search-input { + flex: 1; + border: none; + padding: 12px 0px; + font-size: 1rem; + background: #F5F5F5; + color: var(--button-color); +} + +.site-header__search-input::placeholder { + color: var(--button-color); +} + +.site-header__search-button { + display: flex; + justify-content: center; + align-items: center; + border: none; + background: transparent; + padding: 0 16px; + cursor: pointer; + font-size: 1.1rem; +} + +.site-header__dropcat, +.site-header__shop { + display: none; + padding: 16px 26px; + border-radius: 10px; + white-space: nowrap; + font-weight: 500; + cursor: pointer; + user-select: none; +} + +.site-header__dropcat { background-color: var(--button-color); } +.site-header__shop { background-color: var(--secondary); } + +.site-header__info { + display: flex; + gap: 16px; +} + +.site-header__info-account, +.site-header__info-cart { + position: relative; + width: 56px; + height: 56px; + display: flex; + align-items: center; + justify-content: center; + border-radius: 10px; + background-color: var(--button-color); + padding: 16px 16px; +} + +.info-cart__count { + width: 32px; + height: 32px; + position: absolute; + display: flex; + justify-content: center; + align-items: center; + top: 0; + right: 0; + transform: translateY(-45%) translateX(45%); + background-color: var(--secondary); + padding: 8px; + border-radius: 50%; +} + +.site-header__search-suggestions { + position: absolute; + background: #fff; + border: 1px solid #ddd; + width: 100%; + max-width: 300px; + z-index: 999; + list-style: none; + margin: 0; + padding: 0; + display: none; +} + +.site-header__search-suggestions li { + color: var(--button-color); + padding: .5em; +} +.site-header__search-suggestions li a { + display: flex; + align-items: center; + text-decoration: none; + color: inherit; +} +.site-header__search-suggestions img { + width: 30px; + height: auto; + margin-right: .5em; +} +.site-header__search-suggestions li:hover { + background: #f5f5f5; +} + +.site-header__cats { + display: none; + justify-content: center; + background-color: var(--primary); + padding-top: 10px; + padding-bottom: 10px; +} + +.site-header__cats-list { + width: 90%; + display: flex; + padding: 0; + justify-content: space-around; +} + +.site-header__cats-item { + list-style-type: none; +} + +.site-header__cats-link { + color: var(--white); + text-decoration: none; + font-size: 16px; +} + +.site-header__cats-separator { + color: var(--white); + opacity: 20%; +} + +.site-header__cats-list .site-header__cats-separator:last-child { + display: none; +} + +.dropcats { + max-height: 0; + opacity: 0; + overflow: hidden; + transition: max-height 0.5s ease, opacity 0.5s ease, padding 0.5s ease; + position: absolute; + right: 0; + width: 70%; + background-color: #F5F5F5; + padding: 0 30px; + border-radius: 0 0 12px 12px; + justify-content: space-around; + z-index: 9999; + display: flex; +} + +.dropcats.dropcats_active { + max-height: 1000px; + opacity: 1; + padding: 30px; +} + +.dropcats__categories { + display: grid; + grid-template-columns: repeat(2, 1fr); /* 2 kolumny o równej szerokości */ + grid-auto-rows: auto; + list-style: none; + padding: 0; + margin: 0; + gap: 10px 100px; + color: #053C45; +} + +.dropcats__categories li a{ + display: flex; + gap: 5px; +} + +.dropcats__close svg { + cursor: pointer; +} + + +@media (min-width: 768px) { + .logo { + width: 170px; + height: 80px; + } + + .site-header__cats { + display: flex; + } + + .site-header__search { + display: flex; + } +} + +@media (min-width: 1024px) { + .site-header_navigation { + display: flex; + gap: 12px; + } + + .site-header__dropcat, + .site-header__shop { + display: block; + } +} + + + diff --git a/themes/panda-theme/assets/css/components/hero.css b/themes/panda-theme/assets/css/components/hero.css new file mode 100644 index 0000000..3ab06a4 --- /dev/null +++ b/themes/panda-theme/assets/css/components/hero.css @@ -0,0 +1,129 @@ +/* ================ Hero ================ */ + +.section-main { + min-height: 100vh; + padding-top: 20px; + padding-bottom: 20px; +} + +.hero { + display: flex; + justify-content: center; + align-items: center; +} + +.hero__media { + display: none; +} + +.hero__content { + width: 420px; +} + +.hero__heading { + font-size: 1.4rem; + font-weight: 400; + color: var(--primary); + margin-bottom: 1rem; +} + +.hero__heading--bold { + font-weight: 600; +} + +.hero__heading--highlight { + color: var(--secondary); +} + +.hero__description { + font-size: 1rem; + margin-bottom: 2rem; + color: var(--primary); + text-align: justify; +} + +.hero__description--highlight { + font-weight: 600; +} + +.hero__feature { + display: flex; + align-items: center; + gap: 1rem; + background-color: var(--white); + padding: 1rem; + margin-bottom: 1rem; + border-radius: 1rem; +} + +.hero__icon { + width: 4rem; + height: 4rem; + background-color: var(--button-color); + color: var(--white); + border-radius: 1rem; + display: flex; + align-items: center; + justify-content: center; + padding: 10px; +} + +.hero__icon--yellow { + background-color: var(--yellow); +} + +.hero__icon--blue { + background-color: var(--secondary); +} + +.hero__feature-text { + font-weight: 600; + color: var(--primary); + font-size: 1rem; +} + +@media (min-width: 1024px) { + .hero { + justify-content: left; + } + + .hero__media { + display: block; + width: 50%; + } + + .hero__media img { + width: 100%; + } + + .hero__content { + width: 40%; + margin-left: 50px; + } + + .hero__heading { + font-size: 40px; + } +} + +.upscale-anim svg { + animation: svgAnim 3s ease infinite; +} + +@keyframes svgAnim { + 0% { + transform: scale(1.0); + } + 10% { + transform: scale(1.20); + } + 20% { + transform: scale(0.75); + } + 30% { + transform: scale(1.0); + } + 100% { + transform: scale(1.0); + } +} diff --git a/themes/panda-theme/assets/css/components/shop-filters.css b/themes/panda-theme/assets/css/components/shop-filters.css new file mode 100644 index 0000000..028f47e --- /dev/null +++ b/themes/panda-theme/assets/css/components/shop-filters.css @@ -0,0 +1,109 @@ +/* ================ Shop Filters Widget ================ */ + +.shop-sidebar { + background: #00424B; + color: var(--white); + padding: 30px; +} + +.active-cat { + color: var(--yellow) !important; +} + +.widget .wp-block-heading { + border-bottom: 0.5px solid white; + padding-bottom: 10px; + margin-top: 40px !important; +} + +.widget .wp-block-heading:first-child { + margin-bottom: 20px; +} + +.widget .wp-block-heading::after { + content: "^"; + float: right; + font-size: 20px; +} + +.wc-block-product-categories-list-item__name::after { + content: ">"; + float: right; + font-size: 20px; +} + +.wc-block-product-categories-list li { + margin-top: 10px; +} + + +.wc-block-product-filter-price-slider .text input[type=text] { + background-color: transparent; + color: var(--white); +} + + +.wc-block-product-filter-price-slider__range .range-bar { + background: var(--yellow) !important; +} + +.widget ul { + list-style-type: none; + padding: 0; +} + +.wp-block-search__inside-wrapper { + background-color: transparent; + border: 1px solid var(--white); + padding: 10px 16px; + border-radius: 12px; +} + +.wp-block-search__inside-wrapper button { + background: transparent; + border: none; +} + + +.wp-block-search__inside-wrapper button svg { + color: var(--white); +} + +.wp-block-search__input { + background: transparent; + color: var(--white); +} + +.wp-block-search__input::placeholder { + color: var(--white); +} + +.wc-block-product-categories-list-item-count { + display: none; +} + +@media (min-width: 768px) { + .shop-sidebar { + flex: 0 0 250px; + display: block; + height: 800px; + padding: 30px; + border-top-right-radius: 32px; + border-bottom-right-radius: 32px; + } + + .shop-sidebar a{ + color: var(--white); + } + + + + .widget ul a { + text-decoration: none; + } + + .shop-products { + margin-left: 30px; + margin-right: 50px; + } +} diff --git a/themes/panda-theme/assets/css/components/shop-products.css b/themes/panda-theme/assets/css/components/shop-products.css new file mode 100644 index 0000000..cf41cc0 --- /dev/null +++ b/themes/panda-theme/assets/css/components/shop-products.css @@ -0,0 +1,155 @@ +/* ================ Shop Products Page ================ */ + +.shop-layout { + gap: 20px; + margin-bottom: 50px; +} + +@media (min-width: 768px) { + .shop-layout { + display: flex; + } +} + +.shop-products { + flex: 1 1 auto; + min-width: 0; + margin-bottom: 20px; +} + +.shop-products__header { + display: flex; + justify-content: space-between; + background: transparent !important; + margin-bottom: 20px; +} + +.shop-products__header-title { + font-size: 24px; + color: #053C45; + font-weight: 500; +} + +.shop-products .product { + display: flex; + justify-content: space-around; + flex-direction: column; + background-color: var(--white); + border: 1px solid #B0D5DE; + border-radius: 24px; + padding: 20px !important; + height: 450px; + overflow: hidden; +} + +@media (min-width: 764px) { + .shop-products .product { + height: 400px; + } +} + +.shop-products .products .product img { + width: 100% !important; + height: 180px !important; + object-fit: contain; + display: block; + margin-bottom: 1rem; +} + + +.product-short-description { + display: -webkit-box; + line-clamp: 2; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; +} + +.shop-products .product a, .shop-products .product span { + color: #053C45 ; +} + +.view-product { + width: 100%; + background-color: #0F6472; + text-align: center; + color: var(--white) !important; + padding: 5px 24px; + border-radius: 38px; +} + +.orderby { + width: 190px; + background-color: transparent; + border: 1px solid #0F6472; + border-radius: 10px; + color: #053C45; + padding: 8px 12px; +} + +.woocommerce-LoopProduct-link p { + color: #053C45 !important; +} + +.shop-pagination { + float: right; +} + +.custom-pagination { + display: flex; + gap: 10px; + list-style: none; + color: #053C45; + justify-content: center; + align-items: center; +} + +.prev, +.next { + display: none; + font-weight: 700; + border: 1px solid #0F6472; + padding: 10px 16px; + border-radius: 123px; +} + +@media (min-width: 1024px) { + .prev, + .next { + display: block; + } +} + +.active { + display: flex; + justify-content: center; + align-items: center; + width: 25px; + height: 25px; + background-color: var(--yellow); + border-radius: 123px; + color: var(--white) !important; +} + + +.shop-products ul.products { + display: grid !important; + grid-template-columns: repeat(2, 1fr) !important; + gap: 20px !important; +} + +.shop-products ul.products li { + margin: 0 !important; + width: 100% !important; +} + +.shop-products ul.products::before, +.shop-products ul.products::after { + display: none; +} + +@media (min-width: 1300px) { + .shop-products ul.products { + grid-template-columns: repeat(4, 1fr) !important; + } +} \ No newline at end of file diff --git a/themes/panda-theme/assets/css/components/shop-single-product.css b/themes/panda-theme/assets/css/components/shop-single-product.css new file mode 100644 index 0000000..688ae65 --- /dev/null +++ b/themes/panda-theme/assets/css/components/shop-single-product.css @@ -0,0 +1,360 @@ +/* ================ Single Product ================ */ + +.single-product__top { + width: 90%; + gap: 2rem; + margin: auto; +} + +@media (min-width: 764px) { + .single-product__top { + display: flex; + } +} + +.single-product__gallery { + flex: 1; +} +.single-product__thumbnails { + display: flex; + gap: .5rem; + margin-top: 1rem; +} + +.single-product__thumbnails img { + width: 100%; + height: 300px; + object-fit: contain; + object-position: center; + background-color: var(--white); + border-radius: 8px; +} + +.single-product__calculator { + width: 100%; + flex: 1; + background: var(--white); + padding: 2rem; + border-radius: 16px; + color: #053C45 !important; +} +.single-product__calculator label { + display: block; + margin-top: 1rem; + font-weight: 500; +} +.single-product__calculator select, +.single-product__calculator input[type="number"], +.single-product__calculator input[type="file"] { + width: 100%; + padding: .5rem; + margin-top: .25rem; + border: 1px solid #ccc; + border-radius: 8px; +} + +.calculator-results { + margin-top: 1.5rem; + border-top: 1px solid #eee; + padding-top: 1rem; +} + +.calculator-results > div { + display: flex; + justify-content: space-between; + margin-bottom: .5rem; +} + +.single-product__calculator-header { + border-bottom: 1px solid #CECECE; + padding-bottom: 20px; +} + +.custom-header { + font-weight: 700; + color: #053C45; + font-size: 32px; +} + +.product-name__header { + font-weight: 600; + color: #9D9D9D; + font-size: 14px; + margin: 16px 0px; +} + +.product-title { + font-weight: 700; + font-size: 24px; + color: #053C45; + margin-bottom: 16px; +} + +.single-product__options { + margin-bottom: 16px; + border-bottom: 1px solid #CECECE; +} + +.single-product__options label { + margin-bottom: 5px; + font-weight: 600; + font-size: 18px; + color: #053C45; +} + +.single-product__options select { + width: 40%; +} + +.single-product__options p { + width: 40%; + margin: 16px 0px; + background-color: #053C45; + color: var(--white); + font-size: 16px; + font-weight: 600; + text-align: center; + padding: 10px 16px; + border-radius: 8px; +} + +.title { + font-weight: 700; + font-size: 26px; + color: #053C45; +} + +.product-name__title { + margin: 10px 0px; +} + +#product-name { + font-size: 24px; +} + +.price-wrapper { + display: block; + justify-content: space-between; +} + +.entry-title + { + display: none; +} + +.labeling_summary { + width: 100%; +} + +.price { + width: 100%; +} + +@media (min-width: 1024px) { + .price-wrapper { + display: flex; + } + .labeling_summary { + width: 55%; + } + + .price { + width: 40%; + } +} + +.price p { + font-weight: 600; +} + +.price span { + display: block; + width: 100%; + font-weight: 400; + font-size: 12px; + text-align: justify; + margin-top: 10px; +} + +#photo::file-selector-button { + background-color: #053C45; + color: var(--white); + padding: 8px 14px; + border-radius: 8px; + border: none; + cursor: pointer; +} + +.labeling_summary p { + font-weight: 600; + font-size: 24px; + margin-top: 10px; + +} + +.labeling_summary table { + width: 100%; + margin-bottom: 20px; +} + +.labeling_summary td:last-child { + float: right; +} + +.add-to-cart input { + width: 100%; + background-color: #0F6472; + color: var(--white); + cursor: pointer; + padding: 10px 12px; + border-radius: 40px; + border: none; +} + +.product-info-card { + margin: 2rem auto; + background: #fff; + border-radius: 1.5rem; + overflow: hidden; + color: #053C45; +} +.product-info-card__header { + padding: 1.5rem 2rem; +} +.product-info-card__header h2 { + margin: 0 0 .5rem; + font-size: 1.75rem; + font-weight: 700; +} +.product-info-card__header p { + margin: 0; + font-size: 1rem; + line-height: 1.4; +} +.product-info-card__details { + padding: 0 2rem 2rem; +} +.product-info-card__details h3 { + margin-top: 1rem; + font-size: 1.25rem; + border-bottom: 1px solid #dfe6e7; + padding-bottom: .5rem; +} +.product-info-table { + width: 100%; + border-collapse: collapse; + margin-top: 1rem; +} +.product-info-table td { + padding: .75rem 1rem; + font-size: 1rem; +} +.product-info-table tr:nth-child(odd) { background: #f7fafb; } +.product-info-table tr:nth-child(even){ background: #fff; } +.product-info-table tr:first-child td { font-weight: 600; } + + +#stock { + background-color: #053C45; + color: var(--white); + padding: 10px 16px; + border-radius: 8px; + margin-top: 20px; +} + +.options { + width: 50%; +} + +.slick-track { + margin-top: 10px; +} + +.product-image { + max-width: 100px !important; + max-height: 100px !important; + object-fit: contain !important; + object-position: center !important; + background-color: var(--white) !important; + border-radius: 10px; +} + +.unavailable { + background-color: var(--yellow) !important; + cursor: default !important; +} + +/* ================ Single Product Gallery ================ */ +.single-product__gallery { + position: relative; + overflow: hidden; +} + +.single-product__images { + width: 100%; + max-height: 400px; +} + +.single-product__images .slick-track { + display: flex; + align-items: center; +} + +.single-product__images .slick-slide { + padding: 10px; +} + +.single-product__images .slick-slide img { + max-width: 100%; + max-height: 350px; + width: auto; + height: auto; + margin: 0 auto; + object-fit: contain; +} + +.slick-arrow { + position: absolute; + top: 50%; + transform: translateY(-50%); + z-index: 10; + background: rgba(255, 255, 255, 0.7); + border: none; + width: 40px; + height: 40px; + border-radius: 50%; + font-size: 0; + cursor: pointer; +} + +.slick-prev { + left: 10px; +} + +.slick-next { + right: 10px; +} + +.slick-arrow::before { + content: ""; + display: block; + width: 15px; + height: 15px; + border-top: 3px solid #053C45; + border-left: 3px solid #053C45; + margin: 0 auto; +} + +.slick-prev::before { + transform: rotate(-45deg); + margin-right: 2px; +} + +.slick-next::before { + transform: rotate(135deg); + margin-left: 2px; +} + +.single-product__images .slick-list { + width: 100%; +} \ No newline at end of file diff --git a/themes/panda-theme/assets/css/main.css b/themes/panda-theme/assets/css/main.css new file mode 100644 index 0000000..e7c4b19 --- /dev/null +++ b/themes/panda-theme/assets/css/main.css @@ -0,0 +1,24 @@ +/* ================ Variables ================ */ +@import "variables.css"; +@import "base.css"; + +/* ================ Landing Page ================ */ +@import "./components/header.css"; +@import "./components/categories-main.css"; +@import "./components/bestseller.css"; +@import "./components/hero.css"; +@import "./components/footer.css"; + +/* ================ Error Page ================ */ +@import "./components/error404.css"; + +/* ================ Shop Page ================ */ +@import "./components/breadcrumbs.css"; +@import "./components/shop-filters.css"; +@import "./components/shop-products.css"; +@import "./components/shop-single-product.css"; +@import "./components/cart.css"; +@import "./components/account.css"; + +/* ================ Utils ================ */ +@import "./components/buttons.css"; diff --git a/themes/panda-theme/assets/css/variables.css b/themes/panda-theme/assets/css/variables.css new file mode 100644 index 0000000..f91313b --- /dev/null +++ b/themes/panda-theme/assets/css/variables.css @@ -0,0 +1,16 @@ +@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap'); + +:root { + /* breakpoints */ + --breakpoint-md: 768px; + --breakpoint-lg: 1024px; + + /* colors */ + --white: #ffffff; + --primary: #094654; + --secondary: #00B4E1; + --yellow: #ffab0a; + --footer-bg: #92CDDB; + --background: #DDE9EC; + --button-color:#0F6472; +} \ No newline at end of file diff --git a/themes/panda-theme/assets/images/404.png b/themes/panda-theme/assets/images/404.png new file mode 100644 index 0000000..85bb6cc Binary files /dev/null and b/themes/panda-theme/assets/images/404.png differ diff --git a/themes/panda-theme/assets/images/Close.svg b/themes/panda-theme/assets/images/Close.svg new file mode 100644 index 0000000..d56fda0 --- /dev/null +++ b/themes/panda-theme/assets/images/Close.svg @@ -0,0 +1,3 @@ + + + diff --git a/themes/panda-theme/assets/images/biuro-i-praca.svg b/themes/panda-theme/assets/images/biuro-i-praca.svg new file mode 100644 index 0000000..05fb5a8 --- /dev/null +++ b/themes/panda-theme/assets/images/biuro-i-praca.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/themes/panda-theme/assets/images/calendar.svg b/themes/panda-theme/assets/images/calendar.svg new file mode 100644 index 0000000..3f0420a --- /dev/null +++ b/themes/panda-theme/assets/images/calendar.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/themes/panda-theme/assets/images/cart.svg b/themes/panda-theme/assets/images/cart.svg new file mode 100644 index 0000000..062bee8 --- /dev/null +++ b/themes/panda-theme/assets/images/cart.svg @@ -0,0 +1,3 @@ + + + diff --git a/themes/panda-theme/assets/images/czlowiek_z_kubkiem.png b/themes/panda-theme/assets/images/czlowiek_z_kubkiem.png new file mode 100644 index 0000000..cfe0d41 Binary files /dev/null and b/themes/panda-theme/assets/images/czlowiek_z_kubkiem.png differ diff --git a/themes/panda-theme/assets/images/do-kluczy-i-narzedzi.svg b/themes/panda-theme/assets/images/do-kluczy-i-narzedzi.svg new file mode 100644 index 0000000..ada748d --- /dev/null +++ b/themes/panda-theme/assets/images/do-kluczy-i-narzedzi.svg @@ -0,0 +1,4 @@ + + + + diff --git a/themes/panda-theme/assets/images/do-pisania.svg b/themes/panda-theme/assets/images/do-pisania.svg new file mode 100644 index 0000000..a5e0915 --- /dev/null +++ b/themes/panda-theme/assets/images/do-pisania.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/themes/panda-theme/assets/images/do-zywnosci-i-napojow.svg b/themes/panda-theme/assets/images/do-zywnosci-i-napojow.svg new file mode 100644 index 0000000..aab46c6 --- /dev/null +++ b/themes/panda-theme/assets/images/do-zywnosci-i-napojow.svg @@ -0,0 +1,4 @@ + + + + diff --git a/themes/panda-theme/assets/images/dzieci-i-zabawki.svg b/themes/panda-theme/assets/images/dzieci-i-zabawki.svg new file mode 100644 index 0000000..6e079e2 --- /dev/null +++ b/themes/panda-theme/assets/images/dzieci-i-zabawki.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/themes/panda-theme/assets/images/facebook.svg b/themes/panda-theme/assets/images/facebook.svg new file mode 100644 index 0000000..d2da0df --- /dev/null +++ b/themes/panda-theme/assets/images/facebook.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/themes/panda-theme/assets/images/fundusze.png b/themes/panda-theme/assets/images/fundusze.png new file mode 100644 index 0000000..fcd7891 Binary files /dev/null and b/themes/panda-theme/assets/images/fundusze.png differ diff --git a/themes/panda-theme/assets/images/hero.png b/themes/panda-theme/assets/images/hero.png new file mode 100644 index 0000000..ef4882a Binary files /dev/null and b/themes/panda-theme/assets/images/hero.png differ diff --git a/themes/panda-theme/assets/images/instagram.svg b/themes/panda-theme/assets/images/instagram.svg new file mode 100644 index 0000000..b5a9913 --- /dev/null +++ b/themes/panda-theme/assets/images/instagram.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/themes/panda-theme/assets/images/item1.png b/themes/panda-theme/assets/images/item1.png new file mode 100644 index 0000000..40d72bb Binary files /dev/null and b/themes/panda-theme/assets/images/item1.png differ diff --git a/themes/panda-theme/assets/images/location.svg b/themes/panda-theme/assets/images/location.svg new file mode 100644 index 0000000..eacd5e6 --- /dev/null +++ b/themes/panda-theme/assets/images/location.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/themes/panda-theme/assets/images/logo.png b/themes/panda-theme/assets/images/logo.png new file mode 100644 index 0000000..4e7c7ed Binary files /dev/null and b/themes/panda-theme/assets/images/logo.png differ diff --git a/themes/panda-theme/assets/images/moda-i-odziez.svg b/themes/panda-theme/assets/images/moda-i-odziez.svg new file mode 100644 index 0000000..7bb6bcb --- /dev/null +++ b/themes/panda-theme/assets/images/moda-i-odziez.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/themes/panda-theme/assets/images/rectangle.svg b/themes/panda-theme/assets/images/rectangle.svg new file mode 100644 index 0000000..23b5cd5 --- /dev/null +++ b/themes/panda-theme/assets/images/rectangle.svg @@ -0,0 +1,3 @@ + + + diff --git a/themes/panda-theme/assets/images/search.svg b/themes/panda-theme/assets/images/search.svg new file mode 100644 index 0000000..a041337 --- /dev/null +++ b/themes/panda-theme/assets/images/search.svg @@ -0,0 +1,3 @@ + + + diff --git a/themes/panda-theme/assets/images/slide1.png b/themes/panda-theme/assets/images/slide1.png new file mode 100644 index 0000000..c84d8ea Binary files /dev/null and b/themes/panda-theme/assets/images/slide1.png differ diff --git a/themes/panda-theme/assets/images/slide2.png b/themes/panda-theme/assets/images/slide2.png new file mode 100644 index 0000000..8bbe15f Binary files /dev/null and b/themes/panda-theme/assets/images/slide2.png differ diff --git a/themes/panda-theme/assets/images/slide3.png b/themes/panda-theme/assets/images/slide3.png new file mode 100644 index 0000000..84f3a6c Binary files /dev/null and b/themes/panda-theme/assets/images/slide3.png differ diff --git a/themes/panda-theme/assets/images/sport-i-wypoczynek.svg b/themes/panda-theme/assets/images/sport-i-wypoczynek.svg new file mode 100644 index 0000000..075169e --- /dev/null +++ b/themes/panda-theme/assets/images/sport-i-wypoczynek.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/themes/panda-theme/assets/images/task.svg b/themes/panda-theme/assets/images/task.svg new file mode 100644 index 0000000..cdc0592 --- /dev/null +++ b/themes/panda-theme/assets/images/task.svg @@ -0,0 +1,3 @@ + + + diff --git a/themes/panda-theme/assets/images/technologia-i-telefon.svg b/themes/panda-theme/assets/images/technologia-i-telefon.svg new file mode 100644 index 0000000..44751a2 --- /dev/null +++ b/themes/panda-theme/assets/images/technologia-i-telefon.svg @@ -0,0 +1,3 @@ + + + diff --git a/themes/panda-theme/assets/images/ticket.svg b/themes/panda-theme/assets/images/ticket.svg new file mode 100644 index 0000000..3cc75f9 --- /dev/null +++ b/themes/panda-theme/assets/images/ticket.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/themes/panda-theme/assets/images/torby-i-podroze.svg b/themes/panda-theme/assets/images/torby-i-podroze.svg new file mode 100644 index 0000000..0324655 --- /dev/null +++ b/themes/panda-theme/assets/images/torby-i-podroze.svg @@ -0,0 +1,3 @@ + + + diff --git a/themes/panda-theme/assets/images/user.svg b/themes/panda-theme/assets/images/user.svg new file mode 100644 index 0000000..e7c38ff --- /dev/null +++ b/themes/panda-theme/assets/images/user.svg @@ -0,0 +1,3 @@ + + + diff --git a/themes/panda-theme/assets/images/wszystkie-kategorie.svg b/themes/panda-theme/assets/images/wszystkie-kategorie.svg new file mode 100644 index 0000000..b0666f9 --- /dev/null +++ b/themes/panda-theme/assets/images/wszystkie-kategorie.svg @@ -0,0 +1,3 @@ + + + diff --git a/themes/panda-theme/assets/js/categories-hover.js b/themes/panda-theme/assets/js/categories-hover.js new file mode 100644 index 0000000..17f5311 --- /dev/null +++ b/themes/panda-theme/assets/js/categories-hover.js @@ -0,0 +1,24 @@ +const cats = document.querySelectorAll(".categories a") + +cats.forEach(cat => { + cat.addEventListener("mouseenter", () => { + cat.classList.add("upscale") + }) + + cat.addEventListener("mouseleave", () => { + cat.classList.remove("upscale") + }) +}) + + +const heroes = document.querySelectorAll(".hero__icon") + +let time = 0 + +heroes.forEach(hero => { + setTimeout(() => { + hero.classList.add("upscale-anim") + }, time) + + time += 200 +}) \ No newline at end of file diff --git a/themes/panda-theme/assets/js/dropcat.js b/themes/panda-theme/assets/js/dropcat.js new file mode 100644 index 0000000..9b435bf --- /dev/null +++ b/themes/panda-theme/assets/js/dropcat.js @@ -0,0 +1,8 @@ +const buttons = document.querySelectorAll(".site-header__dropcat, .dropcats__close svg"); + +buttons.forEach(button => { + button.addEventListener("click", () => { + const dropcat = document.querySelector(".dropcats"); + dropcat.classList.toggle("dropcats_active"); + }); +}); diff --git a/themes/panda-theme/assets/js/live-search.js b/themes/panda-theme/assets/js/live-search.js new file mode 100644 index 0000000..8691016 --- /dev/null +++ b/themes/panda-theme/assets/js/live-search.js @@ -0,0 +1,43 @@ +(function($){ + const $input = $('.site-header__search-input'); + const $container = $('').insertAfter($input); + let timer; + + $input.on('keyup', function(){ + const term = $(this).val().trim(); + clearTimeout(timer); + if (term.length < 2) { + $container.empty().hide(); + return; + } + timer = setTimeout(() => { + $.getJSON(pandaLiveSearch.ajax_url, { + action: 'live_search', + term: term + }).done(function(results){ + $container.empty(); + if (results.length) { + results.forEach(item => { + $container.append( + `
  • + + + ${item.title} + +
  • ` + ); + }); + $container.show(); + } else { + $container.hide(); + } + }); + }, 300); + }); + + $(document).on('click', function(e){ + if (!$(e.target).closest('.site-header__search-input, .site-header__search-suggestions').length) { + $container.hide(); + } + }); +})(jQuery); diff --git a/themes/panda-theme/assets/js/product-slider.js b/themes/panda-theme/assets/js/product-slider.js new file mode 100644 index 0000000..4c5480c --- /dev/null +++ b/themes/panda-theme/assets/js/product-slider.js @@ -0,0 +1,36 @@ +jQuery(function($){ + $('.product-slider').slick({ + slidesToShow: 4, + slidesToScroll: 1, + infinite: true, + arrows: true, + dots: false, + draggable: false, + swipe: false, + autoplay: true, + autoplaySpeed: 4000, + touchMove: false, + prevArrow: '', + nextArrow: '', + responsive: [ + { breakpoint: 1300, settings: { slidesToShow: 3 } }, + { breakpoint: 950, settings: { slidesToShow: 2 } }, + { breakpoint: 620, settings: { slidesToShow: 1 } } + ] + }); + + $('.hero-uv__slider').slick({ + slidesToShow: 1, + slidesToScroll: 1, + infinite: true, + arrows: false, + draggable: false, + swipe: false, + touchMove: false, + dots: true, + autoplay: true, + autoplaySpeed: 4000, + adaptiveHeight: true, + appendDots: $('.hero-uv__slider'), + }); +}); diff --git a/themes/panda-theme/assets/js/shop-links.js b/themes/panda-theme/assets/js/shop-links.js new file mode 100644 index 0000000..92e9f35 --- /dev/null +++ b/themes/panda-theme/assets/js/shop-links.js @@ -0,0 +1,51 @@ +const catList = document.querySelector(".wc-block-product-categories-list"); + +function addShowAllCat(shopUrl) { + if (typeof catList !== 'undefined' && catList) { + + const showAllItem = document.createElement("li"); + showAllItem.classList.add("show-all-categories"); + + const link = document.createElement("a"); + link.href = shopUrl; + link.textContent = "Pokaż wszystkie"; + + showAllItem.appendChild(link); + + catList.insertBefore(showAllItem, catList.firstChild); + } +} + + +function setActiveCatColor() { + const path = window.location.pathname; + const catList = document.querySelector(".wc-block-product-categories-list"); + if (!catList) return; + + const listItems = catList.querySelectorAll("li"); + + if (path === "/sklep" || path === "/sklep/") { + const firstItem = catList.querySelector("li a"); + if (firstItem) { + firstItem.classList.add("active-cat"); + } + } else { + const categorySlug = path.split("/").filter(Boolean)[1].split("-").join(" "); + + listItems.forEach(item => { + const link = item.querySelector("a span") + if(link) { + let text = link.textContent.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase() + + console.log(text, categorySlug) + + if(text == categorySlug) { + link.classList.add("active-cat"); + } + } + }) + } +} + +addShowAllCat(pandaThemeVars.shopUrl); +setActiveCatColor(); \ No newline at end of file diff --git a/themes/panda-theme/footer.php b/themes/panda-theme/footer.php new file mode 100644 index 0000000..9a92460 --- /dev/null +++ b/themes/panda-theme/footer.php @@ -0,0 +1,54 @@ +
    + Fundusze +
    + + + + \ No newline at end of file diff --git a/themes/panda-theme/front-page.php b/themes/panda-theme/front-page.php new file mode 100644 index 0000000..8f88ebb --- /dev/null +++ b/themes/panda-theme/front-page.php @@ -0,0 +1,107 @@ + + +
    + + + + +
    + + Zobacz wszystkie produkty + + + 'product_cat', + 'hide_empty' => false, + ]); + + $product_cats = array_filter($all_cats, function($cat){ + return $cat->slug !== 'bez-kategorii'; + }); + + if (! is_wp_error($product_cats) && ! empty($product_cats)): + foreach ($product_cats as $cat): ?> + + + slug . '.svg'; + echo file_exists($svg) ? file_get_contents($svg) : ''; + ?> + + name); ?> + + + + + Zobacz wszystkie produkty + +
    + +
    +

    + + PANDA + + BESTSELLERY +

    + + + + + + + Przejdź do sklepu + +
    + + +
    +
    + kubek +
    + +
    +

    + CO OFERUJE + + PANDA + + GADŻETY? +

    + +

    + Naszym celem jest dostarczenie produktów reklamowych w możliwie najlepszej jakości oraz cenie. + Posiadamy 10-letnie doświadczenie, + a nasz park maszynowy oraz doświadczenie załogi gwarantuje najwyższą jakość usług. +

    + +
    +
    + +
    +

    Największy wybór produktów

    +
    + +
    +
    + +
    +

    Produkty z Twoim nadrukiem

    +
    + +
    +
    + +
    +

    Produkty w różnych pakietach

    +
    +
    +
    +
    + + \ No newline at end of file diff --git a/themes/panda-theme/functions.php b/themes/panda-theme/functions.php new file mode 100644 index 0000000..4f83ad6 --- /dev/null +++ b/themes/panda-theme/functions.php @@ -0,0 +1,282 @@ + get_permalink( wc_get_page_id( 'shop' ) ) + ] ); +} +add_action('wp_enqueue_scripts', 'panda_enqueue_styles'); + +// WooCommerce support +add_action('after_setup_theme', function () { + add_theme_support('woocommerce'); +}); + + +// Search bar +add_action( 'wp_ajax_live_search', 'panda_live_search' ); +add_action( 'wp_ajax_nopriv_live_search', 'panda_live_search' ); +function panda_live_search() { + if ( empty( $_GET['term'] ) ) { + wp_send_json( [] ); + } + $term = sanitize_text_field( wp_unslash( $_GET['term'] ) ); + + $args = [ + 'post_type' => 'product', + 'posts_per_page' => 5, + 's' => $term, + 'post_status' => 'publish', + ]; + $query = new WP_Query( $args ); + $results = []; + + if ( $query->have_posts() ) { + while ( $query->have_posts() ) { + $query->the_post(); + $results[] = [ + 'title' => get_the_title(), + 'permalink' => get_permalink(), + 'thumb' => get_the_post_thumbnail_url( get_the_ID(), 'thumbnail' ), + ]; + } + wp_reset_postdata(); + } + + wp_send_json( $results ); +} + +add_action( 'wp_enqueue_scripts', function(){ + wp_enqueue_script( + 'panda-live-search', + get_template_directory_uri() . '/assets/js/live-search.js', + [ 'jquery' ], + '1.0', + true + ); + wp_localize_script( 'panda-live-search', 'pandaLiveSearch', [ + 'ajax_url' => admin_url( 'admin-ajax.php' ), + ] ); +}); + + +// Slider +add_action( 'wp_enqueue_scripts', 'enqueue_slick_slider_assets' ); +function enqueue_slick_slider_assets() { + wp_enqueue_style( 'slick-css', 'https://cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.css', array(), '1.8.1' ); + wp_enqueue_style( 'slick-theme-css', 'https://cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick-theme.css', array('slick-css'), '1.8.1' ); + wp_enqueue_script( 'slick-js', 'https://cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.min.js', array('jquery'), '1.8.1', true ); + wp_enqueue_script( 'my-slider-init', get_stylesheet_directory_uri() . '/assets/js/product-slider.js', array('slick-js'), '1.0', true ); +} + +add_shortcode( 'product_slider', 'render_product_slider' ); +function render_product_slider( $atts ) { + $atts = shortcode_atts( array( + 'limit' => 6, + 'orderby' => 'rand', + ), $atts, 'product_slider' ); + + $args = array( + 'post_type' => 'product', + 'posts_per_page' => intval( $atts['limit'] ), + 'orderby' => sanitize_text_field( $atts['orderby'] ), + 'post_status' => 'publish', + ); + $loop = new WP_Query( $args ); + + + wp_enqueue_script("slider-images-js", plugins_url("/pandaGadzety/assets/js/slider-images.js"), [], null, true); + + $productData = []; + + if ( $loop->have_posts() ) { + while ( $loop->have_posts() ) { + $loop->the_post(); + global $product; + $sku = $product->get_sku(); + + if ( $sku ) { + try { + $info = (new \Foxstudio\Plugins\Template\Repository\ProductRepository(SERVER_URL))->getProductInfo($sku); + if (!empty($info['message'])) { + $productData[$sku] = [ + 'img' => $info['message']['productBaseInfo']['primary_img'] ?? null, + ]; + } + } catch (\Throwable $e) { + } + } + } + wp_localize_script("slider-images-js", "archiveImagesData", [ + 'products' => $productData + ]); + wp_reset_postdata(); + } + + + + if ( ! $loop->have_posts() ) { + return '

    Brak produktów.

    '; + } + + + ?> +
    + have_posts() ) : $loop->the_post(); global $product; ?> +
    + +
    +

    +

    get_short_description(); ?>

    + Od get_price_html(); ?> + Zobacz produkt +
    +
    + +
    + Brak podobnych produktów.

    '; + } + + return do_shortcode( '[product_slider ids="' . implode( ',', $related ) . '" limit="' . $limit . '" orderby="post__in"]' ); +} ); + + + +// landing page slider + +add_shortcode( 'hero_slider', 'panda_render_hero_slider' ); +function panda_render_hero_slider( $atts ) { + $slides = [ + get_template_directory_uri() . '/assets/images/slide1.png', + get_template_directory_uri() . '/assets/images/slide2.png', + get_template_directory_uri() . '/assets/images/slide3.png', + ]; + ob_start(); + ?> +
    +
    +
    +

    Nowa kolekcja kubków
    z nadrukiem UV

    +

    Dodaj na kubek logo z Twoim ulubionym nadrukiem.

    + Zobacz produkty +
    +
    + +
    + +
    + +
    +
    +
    + 'Shop Filters', + 'id' => 'shop-filters', + 'before_widget' => '
    ', + 'after_widget' => '
    ', + 'before_title' => '

    ', + 'after_title' => '

    ', + ) ); +} +add_action( 'widgets_init', 'register_shop_sidebar' ); + +// breadcrumbs separator change +add_filter( 'woocommerce_breadcrumb_defaults', 'my_change_breadcrumb_separator' ); +function my_change_breadcrumb_separator( $defaults ) { + $defaults['delimiter'] = ' > '; + return $defaults; +} + +// changing cart button on product to see product +/*add_filter( 'woocommerce_loop_add_to_cart_link', 'panda_replace_add_to_cart_with_view_product', 10, 2 ); +function panda_replace_add_to_cart_with_view_product( $button_html, $product ) { + $url = $product->get_permalink(); + $label = esc_html__( 'Zobacz produkt', 'panda-theme' ); + $classes = 'view-product'; + + return sprintf( + '%3$s', + esc_url( $url ), + esc_attr( $classes ), + $label + ); +}*/ + +// Wstawianie własnego „Zobacz produkt” w pętli po produktach +add_action( 'woocommerce_after_shop_loop_item', 'panda_replace_add_to_cart_with_view_product', 10 ); + +function panda_replace_add_to_cart_with_view_product() { + global $product; + $url = $product->get_permalink(); + $label = esc_html__( 'Zobacz produkt', 'panda-theme' ); + $classes = 'view-product'; + + printf( + '%3$s', + esc_url( $url ), + esc_attr( $classes ), + $label + ); +} + + +add_action('wp_enqueue_scripts', function() { + if ( is_shop() || is_product_category() ) { + wp_enqueue_script("slider-images-js", plugins_url("/pandaGadzety/assets/js/slider-images.js"), [], null, true); + + global $wp_query; + + $productData = []; + + foreach ( $wp_query->posts as $post ) { + $product = wc_get_product( $post->ID ); + if ( ! $product ) continue; + + $sku = $product->get_sku(); + + if ( $sku ) { + try { + $info = (new \Foxstudio\Plugins\Template\Repository\ProductRepository(SERVER_URL))->getProductInfo($sku); + if (!empty($info['message'])) { + $productData[$sku] = [ + 'img' => $info['message']['productBaseInfo']['primary_img'] ?? null, + ]; + } + } catch (\Throwable $e) {} + } + } + + wp_localize_script("slider-images-js", "archiveImagesData", [ + 'products' => $productData + ]); + } +}); diff --git a/themes/panda-theme/header.php b/themes/panda-theme/header.php new file mode 100644 index 0000000..e83cca2 --- /dev/null +++ b/themes/panda-theme/header.php @@ -0,0 +1,142 @@ + +> + + + + + +> + diff --git a/themes/panda-theme/index.php b/themes/panda-theme/index.php new file mode 100644 index 0000000..3946eb9 --- /dev/null +++ b/themes/panda-theme/index.php @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/themes/panda-theme/page.php b/themes/panda-theme/page.php new file mode 100644 index 0000000..63a776b --- /dev/null +++ b/themes/panda-theme/page.php @@ -0,0 +1,16 @@ + + +
    + +
    + + diff --git a/themes/panda-theme/style.css b/themes/panda-theme/style.css new file mode 100644 index 0000000..71f9d5e --- /dev/null +++ b/themes/panda-theme/style.css @@ -0,0 +1,6 @@ +/* +Theme Name: Panda Theme +Author: Foxstudio +Version: 1.0 +Description: Custom theme based on a Figma project. +*/ diff --git a/themes/panda-theme/woocommarce.php b/themes/panda-theme/woocommarce.php new file mode 100644 index 0000000..11530ad --- /dev/null +++ b/themes/panda-theme/woocommarce.php @@ -0,0 +1,8 @@ + +
    + +
    + + + + +
    + +
    + +
    + + +
    +
    +
    Wszystkie produkty
    +
    + +
    +
    + + + + + + + + + + + + str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), + 'format' => '?paged=%#%', + 'current' => max( 1, get_query_var('paged') ), + 'total' => $wp_query->max_num_pages, + 'prev_text' => '< Poprzednia strona', + 'next_text' => 'Następna strona >', + 'type' => 'array', + 'end_size' => 2, + 'mid_size' => 1, + ) ); + + if ( is_array( $pagination ) ) : ?> + + + + + + +
    +
    + + diff --git a/themes/panda-theme/woocommerce/cart/cart.php b/themes/panda-theme/woocommerce/cart/cart.php new file mode 100644 index 0000000..dc9d46b --- /dev/null +++ b/themes/panda-theme/woocommerce/cart/cart.php @@ -0,0 +1,206 @@ + + +
    + + + + + + + + + + + + + + + + + cart->get_cart() as $cart_item_key => $cart_item ) { + $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key ); + $product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key ); + /** + * Filter the product name. + * + * @since 2.1.0 + * @param string $product_name Name of the product in the cart. + * @param array $cart_item The product in the cart. + * @param string $cart_item_key Key for the product in the cart. + */ + $product_name = apply_filters( 'woocommerce_cart_item_name', $_product->get_name(), $cart_item, $cart_item_key ); + + if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_cart_item_visible', true, $cart_item, $cart_item_key ) ) { + $product_permalink = apply_filters( 'woocommerce_cart_item_permalink', $_product->is_visible() ? $_product->get_permalink( $cart_item ) : '', $cart_item, $cart_item_key ); + ?> + + + + + + + + + + + + + + + + + + + + +
    + ×', + esc_url( wc_get_cart_remove_url( $cart_item_key ) ), + /* translators: %s is the product name */ + esc_attr( sprintf( __( 'Remove %s from cart', 'woocommerce' ), wp_strip_all_tags( $product_name ) ) ), + esc_attr( $product_id ), + esc_attr( $_product->get_sku() ) + ), + $cart_item_key + ); + ?> + + get_sku(); + + if ( $sku ) { + try { + $info = (new \Foxstudio\Plugins\Template\Repository\ProductRepository(SERVER_URL))->getProductInfo($sku); + if (!empty($info['message'])) { + $img_url = $info['message']['productBaseInfo']['primary_img'] ?? ''; + } + } catch (\Throwable $e) { + } + } + + if ( $img_url ) { + echo '' . esc_attr( $_product->get_name() ) . ''; + } else { + echo $_product->get_image(); // lub wc_get_product_thumbnail(); + } + ?> + + + %s', esc_url( $product_permalink ), $_product->get_name() ), $cart_item, $cart_item_key ) ); + } + + do_action( 'woocommerce_after_cart_item_name', $cart_item, $cart_item_key ); + + // Meta data. + echo wc_get_formatted_cart_item_data( $cart_item ); // PHPCS: XSS ok. + + // Backorder notification. + if ( $_product->backorders_require_notification() && $_product->is_on_backorder( $cart_item['quantity'] ) ) { + echo wp_kses_post( apply_filters( 'woocommerce_cart_item_backorder_notification', '

    ' . esc_html__( 'Available on backorder', 'woocommerce' ) . '

    ', $product_id ) ); + } + ?> +
    + cart->get_product_price( $_product ), $cart_item, $cart_item_key ); // PHPCS: XSS ok. + ?> + + is_sold_individually() ) { + $min_quantity = 1; + $max_quantity = 1; + } else { + $min_quantity = 0; + $max_quantity = $_product->get_max_purchase_quantity(); + } + + $product_quantity = woocommerce_quantity_input( + array( + 'input_name' => "cart[{$cart_item_key}][qty]", + 'input_value' => $cart_item['quantity'], + 'max_value' => $max_quantity, + 'min_value' => $min_quantity, + 'product_name' => $product_name, + ), + $_product, + false + ); + + echo apply_filters( 'woocommerce_cart_item_quantity', $product_quantity, $cart_item_key, $cart_item ); // PHPCS: XSS ok. + ?> + + cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); // PHPCS: XSS ok. + ?> +
    + +
    + + + +
    + +
    + + + + + + diff --git a/themes/panda-theme/woocommerce/content-product.php b/themes/panda-theme/woocommerce/content-product.php new file mode 100644 index 0000000..f47606c --- /dev/null +++ b/themes/panda-theme/woocommerce/content-product.php @@ -0,0 +1,72 @@ +is_visible() ) { + return; +} +?> +
  • data-sku="get_sku()); ?>"> + '; + echo apply_filters( 'woocommerce_short_description', $product->get_short_description() ); + echo ''; + + /** + * Hook: woocommerce_after_shop_loop_item_title. + * + * @hooked woocommerce_template_loop_rating - 5 + * @hooked woocommerce_template_loop_price - 10 + */ + do_action( 'woocommerce_after_shop_loop_item_title' ); + + /** + * Hook: woocommerce_after_shop_loop_item. + * + * @hooked woocommerce_template_loop_product_link_close - 5 + * @hooked woocommerce_template_loop_add_to_cart - 10 + */ + do_action( 'woocommerce_after_shop_loop_item' ); + ?> +
  • diff --git a/themes/panda-theme/woocommerce/content-single-product.php b/themes/panda-theme/woocommerce/content-single-product.php new file mode 100644 index 0000000..411d854 --- /dev/null +++ b/themes/panda-theme/woocommerce/content-single-product.php @@ -0,0 +1,75 @@ +get_sku(); + +$attributes = $product->get_attributes(); +?> + +
    + +
    + + +
    + +
    +
    + +
    +

    + PODOBNE PRODUKTY +

    + + +
    \ No newline at end of file diff --git a/themes/panda-theme/woocommerce/single-product.php b/themes/panda-theme/woocommerce/single-product.php new file mode 100644 index 0000000..0441ab5 --- /dev/null +++ b/themes/panda-theme/woocommerce/single-product.php @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + +