Skip to content

Commit

Permalink
Changed translation | Removed @once | Fix grouped products responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
Roene-JustBetter committed Jan 7, 2025
1 parent cac9312 commit 43430ff
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion lang/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
":count of the requested quantity will be backordered": ":count van de aangevraagde hoeveelheid zal worden nageleverd",
"Accept cookies": "Accepteer cookies",
"Account": "Account",
"Add to cart": "Toevoegen aan winkelwagen",
"Add to cart": "In winkelwagen",
"Added": "Toegevoegd",
"Adding": "Aan het toevoegen",
"Addition": "Toevoeging",
Expand Down
10 changes: 2 additions & 8 deletions resources/views/components/productlist.blade.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
@props(['value', 'title' => false, 'field' => 'sku.keyword'])

@once
@if ($file = vite_filename_path('Listing.vue'))
@vite([$file])
@endif
@endonce

@if ($value)
<lazy v-slot="{ intersected }">
<listing v-if="intersected">
Expand Down Expand Up @@ -45,15 +39,15 @@ class="absolute left-0 top-1/2 sm:-translate-x-1/2 -translate-y-1/2"
v-on:click="navigate(currentSlide - 1)"
:aria-label="__('Prev')"
>
<x-heroicon-o-chevron-left :defer="false" class="size-6 shrink-0"/>
<x-heroicon-o-chevron-left class="size-6 shrink-0"/>
</x-rapidez::button.slider>
<x-rapidez::button.slider
class="absolute right-0 top-1/2 sm:translate-x-1/2 -translate-y-1/2"
v-if="showRight"
v-on:click="navigate(currentSlide + 1)"
:aria-label="__('Next')"
>
<x-heroicon-o-chevron-right :defer="false" class="size-6 shrink-0"/>
<x-heroicon-o-chevron-right class="size-6 shrink-0"/>
</x-rapidez::button.slider>
</div>
<div v-show="slidesTotal > 1" class="flex flex-row justify-center w-full mt-[35px]">
Expand Down
4 changes: 2 additions & 2 deletions resources/views/layouts/partials/header/minicart.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<div class="relative" v-if="hasCart" v-on-click-away="close" slot-scope="{ toggle, close, isOpen }">
<button class="flex my-1 focus:outline-none" v-on:click="toggle">
<x-heroicon-o-shopping-cart class="size-6"/>
<span class="bg-secondary text-secondary-text rounded-full size-6 text-center" dusk="minicart-count">
<span v-cloak>@{{ Math.round(cart.total_quantity) }}</span>
<span class="bg-secondary text-secondary-text rounded-full size-6 text-center" dusk="minicart-count" v-cloak>
<span>@{{ Math.round(cart.total_quantity) }}</span>
</span>
</button>
<div v-if="isOpen" class="absolute right-0 bg-white border shadow rounded-xl p-5 z-header-minicart" v-cloak>
Expand Down
12 changes: 6 additions & 6 deletions resources/views/product/partials/grouped.blade.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<div class="flex flex-wrap gap-3 justify-between">
@foreach ($product->grouped as $groupedProduct)
<add-to-cart :product="config.product.grouped[{{ $groupedProduct->entity_id }}]" v-slot="addToCart" class="contents">
<form v-on:submit.prevent="addToCart.add" class="contents">
<div>
<add-to-cart :product="config.product.grouped[{{ $groupedProduct->entity_id }}]" v-slot="addToCart" class="w-full">
<form v-on:submit.prevent="addToCart.add" class="flex w-full justify-between max-lg:flex-wrap max-lg:gap-y-2">
<div class="lg:max-xl:max-w-36">
{{ $groupedProduct->name }}
<div class="flex items-center space-x-3 font-bold">
<div class="flex items-center space-x-3 font-bold mr-auto">
<div>{{ price($groupedProduct->special_price ?: $groupedProduct->price) }}</div>
@if ($groupedProduct->special_price)
<div class="line-through">{{ price($groupedProduct->price) }}</div>
@endif
</div>
</div>

<div class="flex flex-wrap gap-2">
<div class="flex flex-wrap gap-2 lg:ml-auto">
@if (!$groupedProduct->in_stock)
<p class="col-span-2 self-center text-red-600">
@lang('Sorry! This product is currently out of stock.')
Expand All @@ -25,7 +25,7 @@
::max="{{ $groupedProduct->max_sale_qty ?: 'null' }}"
/>

<x-rapidez::button.cart />
<x-rapidez::button.cart class="self-start" />
@endif
</div>
</form>
Expand Down

0 comments on commit 43430ff

Please sign in to comment.