Skip to content

Commit

Permalink
Update container component so it can be used in navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
techenby committed May 1, 2024
1 parent 6520524 commit 0f45fc6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
6 changes: 2 additions & 4 deletions resources/views/components/container.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<div class="py-12">
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
{{ $slot }}
</div>
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
{{ $slot }}
</div>
2 changes: 1 addition & 1 deletion resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
@endif

<!-- Page Content -->
<main>
<main class="py-12">
{{ $slot }}
</main>
</div>
Expand Down
14 changes: 10 additions & 4 deletions resources/views/layouts/navigation.blade.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<nav x-data="{ open: false }" class="bg-white dark:bg-gray-800 border-b border-gray-100 dark:border-gray-700">
<!-- Primary Navigation Menu -->
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16">
<x-container>
<div class="flex justify-between h-24">
<div class="flex">
<!-- Logo -->
<div class="shrink-0 flex items-center">
<a href="{{ route('tricks.index') }}">
<x-application-logo class="block h-9 w-auto fill-current text-gray-800 dark:text-gray-200" />
<x-application-logo class="block h-16 w-auto fill-current text-gray-800 dark:text-gray-200" />
</a>
</div>

Expand All @@ -15,6 +15,12 @@
<x-nav-link :href="route('tricks.index')" :active="request()->routeIs('tricks.index')">
{{ __('Browse') }}
</x-nav-link>
<x-nav-link href="" :active="request()->routeIs('tags.index')">
{{ __('Tags') }}
</x-nav-link>
<x-nav-link :href="route('tricks.create')" :active="request()->routeIs('tricks.create')">
{{ __('Create New') }}
</x-nav-link>
</div>
</div>

Expand Down Expand Up @@ -74,7 +80,7 @@
</button>
</div>
</div>
</div>
</x-container>

<!-- Responsive Navigation Menu -->
<div :class="{'block': open, 'hidden': ! open}" class="hidden sm:hidden">
Expand Down

0 comments on commit 0f45fc6

Please sign in to comment.