-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add account * Fix code styling --------- Co-authored-by: mckenziearts <[email protected]>
- Loading branch information
1 parent
822d023
commit 68931ac
Showing
14 changed files
with
95 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\View\Components\Layout; | ||
|
||
use Illuminate\Contracts\View\View; | ||
use Illuminate\View\Component; | ||
|
||
final class Account extends Component | ||
{ | ||
public function render(): View | ||
{ | ||
return view('layouts.account'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@props(['active']) | ||
|
||
@php | ||
$classes = ($active ?? false) | ||
? 'block text-sm px-3 py-2.5 text-secondary-900 rounded-md bg-secondary-100/50 hover:bg-secondary-50 transition duration-150 ease-in-out' | ||
: 'block text-sm px-3 py-2.5 text-secondary-600 rounded-md hover:bg-secondary-50 hover:text-secondary-900 transition duration-150 ease-in-out'; | ||
@endphp | ||
|
||
<a {{ $attributes->twMerge(['class' => $classes]) }}> | ||
{{ $slot }} | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
@props(['section' => __('Account')]) | ||
|
||
<x-layout.shop> | ||
<x-container class="py-12"> | ||
<h2 class="font-heading text-2xl ml-4 leading-6 font-bold text-secondary-900 lg:text-4xl"> | ||
{{ $section }} | ||
</h2> | ||
<div class="mt-10 grid grid-cols-1 lg:grid-cols-4 lg:gap-x-12"> | ||
<div class="lg:col-span-1"> | ||
<nav role="navigation" class="space-y-1 lg:pr-12"> | ||
<x-account-link :href="route('account')" :active="request()->routeIs('account')"> | ||
{{ __('Overview') }} | ||
</x-account-link> | ||
<x-account-link href="#"> | ||
{{ __('Profile') }} | ||
</x-account-link> | ||
<x-account-link href="#"> | ||
{{ __('Addresses') }} | ||
</x-account-link> | ||
<x-account-link href="#"> | ||
{{ __('Orders') }} | ||
</x-account-link> | ||
</nav> | ||
<form class="ml-3 mt-6" method="POST" action="{{ route('logout') }}"> | ||
@csrf | ||
|
||
<button type="submit" class="underline text-sm text-secondary-600 hover:text-secondary-900 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500"> | ||
{{ __('Logout') }} | ||
</button> | ||
</form> | ||
</div> | ||
<div class="lg:col-span-3"> | ||
{{ $slot }} | ||
</div> | ||
</div> | ||
</x-container> | ||
</x-layout.shop> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<x-layout.account> | ||
<p class="text-base leading-6 text-secondary-600"> | ||
Hello, <span class="font-bold text-secondary-900">{{ Auth::user()->last_name }}</span> | ||
<span class="text-sm"> | ||
(signed in as: <span class="font-medium text-secondary-900">{{ Auth::user()->email }}</span>) | ||
</span> | ||
</p> | ||
<p class="mt-6 text-sm text-secondary-600 leading-6"> | ||
From your account dashboard you can view your <a href="#" class="font-medium text-secondary-900 underline">recent orders</a>, | ||
manage your <a href="#" class="font-medium text-secondary-900 underline">shipping and billing addresses</a>, and | ||
<a href="#" class="font-medium text-secondary-900 underline">edit your password and account details</a>. | ||
</p> | ||
</x-layout.account> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters