diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml new file mode 100644 index 0000000..01f3bb9 --- /dev/null +++ b/.github/workflows/sync.yml @@ -0,0 +1,67 @@ +name: Universal Branch Sync + +on: + push: + branches: + - '**' + pull_request: + branches: + - '**' + schedule: + - cron: "0 0 * * *" + workflow_dispatch: + inputs: + branch: + description: 'Branch to sync (leave empty for current)' + required: false + default: '' + +jobs: + sync-branches: + runs-on: ubuntu-latest + steps: + - name: ✅ Checkout Repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.GH_PAT }} + + - name: 🔧 Configure Git + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + + - name: 🔗 Add Upstream Repository + run: | + git remote add upstream https://github.com/zidsa/custom-theme-sample.git || true + git fetch --prune upstream + + - name: 🔄 Sync Main Branch Safely + run: | + git checkout main || git checkout -b main + git pull upstream main --no-rebase --no-commit || true + git push origin main + + - name: 🔍 Determine Current Branch + id: branch + run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV + + - name: 🔄 Sync Feature Branches with Main + run: | + for branch in $(git branch -r | grep -v 'origin/main' | grep -v 'HEAD' | sed 's/origin\///'); do + echo "➡️ Checking branch: $branch" + git checkout "$branch" || continue + git merge origin/main --no-commit --no-ff || true + + if git diff-index --quiet HEAD; then + echo "✅ Branch '$branch' is already up-to-date." + else + echo "🚀 Updating branch '$branch'..." + git commit -m "Sync with upstream main" + git push origin "$branch" + fi + done + + - name: 🧹 Post Checkout Repository + if: always() + run: echo "Post-job steps finished." diff --git a/assets/custom.css b/assets/custom.css index 1408121..b82431c 100644 --- a/assets/custom.css +++ b/assets/custom.css @@ -266,15 +266,14 @@ margin-left: -15px; } -.products-list .prod-col, .bundle-offer-products .prod-col{ - width: 20%; - padding: 15px; +.products-list{ + display: grid; + gap: 10px; + grid-template-columns: repeat(4,1fr); } - -.products-list .prod-col-attr{ - width: 25%; +.products-list .product-item{ + width: 100%; } - .sort-block-width { margin-left: 30px; } @@ -538,10 +537,10 @@ padding-right: 0px; } - .main-slider, .main-slider .slider-item { - + .products-list{ + grid-template-columns: repeat(2,1fr); + margin-inline: 10px; } - .main-slider .slick-dots li button:before { font-size: 10px; } @@ -562,7 +561,7 @@ } .products-list .prod-col, .products-list .prod-col-attr{ - width: 50%; + width: 100%; } .product-item { @@ -585,9 +584,14 @@ width: 32px; } -} +} +@media ( min-width: 769px ) and ( max-width: 992px){ + .products-list{ + grid-template-columns: repeat(3,1fr); + } +} .btn:focus,.btn:active, .page-link:focus, .page-link:active { outline: none !important; box-shadow: none; @@ -636,7 +640,7 @@ height: 35px; cursor: pointer; border-radius: 5px; - background-color: white; + background-color: transparent; } .rtl .add-to-wishlist { @@ -659,3 +663,100 @@ mask-image: url('./heart-filled.svg'); background-color: var(--primary_color, #D86F6F); } + +/* product0-slider */ +.custom-slider-section { + margin-bottom: 4rem; +} +.custom-product-title{ + font-size: 32px; + font-weight: 600; +} +.custom-main-title { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 20px; +} + +.slider-navigation { + display: flex; + gap: 10px; +} +.slider-navigation .swiper-button-prev, +.slider-navigation .swiper-button-next { + color: white; + background: var(--primary-color); + opacity: 0.8; + border-radius: 50%; + width: 53px; + height: 53px; + display: flex; + justify-content: center; + align-items: center; + z-index: 2; + position: static; +} +.slider-navigation .swiper-button-next:after, +.slider-navigation .swiper-button-prev:after { + font-size: 15px; +} +.slider-navigation .swiper-button-next.swiper-button-disabled, +.slider-navigation .swiper-button-prev.swiper-button-disabled { + opacity: 0.5; +} +.custom-slider-section .swiper-container { + overflow: hidden; +} +{# style grid #} +.show-all-btn { + width: 325px; + height: 63px; + padding: 15px 120px 10px 120px; + margin: auto; + display: flex; + align-items: center; + justify-content: center; + font-size: 32px; + font-weight: 700; + line-height: 38.4px; + text-align: center; + background: var(--primary-color); + color: white; +} +.custom-slider-section .product-grid { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 15px; +} +@media (max-width: 768px) { + .custom-slider-section .product-grid { + grid-template-columns: repeat(3, 1fr); + } +} +@media (max-width: 500px) { + .custom-slider-section { + margin-bottom: 2rem; + } + .custom-product-title{ + text-align: center; + margin:auto; + font-size: 24px; + } + .custom-slider-section .product-grid { + grid-template-columns: repeat(2, 1fr); + gap: 5px; + } + .slider-navigation .swiper-button-prev, + .slider-navigation .swiper-button-next { + display: none; + } + .show-all-btn { + width: 163px; + height: 31px; + padding: 7px 60px 5px 60px; + font-size: 16px; + font-weight: 700; + line-height: 19.2px; + } +} \ No newline at end of file diff --git a/assets/main.css b/assets/main.css index d6fb5f4..9047328 100644 --- a/assets/main.css +++ b/assets/main.css @@ -229,10 +229,10 @@ button.more-button , a.more-button { .account-lang-currency .account-btn { background-color: transparent; - border: 1px solid var(--menu-header-text-color-primary-bg, var(--text-color-primary-bg)); + border: 1px solid var(--header-text-color-primary-bg, var(--text-color-primary-bg)); box-sizing: border-box; border-radius: 5px; - color: var(--menu-header-text-color-primary-bg, var(--text-color-primary-bg)); + color: var(--header-text-color-primary-bg, var(--text-color-primary-bg)); min-width: 124px; padding: 3px 5px; } @@ -805,61 +805,6 @@ button.more-button , a.more-button { font-size: 18px; } -/* -.cat-col, .prod-col { - flex: 0 0 20%; - max-width: 20%; - - position: relative; - width: 100%; - min-height: 1px; - padding-right: 15px; - padding-left: 15px; -} - -.prod-col-tb { - padding-top: 15px; - padding-bottom: 15px; -} - -.slider-arrow { - height: 50px; - position: absolute; - top: 50%; - -webkit-transform: translateY(-50%); - -ms-transform: translateY(-50%); - transform: translateY(-50%); - cursor: pointer; -} - -.slider-arrow span { - color: #ffffff; - font-size: 40px; -} - -.slider-arrow.right { - right: -40px; -} - -.slider-arrow.left { - left: -40px; -} - -@media only screen and (max-width: 768px) { - - .home-categories-section .categories { - grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); - } - -} - -@media only screen and (max-width: 414px) { - - .home-categories-section .categories { - grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); - } - -} */ /* products-section */ .products-section { @@ -968,7 +913,6 @@ button.more-button , a.more-button { .product-item { width: 100%; - max-width: 200px; } .product-item .product-title { @@ -1012,7 +956,7 @@ button.more-button , a.more-button { .product-item img { max-width: 100%; max-height: 100%; - object-fit: contain; + object-fit: cover; } .products-title-section { @@ -1747,6 +1691,14 @@ hr { } +.btns-card .btn-primary { + width: 100%; + height: 40px; + display: flex; + justify-content: center; + align-items: center; + font-size: 16px; +} .btn-primary { color: var(--text-color-primary-bg); background-color: var(--primary-color); @@ -1764,6 +1716,7 @@ hr { border-color: #cccccc; } + .form-control:focus { box-shadow: none !important; border-color: #cccccc; diff --git a/common/product-card.twig b/common/product-card.twig index b6e0680..d3cc5da 100644 --- a/common/product-card.twig +++ b/common/product-card.twig @@ -11,20 +11,16 @@ {% endif %} - - - - - +
-
+
{% if product.badge %} {% include 'template_for_products_badge' ignore missing %} {% endif %}
-
{{ product.name | raw }}
- {% if store.is_product_reviews_enabled %} -
- {% if product.rating %} - {% include 'rating-stars.twig' with {'rating' : product.rating.average } %} - ({{ product.rating.total_count }}) - {% endif %} -
- {% endif %} -
- {% if product.formatted_sale_price is not null %} -
-
{{ product.formatted_sale_price }}
-
{{ product.formatted_price }} - -    {{ locals.product_discount }} {{ product.discount_percentage }}% - -
+
+ + +
+ {% if product.is_infinite == false and product.quantity <= 0 %} + + + {{ locals.btn_error_product_out_of_stock }} + + {% elseif ( product.has_options or product.has_fields ) %} + {{ locals.add_to_cart }} + + {% else %} + + + {{ locals.add_to_cart }} + + + {% endif %} +
+
+ {% endif %} + + + + + + + + \ No newline at end of file diff --git a/common/products-filter.twig b/common/products-filter.twig index bfde932..b9a83dc 100644 --- a/common/products-filter.twig +++ b/common/products-filter.twig @@ -96,6 +96,11 @@ {% endif %}
+
+ + +
+
@@ -115,4 +120,19 @@
- + \ No newline at end of file diff --git a/custom-theme-zid-fork.zip b/custom-theme-zid-fork.zip new file mode 100644 index 0000000..f8a76b7 Binary files /dev/null and b/custom-theme-zid-fork.zip differ diff --git a/layout.twig b/layout.twig index 5b789df..8f46d0a 100644 --- a/layout.twig +++ b/layout.twig @@ -1,537 +1,610 @@ - - - - - {{ header_meta_tags | raw }} - - - - - - - {##} - - - - - - - - - - {% if session.lang.code == 'ar' %} - - {% else %} - - {% endif %} - - - - - - - - - - - - - - - - - - - - {% if session.lang.code == 'ar' %} - - {% endif %} - - {% block top_links %}{% endblock %} - - {% if user_custom_css %} - - {% endif %} - + + + + + {# {{ header_meta_tags | raw }} #} + + + + + + + {##} + + + + + + {# swiper css #} + + + + + {% if session.lang.code == 'ar' %} + + {% else %} + + {% endif %} + + + + + + + + + + + + + + + + + + + + + + {% if session.lang.code == 'ar' %} + + {% endif %} + + {% block top_links %}{% endblock %} + + {% if user_custom_css %} + + + {% endif %} - - -{% if store.editing_mode %} - -{% endif %} - - - -{% block top_body %}{% endblock %} - -
-
- {% block header %}{% endblock %} -
-
- {% block main_content %}{% endblock %} -
- - {% block footer_sticky %}{% endblock %} -
- -{{ zidapi_script|raw }} - - - - - - - - - - - - - - - -{% block footer_scripts %}{% endblock %} - - - - - - -{% schema %} -{ - "colors":{ - "name": { - "ar": "الالوان", - "en": "Colors" - }, - "icon": "fa fa-paint-brush", - "display": true, - "settings":{ - "header": { - "type": "fieldset", - "label": { - "ar": "رأس الصفحة", - "en": "Header" - }, - "icon": "font_awesome", - "expandable": true, - "settings": { - "background_color": { - "type": "color", - "label": { - "ar": "لون الخلفية", - "en": "Background color" - } - }, - "text_color": { - "type": "color", - "label": { - "ar": "لون النص", - "en": "Text color" - } - }, - "menu_background_color": { - "type": "color", - "label": { - "ar": "لون خلفية القائمة الرئيسية (اختياري)", - "en": "Menu color" - } - }, - "menu_text_color": { - "type": "color", - "label": { - "ar": "لون نص القائممة الرئيسية (اختياري)", - "en": "Text color" - } - } - } - }, - "footer": { - "type": "fieldset", - "label": { - "ar": "اسفل الصفحة", - "en": "Header" - }, - "icon": "font_awesome", - "expandable": true, - "settings": { - "background_color": { - "type": "color", - "label": { - "ar": "لون الخلفية", - "en": "Text color" - } - }, - "text_color": { - "type": "color", - "label": { - "ar": "لون النص", - "en": "Text color" - } - } - } - }, - "background": { - "type": "fieldset", - "label": { - "ar": "الخلفية", - "en": "Background" - }, - "icon": "font_awesome", - "expandable": true, - "settings": { - "image": { - "type": "image", - "label": { - "ar": "الصورة", - "en": "Logo" - }, - "info": { - "ar": "ارفع صورة بحجم 150 * 150 ", - "en": "This is an info text sample here" - } - } - } - } - } - }, - "fonts":{ - "name": { - "ar": "الخطوط", - "en": "fonts" - }, - "icon": "fa fa-font", - "display": true, - "settings": { - "name": { - "type": "select", - "label": { - "ar": "اسم الخط", - "en": "Font name" - }, - "options": [ - { - "value": "Changa", - "label": { - "ar": "Changa", - "en": "Changa" - } - }, - { - "value": "Cairo", - "label": { - "ar": "Cairo", - "en": "Cairo" - } - }, - { - "value": "Amiri", - "label": { - "ar": "Amiri", - "en": "Amiri" - } - }, - { - "value": "Mada", - "label": { - "ar": "Mada", - "en": "Mada" - } - }, - { - "value": "Tajawal", - "label": { - "ar": "Tajawal", - "en": "Tajawal" - } - }, - { - "value": "Almarai", - "label": { - "ar": "Almarai", - "en": "Almarai" - } - }, - { - "value": "El+Messiri", - "label": { - "ar": "El Messiri", - "en": "El Messiri" - } - }, - { - "value": "Lalezar", - "label": { - "ar": "Lalezar", - "en": "Lalezar" - } - }, - { - "value": "Scheherazade", - "label": { - "ar": "Scheherazade", - "en": "Scheherazade" - } - }, - { - "value": "Lemonada", - "label": { - "ar": "Lemonada", - "en": "Lemonada" - } - }, - { - "value": "Markazi+Text", - "label": { - "ar": "Markazi", - "en": "Markazi" - } - }, - { - "value": "Lateef", - "label": { - "ar": "Lateef", - "en": "Lateef" - } - }, - { - "value": "Reem+Kufi", - "label": { - "ar": "Reem Kufi", - "en": "Reem Kufi" - } - }, - { - "value": "IBM+Plex+Sans+Arabic", - "label": { - "ar": "IBM Arabic", - "en": "IBM Arabic" - } - }, - { - "value": "Harmattan", - "label": { - "ar": "Harmattan", - "en": "Harmattan" - } - }, - { - "value": "Mirza", - "label": { - "ar": "Mirza", - "en": "Mirza" - } - }, - { - "value": "Rakkas", - "label": { - "ar": "Rakkas", - "en": "Rakkas" - } - }, - { - "value": "Katibeh", - "label": { - "ar": "Katibeh", - "en": "Katibeh" - } - }, - { - "value": "Scheherazade+New", - "label": { - "ar": "Scheherazade New", - "en": "Scheherazade New" - } - }, - { - "value": "Aref+Ruqaa", - "label": { - "ar": "Aref Ruqaa", - "en": "Aref Ruqaa" - } - }, - { - "value": "Qahiri", - "label": { - "ar": "Qahiri", - "en": "Qahiri" - } - }, - { - "value": "Jomhuria", - "label": { - "ar": "Jomhuria", - "en": "Jomhuria" - } - }, - { - "value": "Kufam", - "label": { - "ar": "Kufam", - "en": "Kufam" - } - }, - { - "value": "Vibes", - "label": { - "ar": "Vibes", - "en": "Vibes" - } - }, - { - "value": "Noto+Kufi+Arabic", - "label": { - "ar": "Noto Kufi", - "en": "Noto Kufi" - } - }, - { - "value": "Noto+Naskh+Arabic", - "label": { - "ar": "Noto Naskh", - "en": "Noto Naskh" - } - }, - { - "value": "Noto+Sans+Arabic", - "label": { - "ar": "Noto Sans", - "en": "Noto Sans" - } - }, - { - "value": "Noto+Nastaliq+Urdu", - "label": { - "ar": "Noto Nastaliq Urdu", - "en": "Noto Nastaliq Urdu" - } - } - ], - "default": "Changa" - } - } - } -} -{% endschema %} + + + {% if store.editing_mode %} + + {% endif %} + + + + {% block top_body %}{% endblock %} + +
+
{% block header %}{% endblock %} +
+
{% block main_content %}{% endblock %} +
+ + {% block footer_sticky %}{% endblock %} +
+ + {{ zidapi_script|raw }} + + + + {# script modes of the categoryes #} + + {# End the script #} + + + + + + + + + + + + + {# swiper js #} + + {% block footer_scripts %} + {% endblock %} + + + + + + + {% schema %} + { + "colors":{ + "name": { + "ar": "الالوان", + "en": "Colors" + }, + "icon": "fa fa-paint-brush", + "display": true, + "settings":{ + "header": { + "type": "fieldset", + "label": { + "ar": "رأس الصفحة", + "en": "Header" + }, + "icon": "font_awesome", + "expandable": true, + "settings": { + "background_color": { + "type": "color", + "label": { + "ar": "لون الخلفية", + "en": "Background color" + } + }, + "text_color": { + "type": "color", + "label": { + "ar": "لون النص", + "en": "Text color" + } + }, + "menu_background_color": { + "type": "color", + "label": { + "ar": "لون خلفية القائمة الرئيسية (اختياري)", + "en": "Menu color" + } + }, + "menu_text_color": { + "type": "color", + "label": { + "ar": "لون نص القائممة الرئيسية (اختياري)", + "en": "Text color" + } + } + } + }, + "footer": { + "type": "fieldset", + "label": { + "ar": "اسفل الصفحة", + "en": "Header" + }, + "icon": "font_awesome", + "expandable": true, + "settings": { + "background_color": { + "type": "color", + "label": { + "ar": "لون الخلفية", + "en": "Text color" + } + }, + "text_color": { + "type": "color", + "label": { + "ar": "لون النص", + "en": "Text color" + } + } + } + }, + "background": { + "type": "fieldset", + "label": { + "ar": "الخلفية", + "en": "Background" + }, + "icon": "font_awesome", + "expandable": true, + "settings": { + "image": { + "type": "image", + "label": { + "ar": "الصورة", + "en": "Logo" + }, + "info": { + "ar": "ارفع صورة بحجم 150 * 150 ", + "en": "This is an info text sample here" + } + } + } + } + } + }, + "fonts":{ + "name": { + "ar": "الخطوط", + "en": "fonts" + }, + "icon": "fa fa-font", + "display": true, + "settings": { + "name": { + "type": "select", + "label": { + "ar": "اسم الخط", + "en": "Font name" + }, + "options": [ + { + "value": "Changa", + "label": { + "ar": "Changa", + "en": "Changa" + } + }, + { + "value": "Cairo", + "label": { + "ar": "Cairo", + "en": "Cairo" + } + }, + { + "value": "Amiri", + "label": { + "ar": "Amiri", + "en": "Amiri" + } + }, + { + "value": "Mada", + "label": { + "ar": "Mada", + "en": "Mada" + } + }, + { + "value": "Tajawal", + "label": { + "ar": "Tajawal", + "en": "Tajawal" + } + }, + { + "value": "Almarai", + "label": { + "ar": "Almarai", + "en": "Almarai" + } + }, + { + "value": "El+Messiri", + "label": { + "ar": "El Messiri", + "en": "El Messiri" + } + }, + { + "value": "Lalezar", + "label": { + "ar": "Lalezar", + "en": "Lalezar" + } + }, + { + "value": "Scheherazade", + "label": { + "ar": "Scheherazade", + "en": "Scheherazade" + } + }, + { + "value": "Lemonada", + "label": { + "ar": "Lemonada", + "en": "Lemonada" + } + }, + { + "value": "Markazi+Text", + "label": { + "ar": "Markazi", + "en": "Markazi" + } + }, + { + "value": "Lateef", + "label": { + "ar": "Lateef", + "en": "Lateef" + } + }, + { + "value": "Reem+Kufi", + "label": { + "ar": "Reem Kufi", + "en": "Reem Kufi" + } + }, + { + "value": "IBM+Plex+Sans+Arabic", + "label": { + "ar": "IBM Arabic", + "en": "IBM Arabic" + } + }, + { + "value": "Harmattan", + "label": { + "ar": "Harmattan", + "en": "Harmattan" + } + }, + { + "value": "Mirza", + "label": { + "ar": "Mirza", + "en": "Mirza" + } + }, + { + "value": "Rakkas", + "label": { + "ar": "Rakkas", + "en": "Rakkas" + } + }, + { + "value": "Katibeh", + "label": { + "ar": "Katibeh", + "en": "Katibeh" + } + }, + { + "value": "Scheherazade+New", + "label": { + "ar": "Scheherazade New", + "en": "Scheherazade New" + } + }, + { + "value": "Aref+Ruqaa", + "label": { + "ar": "Aref Ruqaa", + "en": "Aref Ruqaa" + } + }, + { + "value": "Qahiri", + "label": { + "ar": "Qahiri", + "en": "Qahiri" + } + }, + { + "value": "Jomhuria", + "label": { + "ar": "Jomhuria", + "en": "Jomhuria" + } + }, + { + "value": "Kufam", + "label": { + "ar": "Kufam", + "en": "Kufam" + } + }, + { + "value": "Vibes", + "label": { + "ar": "Vibes", + "en": "Vibes" + } + }, + { + "value": "Noto+Kufi+Arabic", + "label": { + "ar": "Noto Kufi", + "en": "Noto Kufi" + } + }, + { + "value": "Noto+Naskh+Arabic", + "label": { + "ar": "Noto Naskh", + "en": "Noto Naskh" + } + }, + { + "value": "Noto+Sans+Arabic", + "label": { + "ar": "Noto Sans", + "en": "Noto Sans" + } + }, + { + "value": "Noto+Nastaliq+Urdu", + "label": { + "ar": "Noto Nastaliq Urdu", + "en": "Noto Nastaliq Urdu" + } + } + ], + "default": "Changa" + } + } + } + } + {% endschema %} diff --git a/templates/product.twig b/templates/product.twig index 6268bf8..db1673c 100644 --- a/templates/product.twig +++ b/templates/product.twig @@ -17,9 +17,8 @@
- +
-