@@ -21,21 +21,53 @@ pub fn Header() -> Html {
2121
2222 let switch_locale = Callback :: from ( move |_| localization. set ( other_locale. clone ( ) ) ) ;
2323
24+ let header_css = css ! (
25+ r#"
26+ backdrop-filter: blur(12px) saturate(180%);
27+ -webkit-backdrop-filter: blur(12px) saturate(180%);
28+ background-color: rgba(15, 23, 42, 0.85);
29+ border-bottom: 1px solid rgba(203, 213, 225, 0.1);
30+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
31+ "#
32+ ) ;
33+
2434 html ! {
25- <div class="h-20 sticky top-0 z-50 w-full border-solid border-b-2 bg-background-primary border-background-secondary" >
26- <nav class="container mx-auto pt-5 pb-3 max-w-7xl px-4 xl:px-0 flex justify-between" >
27- <Link <Route > to={ Route :: Home } classes="group flex items-center space-x-2" >
28- <div class="text-rainbow-1 group-hover:brightness-125" >
29- <i class="fa-solid fa-trademark text-3xl" style="filter:drop-shadow(1px 1px 1px black)" ></i>
35+ <div class={ classes!( "h-20" , "sticky" , "top-0" , "z-50" , "w-full" , header_css) } >
36+ <nav class="container mx-auto pt-5 pb-3 max-w-7xl px-4 xl:px-0 flex justify-between items-center" >
37+ <Link <Route > to={ Route :: Home } classes={ css!( r#"
38+ display: flex;
39+ align-items: center;
40+ gap: 0.75rem;
41+ transition: all 0.2s ease;
42+ "# ) } >
43+ <div class={ css!( r#"
44+ transition: all 0.2s ease;
45+ &:hover {
46+ transform: scale(1.1);
47+ }
48+ "# ) } >
49+ <i class="fa-solid fa-trademark text-3xl text-rainbow-1" style="filter:drop-shadow(2px 2px 4px rgba(96, 165, 250, 0.3))" ></i>
3050 </div>
31- <span class="text-foreground-secondary text-lg font-bold " >{ "Home" } </span>
51+ <span class="text-foreground-primary text-lg font-semibold " >{ "Home" } </span>
3252 </Link <Route >>
33- <button onclick={ switch_locale} class="group flex items-center space-x-2" >
34- <span class="sr-only text-foreground-secondary text-lg font-bold" >{ "Switch language to " } </span>
35- <span class="text-foreground-secondary text-lg font-bold" >{ other_locale_str} </span>
36- <div class="text-rainbow-1 group-hover:brightness-125" >
37- <i class="fa-solid fa-language text-3xl" style="filter:drop-shadow(1px 1px 1px black)" ></i>
38- </div>
53+ <button onclick={ switch_locale} class={ css!( r#"
54+ display: flex;
55+ align-items: center;
56+ gap: 0.75rem;
57+ padding: 0.5rem 1rem;
58+ border-radius: 0.5rem;
59+ background-color: rgba(51, 65, 85, 0.5);
60+ transition: all 0.2s ease;
61+ border: 1px solid rgba(203, 213, 225, 0.1);
62+ &:hover {
63+ background-color: rgba(71, 85, 105, 0.6);
64+ transform: translateY(-2px);
65+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
66+ }
67+ "# ) } >
68+ <span class="sr-only" >{ "Switch language to " } </span>
69+ <span class="text-foreground-primary text-lg font-semibold" >{ other_locale_str} </span>
70+ <i class="fa-solid fa-language text-2xl text-rainbow-1" ></i>
3971 </button>
4072 </nav>
4173 </div>
0 commit comments