Skip to content

Commit be5eebb

Browse files
committed
wip
1 parent 6ff0e82 commit be5eebb

File tree

2 files changed

+21
-28
lines changed

2 files changed

+21
-28
lines changed
Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,46 @@
11
<nav class="mt-12 text-xl md:text-2xl" x-data="navigation">
2-
3-
<div class="flex justify-center md:justify-start">
2+
{{-- Logo & Language Switcher --}}
3+
<div class="flex justify-between items-center">
44
<a href="{{ localized_route('start.index') }}" title="Start page" class="group inline-block">
55
<x-logo-paperflakes/>
66
</a>
7+
8+
@if(!empty($locales))
9+
<div class="hidden lg:flex gap-2 text-lg items-center">
10+
@foreach($locales as $language)
11+
<form method="POST" action="{{ route('language.update') }}">
12+
@csrf
13+
<input type="hidden" name="language" value="{{ $language->value }}">
14+
<button type="submit" class="hover:text-black hover:font-semibold transition cursor-pointer"
15+
title="{{ __('Update to :lang language', ['lang' => $language->getLabel()]) }}">
16+
{{ $language->getLabel() }}
17+
</button>
18+
</form>
19+
@if (!$loop->last)
20+
<span class="text-gray-400 font-light">|</span>
21+
@endif
22+
@endforeach
23+
</div>
24+
@endif
725
</div>
826

27+
{{-- Navigation & mobile toggle --}}
928
<div class="mt-2 flex items-center justify-between">
10-
1129
@include('layouts._partials._navigation_desktop')
1230

1331
<button @click="toggle"
1432
class="flex items-center gap-1 lg:hidden hover:text-black hover:font-semibold transition focus:outline-none mx-auto">
1533
<span>{{ __('Menu') }}</span>
1634

1735
<div class="transition-transform duration-300 ease-in-out" x-bind:class="icon_rotate">
18-
1936
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-6">
2037
<path fill-rule="evenodd"
2138
d="M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z"
2239
clip-rule="evenodd"/>
2340
</svg>
2441
</div>
2542
</button>
26-
2743
</div>
2844

2945
@include('layouts._partials._navigation_mobile')
30-
3146
</nav>
Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
@php use App\Enums\LocaleEnum; @endphp
22

33
<div class="hidden lg:flex justify-between w-full">
4-
5-
{{-- Left-aligned primary navigation --}}
64
<div class="flex gap-2">
75

86
<x-a :href="localized_route('start.index')" label="{{ __('News') }}"
@@ -29,24 +27,4 @@ classAttributes="text-xl md:text-2xl"/>
2927
classAttributes="text-xl md:text-2xl"/>
3028

3129
</div>
32-
33-
<!-- Language -->
34-
@if(!empty($locales))
35-
<div class="flex gap-2 text-lg items-center">
36-
@foreach($locales as $language)
37-
<form method="POST" action="{{ route('language.update') }}">
38-
@csrf
39-
<input type="hidden" name="language" value="{{ $language->value }}">
40-
<button type="submit" class="hover:text-black hover:font-semibold transition cursor-pointer"
41-
title="{{ __('Update to :lang language', ['lang' => $language->getLabel()]) }}">
42-
{{ $language->getLabel() }}
43-
</button>
44-
</form>
45-
@if (!$loop->last)
46-
<span class="text-gray-400 font-light">|</span>
47-
@endif
48-
@endforeach
49-
</div>
50-
@endif
51-
5230
</div>

0 commit comments

Comments
 (0)