Skip to content

Commit

Permalink
Merge pull request #318 from damonsson/2.0
Browse files Browse the repository at this point in the history
performance optimization
  • Loading branch information
damonsson authored Dec 5, 2024
2 parents e2aa6c2 + 12d9b22 commit 70da70f
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/packages/sylius_twig_hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,8 @@ sylius_twig_hooks:
limit: 8
template: '@SyliusShop/homepage/list_products.html.twig'
priority: 0
'sylius_shop.base.footer.content':
payment_methods:
template: 'payment_methods.html.twig'
priority: 100

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
{% if key == 1 %}
{{ component('sylius_shop:main_image', {
product: product,
fetchpriority: "high",
class: "w-100 h-100 object-fit-cover",
filter: 'sylius_shop_product_small_thumbnail'
}) }}
Expand Down
27 changes: 27 additions & 0 deletions templates/payment_methods.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<div class="col-12 text-center col-md-6 order-md-4 text-md-start col-lg-3 order-lg-4 text-lg-center">
<div class="mb-3 fw-medium">Payment methods:</div>

<div class="row g-2 mb-4">
<div class="col-4">
<a href="https://sylius.com/partner/paypal/" target="_blank" class="d-block border rounded p-2">
<img class="img-fluid" loading="lazy" src="{{ asset('build/shop/images/paypal-logo.svg', 'shop') }}" width="100%" height="100%" alt="PayPal" />
</a>
</div>
<div class="col-4">
<a href="https://sylius.com/partner/adyen/" target="_blank" class="d-block border rounded p-2">
<img class="img-fluid" loading="lazy" src="{{ asset('build/shop/images/adyen-logo.svg', 'shop') }}" width="100%" height="100%" alt="Adyen" />
</a>
</div>
<div class="col-4">
<a href="https://sylius.com/partner/mollie/" target="_blank" class="d-block border rounded p-2">
<img class="img-fluid" loading="lazy" src="{{ asset('build/shop/images/mollie-logo.svg', 'shop') }}" width="100%" height="100%" alt="Mollie" />
</a>
</div>
</div>

<div class="d-flex justify-content-center justify-content-md-start justify-content-lg-center gap-3 mb-5">
<a class="link-reset" href="https://www.instagram.com/sylius.team/" target="_blank" aria-label="instagram logo">{{ ux_icon('tabler:brand-instagram', { class: 'icon icon-md' }) }}</a>
<a class="link-reset" href="https://www.facebook.com/SyliusEcommerce/" target="_blank" aria-label="facebook logo">{{ ux_icon('tabler:brand-facebook', { class: 'icon icon-md' }) }}</a>
<a class="link-reset" href="https://x.com/Sylius" target="_blank" aria-label="x logo">{{ ux_icon('tabler:brand-x', { class: 'icon icon-md' }) }}</a>
</div>
</div>

0 comments on commit 70da70f

Please sign in to comment.