Skip to content

Commit 123ab0a

Browse files
committed
style: update header and footer navigation
1 parent d705606 commit 123ab0a

File tree

4 files changed

+32
-111
lines changed

4 files changed

+32
-111
lines changed

resources/views/auth/#.blade.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<x-app-layout :title="__('pages/auth.login.page_title')">
2-
<div class="flex min-h-full items-center justify-center py-16 sm:py-24">
2+
<x-container class="flex min-h-full items-center justify-center py-16 sm:pt-24">
33
<div class="w-full max-w-md space-y-8">
44
<div>
55
<h2 class="text-center font-heading text-3xl font-extrabold text-gray-900 dark:text-white">
@@ -62,7 +62,7 @@ class="font-medium text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hov
6262

6363
@include('partials._socials-link')
6464
</div>
65-
</div>
65+
</x-container>
6666

6767
<x-join-sponsors :title="__('global.sponsor_thanks')" />
6868
</x-app-layout>

resources/views/components/dropdown-profile.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div @keydown.escape.stop="open = false;" @click.outside="open = false;" class="relative ml-4 shrink-0">
1+
<div @keydown.escape.stop="open = false;" @click.outside="open = false;" class="relative">
22
<div>
33
<button
44
type="button"

resources/views/components/layouts/header.blade.php

+28-107
Original file line numberDiff line numberDiff line change
@@ -39,72 +39,6 @@ class="flex items-center gap-4"
3939
</x-slot:title>
4040
</x-nav.item>
4141

42-
<!-- Actions dropdown -->
43-
<div
44-
x-data="{ open: false }"
45-
@keydown.escape.stop="open = false;"
46-
@click.outside="open = false;"
47-
class="relative ml-4 shrink-0"
48-
>
49-
<div>
50-
<button
51-
type="button"
52-
class="shrink-0 rounded-full p-1 text-gray-400 hover:bg-gray-50 hover:text-gray-700 dark:text-gray-400 dark:hover:text-white dark:hover:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-gray-900"
53-
x-ref="button"
54-
@click="open =! open"
55-
>
56-
<x-untitledui-plus class="size-5" aria-hidden="true" />
57-
</button>
58-
</div>
59-
60-
<div
61-
x-show="open"
62-
x-transition:enter="transition duration-100 ease-out"
63-
x-transition:enter-start="scale-95 transform opacity-0"
64-
x-transition:enter-end="scale-100 transform opacity-100"
65-
x-transition:leave="transition duration-75 ease-in"
66-
x-transition:leave-start="scale-100 transform opacity-100"
67-
x-transition:leave-end="scale-95 transform opacity-0"
68-
class="absolute right-0 mt-2 w-56 origin-top divide-y divide-skin-light rounded-md bg-skin-menu py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none"
69-
x-ref="menu"
70-
role="menu"
71-
aria-orientation="vertical"
72-
aria-labelledby="menu-button"
73-
tabindex="-1"
74-
@keydown.tab="open = false"
75-
@keydown.enter.prevent="open = false;"
76-
@keyup.space.prevent="open = false;"
77-
style="display: none"
78-
>
79-
<div class="py-1" role="none">
80-
<a
81-
href="{{ route('articles.new') }}"
82-
class="flex items-center px-3 py-1.5 text-sm font-normal text-gray-500 dark:text-gray-400 hover:bg-skin-primary hover:text-white"
83-
role="menuitem"
84-
tabindex="-1"
85-
>
86-
Nouvel article
87-
</a>
88-
<a
89-
href="{{ route('forum.new') }}"
90-
class="flex items-center px-3 py-1.5 text-sm font-normal text-gray-500 dark:text-gray-400 hover:bg-skin-primary hover:text-white"
91-
role="menuitem"
92-
tabindex="-1"
93-
>
94-
Nouveau sujet
95-
</a>
96-
<a
97-
href="{{ route('discussions.new') }}"
98-
class="flex items-center px-3 py-1.5 text-sm font-normal text-gray-500 dark:text-gray-400 hover:bg-skin-primary hover:text-white"
99-
role="menuitem"
100-
tabindex="-1"
101-
>
102-
Nouvelle discussion
103-
</a>
104-
</div>
105-
</div>
106-
</div>
107-
10842
<!-- Profile dropdown -->
10943
<x-dropdown-profile />
11044
@endguest
@@ -161,56 +95,43 @@ class="relative inline-flex items-center justify-center rounded-lg bg-white p-2
16195
</div>
16296
<div class="p-4">
16397
@auth
164-
<div class="flex items-center px-4">
98+
<div class="flex items-center gap-2">
16599
<div class="shrink-0">
166-
<img
167-
class="size-10 rounded-full"
168-
src="{{ Auth::user()->profile_photo_url }}"
169-
alt="{{ Auth::user()->name }}"
100+
<x-user.avatar
101+
:user="\Illuminate\Support\Facades\Auth::user()"
102+
class="size-8"
170103
/>
171104
</div>
172-
<div class="ml-3">
173-
<div class="font-medium text-gray-900 dark:text-white">
174-
{{ Auth::user()->name }}
105+
<div class="leading-4">
106+
<div class="text-sm font-medium text-gray-900 dark:text-white">
107+
{{ \Illuminate\Support\Facades\Auth::user()->name }}
175108
</div>
176109
<div class="text-sm text-gray-400 dark:text-gray-500">
177-
{{ Auth::user()->email }}
110+
{{ \Illuminate\Support\Facades\Auth::user()->email }}
178111
</div>
179112
</div>
180-
<button
181-
class="ml-auto shrink-0 rounded-full bg-skin-card p-1 text-skin-muted hover:text-gray-500 dark:text-gray-400 focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2"
182-
>
183-
<span class="sr-only">{{ __('global.view_notifications') }}</span>
184-
<x-untitledui-bell class="size-6" aria-hidden="true" />
185-
</button>
186113
</div>
187-
<div class="mt-3 space-y-1">
114+
<div class="mt-6 flex flex-col space-y-4">
188115
<x-nav.item
189116
:href="route('profile')"
190-
class="block px-4 py-2 font-medium text-gray-500 hover:text-gray-700"
191-
>
192-
Mon profil
193-
</x-nav.item>
194-
<a
195-
href="{{ route('user.settings') }}"
196-
class="block px-4 py-2 font-medium text-gray-500 hover:text-gray-700"
197-
>
198-
Paramètres
199-
</a>
200-
<div class="px-4 py-2" role="form">
201-
<form method="POST" action="{{ route('logout') }}" role="form">
202-
@csrf
203-
<button
204-
type="submit"
205-
class="group flex w-full items-center font-medium text-gray-500 hover:text-gray-400 dark:text-gray-400 dark:hover:text-white"
206-
role="menuitem"
207-
tabindex="-1"
208-
id="logout-mobile"
209-
>
210-
{{ __('global.logout') }}
211-
</button>
212-
</form>
213-
</div>
117+
:title="__('Mon profil')"
118+
/>
119+
<x-nav.item
120+
:href="route('user.settings')"
121+
:title="__('Paramètres')"
122+
/>
123+
<form method="POST" action="{{ route('logout') }}">
124+
@csrf
125+
<button
126+
type="submit"
127+
class="group flex w-full items-center text-sm font-medium text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-white"
128+
role="menuitem"
129+
tabindex="-1"
130+
id="logout-mobile"
131+
>
132+
{{ __('global.logout') }}
133+
</button>
134+
</form>
214135
</div>
215136
@else
216137
<div class="flex flex-col space-y-4">
@@ -219,7 +140,7 @@ class="group flex w-full items-center font-medium text-gray-500 hover:text-gray-
219140
:title="__('pages/auth.login.page_title')"
220141
/>
221142
<x-nav.item
222-
href="{{ route('register') }}"
143+
:href="route('register')"
223144
:title="__('pages/auth.register.page_title')"
224145
/>
225146
</div>

resources/views/components/user/avatar.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/>
1414
<span @class(['absolute flex items-center justify-center rounded-full bg-white p-1 ring-yellow-500', $span])>
1515
<svg
16-
class="h-full w-full text-yellow-500"
16+
class="size-full text-yellow-500"
1717
xmlns="http://www.w3.org/2000/svg"
1818
viewBox="0 0 24 24"
1919
fill="currentColor"

0 commit comments

Comments
 (0)