Skip to content

Commit

Permalink
Checkout frontend tweaks and resolved checkout header issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jordythevulder committed Nov 4, 2024
1 parent 635a07c commit c743097
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion resources/views/cart/item.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<table class="w-full border-b">
<tbody class="divide-y">
<tr v-for="(item, index) in cart.items" class="flex-wrap max-md:flex [&>*]:p-2 md:[&>*]:p-4">
<tr v-for="(item, index) in cart.items" class="flex-wrap max-md:flex *:p-2 md:*:p-4">
<td class="w-24">
<a :href="item.product.url_key + item.product.url_suffix | url">
<img
Expand Down
2 changes: 1 addition & 1 deletion resources/views/cart/sidebar.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<dl class="mb-5 flex w-full flex-col rounded-lg border [&>*]:flex [&>*]:flex-wrap [&>*]:justify-between [&>*]:p-3 [&>*]:border-b [&>*:last-child]:border-none">
<dl class="mb-5 flex w-full flex-col rounded-lg border *:flex *:flex-wrap *:justify-between *:p-3 *:border-b [&>*:last-child]:border-none">
<div>
<dt>@lang('Subtotal')</dt>
<dd v-if="showTax">@{{ cart.prices.subtotal_including_tax.value | price }}</dd>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/checkout/partials/progressbar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
'pointer-events-none cursor-default' => $currentStepKey < $checkoutStepKey,
'bg-neutral text-white' => $checkoutStepKey <= $currentStepKey,
'bg-white' => $checkoutStepKey > $currentStepKey,
'bg-neutral text-white shadow-md shadow-neutral pointer-events-none cursor-default' => $checkoutStepKey === $currentStepKey
'bg-neutral text-white shadow-neutral pointer-events-none cursor-default' => $checkoutStepKey === $currentStepKey
])>
{{ $checkoutStepKey + 1 }}
</a>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/checkout/partials/sidebar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</div>
</div>

<dl class="flex w-full flex-col rounded border [&>*]:flex [&>*]:flex-wrap [&>*]:justify-between [&>*]:p-3 [&>*]:border-b [&>*:last-child]:border-none">
<dl class="flex w-full flex-col rounded border *:flex *:flex-wrap *:justify-between *:p-3 *:border-b [&>*:last-child]:border-none">
<div>
<dt>@lang('Subtotal')</dt>
<dd>@{{ cart.prices.subtotal_including_tax.value | price }}</dd>
Expand Down
10 changes: 5 additions & 5 deletions resources/views/components/notifications.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<div class="p-4">
<div class="flex items-start">
<div class="flex-shrink-0">
<x-heroicon-o-check-circle class="h-6 w-6" v-if="type == 'success'"/>
<x-heroicon-o-exclamation-circle class="h-6 w-6" v-if="type == 'error'"/>
<x-heroicon-o-information-circle class="h-6 w-6" v-if="type == 'info'"/>
<x-heroicon-o-exclamation-triangle class="h-6 w-6" v-if="type == 'warning'"/>
<x-heroicon-o-check-circle class="size-6" v-if="type == 'success'"/>
<x-heroicon-o-exclamation-circle class="size-6" v-if="type == 'error'"/>
<x-heroicon-o-information-circle class="size-6" v-if="type == 'info'"/>
<x-heroicon-o-exclamation-triangle class="size-6" v-if="type == 'warning'"/>
</div>
<div class="ml-3 w-0 flex-1 pt-0.5">
<p class="text-sm font-medium">
Expand All @@ -28,7 +28,7 @@
<div class="ml-4 flex-shrink-0 flex self-start">
<button @click.prevent="close()" class="rounded-md inline-flex focus:outline-none focus:ring-none focus:ring-offset-none">
<span class="sr-only">@lang('Close')</span>
<x-heroicon-s-x-mark class="h-5 w-5"/>
<x-heroicon-s-x-mark class="size-5"/>
</button>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/components/productlist.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,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 class="w-6 h-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 class="w-6 h-6 shrink-0"/>
<x-heroicon-o-chevron-right class="size-6 shrink-0"/>
</x-rapidez::button.slider>
<div v-show="slidesTotal > 1" class="flex flex-row justify-center w-full mt-[35px]">
<div
Expand Down
8 changes: 4 additions & 4 deletions resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
</head>
<body class="text-neutral antialiased">
<div id="app" class="flex flex-col min-h-dvh">
@includeWhen(!request()->is('checkout'), 'rapidez::layouts.partials.header')
@includeWhen(request()->is('checkout'), 'rapidez::layouts.checkout.header')
@includeWhen(!request()->routeIs('checkout'), 'rapidez::layouts.partials.header')
@includeWhen(request()->routeIs('checkout'), 'rapidez::layouts.checkout.header')
<main>
@yield('content')
</main>
@includeWhen(!request()->is('checkout'), 'rapidez::layouts.partials.footer')
@includeWhen(request()->is('checkout'), 'rapidez::layouts.checkout.footer')
@includeWhen(!request()->routeIs('checkout'), 'rapidez::layouts.partials.footer')
@includeWhen(request()->routeIs('checkout'), 'rapidez::layouts.checkout.footer')
@stack('page_end')
</div>

Expand Down
4 changes: 2 additions & 2 deletions resources/views/layouts/partials/header/account.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<toggler v-if="$root.loggedIn" v-cloak>
<div slot-scope="{ toggle, close, isOpen }" v-on-click-away="close">
<button dusk="account_menu" class="flex my-1" v-on:click="toggle">
<x-heroicon-o-user class="h-6 w-6"/>
<x-heroicon-o-user class="size-6"/>
@{{ $root.user.firstname }}
</button>
<div v-if="isOpen" class="absolute bg-white border shadow rounded mr-1 {{ config('rapidez.frontend.z-indexes.header-dropdowns') }} {{ Route::currentRouteName() == 'checkout' ? 'right-0' : '' }}">
Expand All @@ -29,7 +29,7 @@ class="block hover:bg-inactive px-3 py-2 cursor-pointer"
@if (App::providerIsLoaded('Rapidez\Account\AccountServiceProvider'))
<div class="my-1" v-else>
<a href="{{ route('account.login') }}" aria-label="@lang('Login')">
<x-heroicon-o-user class="h-6 w-6"/>
<x-heroicon-o-user class="size-6"/>
</a>
</div>
@endif
Expand Down
10 changes: 5 additions & 5 deletions resources/views/layouts/partials/header/minicart.blade.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<toggler>
<div class="relative" v-if="hasCart" v-on-click-away="close" slot-scope="{ toggle, close, isOpen }" v-cloak>
<button class="flex my-1 focus:outline-none" v-on:click="toggle">
<x-heroicon-o-shopping-cart class="h-6 w-6"/>
<span class="bg-neutral rounded-full w-6 h-6 text-white text-center" dusk="minicart-count">@{{ Math.round(cart.total_quantity) }}</span>
<x-heroicon-o-shopping-cart class="size-6"/>
<span class="bg-neutral rounded-full size-6 text-white text-center" dusk="minicart-count">@{{ Math.round(cart.total_quantity) }}</span>
</button>
<div v-if="isOpen" class="absolute right-0 bg-white border shadow rounded-xl p-5 {{ config('rapidez.frontend.z-indexes.header-dropdowns') }}">
<table class="w-full mb-3">
<tr v-for="item in cart.items" class="[&>*]:pb-3">
<tr v-for="item in cart.items" class="*:pb-3">
<td class="block w-48 truncate overflow-hidden">@{{ item.product.name }}</td>
<td class="text-right px-4">@{{ item.quantity }}</td>
<td class="text-right">@{{ item.prices.row_total.value | price }}</td>
</tr>
<tr class="font-bold [&>*]:pt-3 border-t">
<tr class="font-bold *:pt-3 border-t">
<td colspan="2">@lang('Total')</td>
<td class="text-right">@{{ cart.prices.grand_total.value | price }}</td>
</tr>
Expand All @@ -27,6 +27,6 @@
</div>
</div>
<a href="{{ route('cart') }}" aria-label="@lang('Cart')" class="my-1" v-else>
<x-heroicon-o-shopping-cart class="h-6 w-6"/>
<x-heroicon-o-shopping-cart class="size-6"/>
</a>
</toggler>

0 comments on commit c743097

Please sign in to comment.