Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ludoguenet committed Mar 10, 2024
1 parent 2e79887 commit cd4c87f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 26 deletions.
26 changes: 13 additions & 13 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions resources/views/components/nudge-search.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
<div class="flex-1 px-4 flex items-center justify-center">
<div x-data="dropdownSearch({{ Js::from($nudges) }})" x-init="$watch('query', () => selectedNudgeIndex=null)" class="relative w-full">
<input x-model="query" x-ref="queryInput" x-on:click.outside="reset()" x-on:keyup.escape="reset()" x-on:keyup.down="selectNextNudge" x-on:keyup.up="selectPreviousNudge" x-on:keyup.enter="goToUrl()" id="combobox" type="text" class="w-full rounded-md border-0 bg-white py-1.5 pl-3 pr-12 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-inset focus:ring-green-400 sm:text-sm sm:leading-6" role="combobox" aria-controls="options" aria-expanded="false">
<button type="button" class="absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none">
<a href="{{ route('rss.feed') }}" class="absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none pointer-cursor">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-5 text-gray-400">
<path stroke-linecap="round" stroke-linejoin="round" d="M7.5 3.75H6A2.25 2.25 0 0 0 3.75 6v1.5M16.5 3.75H18A2.25 2.25 0 0 1 20.25 6v1.5m0 9V18A2.25 2.25 0 0 1 18 20.25h-1.5m-9 0H6A2.25 2.25 0 0 1 3.75 18v-1.5M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
<path stroke-linecap="round" stroke-linejoin="round" d="M12.75 19.5v-.75a7.5 7.5 0 0 0-7.5-7.5H4.5m0-6.75h.75c7.87 0 14.25 6.38 14.25 14.25v.75M6 18.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z" />
</svg>
</button>

</a>

<ul x-show="filteredNudges.length > 0" x-transition x-cloak x-ref="nudges" class="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm" id="options" role="listbox">
<!--
Expand Down
12 changes: 5 additions & 7 deletions resources/views/layouts/navigation.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,28 +80,26 @@
</x-dropdown>
@else
<a href="{{ route('nudges.create') }}">
<x-primary-button>Share a nudge!</x-primary-button>
<x-primary-button>New Nudge</x-primary-button>
</a>
@endauth
</div>

<!-- Hamburger -->
@auth
<div class="-me-2 flex items-center sm:hidden">
@auth
<button @click="open = ! open" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 focus:text-gray-500 transition duration-150 ease-in-out">
<svg class="h-6 w-6" stroke="currentColor" fill="none" viewBox="0 0 24 24">
<path :class="{'hidden': open, 'inline-flex': ! open }" class="inline-flex" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
<path :class="{'hidden': ! open, 'inline-flex': open }" class="hidden" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
</div>
@else
<div class="-me-2 flex items-center sm:hidden">
@else
<a href="{{ route('nudges.create') }}">
<x-primary-button>Share a nudge!</x-primary-button>
<x-primary-button>New nudge</x-primary-button>
</a>
@endauth
</div>
@endauth
</div>
</div>

Expand Down
6 changes: 3 additions & 3 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
Route::get('/', HomePageController::class)->name('homepage');
Route::get('feed', RSSFeedController::class)->name('rss.feed');

Route::view('/privacy', 'privacy')->name('privacy');
Route::view('/about', 'about')->name('about');

Route::middleware(['auth', 'verified'])->group(function () {
Route::get('/dashboard', DashBoardController::class)->name('dashboard');

Route::view('/privacy', 'privacy')->name('privacy');
Route::view('/about', 'about')->name('about');

Route::prefix('nudges')
->as('nudges.')
->group(function () {
Expand Down

0 comments on commit cd4c87f

Please sign in to comment.