1
1
<header
2
- style = " background-color : hsl ( 120 , 40 % , 80 % ) "
3
- class =" z-10 flex h-16 flex-col items-center md:h-32 lg:h-40 "
2
+ class = " bg-chamaleon z-10 flex h-16 flex-col items-center md:h-32 lg:h-40 "
3
+ : class =" navigationOpen ? 'fixed top-0 inset-x-0' : '' "
4
4
>
5
5
<div class =" max-w-content flex w-full overflow-hidden" >
6
+ <a
7
+ class =" hover:bg-overlay mr-2 flex h-full cursor-pointer items-center px-3 md:hidden print:hidden"
8
+ @click =" navigationOpen = !navigationOpen"
9
+ >
10
+ <s:partial src =" icons/menu" class =" h-8 fill-current" />
11
+ </a >
12
+
6
13
<a
7
14
href =" {{ sroute (" home" ) } }"
8
15
aria-label =" Home"
@@ -23,13 +30,19 @@ class="h-full fill-current text-black"
23
30
</div >
24
31
</a >
25
32
</div >
26
- <nav aria-label =" Site navigation" class =" bg-overlay w-full" >
27
- <div class =" max-w-content mx-auto flex h-full justify-between" >
28
- <div class =" flex" >
33
+ <nav
34
+ aria-label =" Site navigation"
35
+ class =" md:bg-overlay bg-chamaleon fixed top-16 bottom-0 w-full transition-transform duration-300 md:relative md:top-0"
36
+ :class =" navigationOpen ? 'translate-x-0' : '-translate-x-full md:translate-x-0'"
37
+ >
38
+ <div
39
+ class =" md:max-w-content max-h-full overflow-auto md:mx-auto md:flex md:h-full md:justify-between"
40
+ >
41
+ <div class =" md:flex" >
29
42
<s:nav handle =" main" >
30
43
<a
31
44
href =" {{ $url } }"
32
- class =" group hover:bg-overlay relative flex items-center p-2 font-bold text-black uppercase opacity-50 hover:opacity-100 focus:opacity-100 [& :is([aria-current])]:opacity-100"
45
+ class =" group hover:bg-overlay relative flex items-center px-4 py-3 font-bold text-black uppercase hover:opacity-100 focus:opacity-100 md:px-2 md:py-2 md:opacity-50 [& :is([aria-current])]:opacity-100"
33
46
@if ($is_current )
34
47
aria-current =" page"
35
48
@endif
@@ -43,21 +56,23 @@ class="border-b-2 border-transparent group-hover:border-black [[aria-current]>&]
43
56
</a >
44
57
</s:nav >
45
58
</div >
46
- <div class =" flex" >
59
+ <div class =" md: flex" >
47
60
@foreach ($socials as $account )
48
61
<a
49
62
href =" {{ $account -> link } }"
50
63
aria-label =" {{ $account -> name } }"
51
64
title =" {{ $account -> name } }"
52
65
target =" _blank"
53
- class =" hover:bg-overlay flex min-w-10 items-center justify-center px-2 opacity-50 hover:opacity-100 focus:opacity-100"
66
+ class =" hover:bg-overlay flex min-w-10 items-center justify-start px-4 py-3 hover:opacity-100 focus:opacity-100 md:justify-center md:px-2 md:py-0 md:opacity-50 "
54
67
{{ $account -> represent ? ' rel="me"' : " " } }
55
68
>
56
69
<s:partial
57
70
:src =" 'icons/' . $account->icon"
58
71
:class =" ($account->classes ?? '') . ' h-6'"
59
72
/>
60
- <span class =" sr-only" >{{ $account -> name } } </span >
73
+ <span class =" ml-2 md:sr-only" >
74
+ {{ $account -> name } }
75
+ </span >
61
76
</a >
62
77
@endforeach
63
78
</div >
0 commit comments