@@ -19,19 +19,22 @@ interface Props {
1919const { focus } = Astro .props ;
2020---
2121
22- <header class =" fixed top-0 z-20 w-full bg-gray-50" >
22+ <header class =" sticky top-0 z-20 w-full bg-gray-50" >
2323 <!-- <ClientRouter transition:animate={fade({ duration: 30 })} /> -->
2424 {
2525 banner .shown && (
2626 <div
2727 id = " banner"
2828 class :list = { [
29- " flex h-10 items-center justify-center gap-4 px-1 md:h-8 " ,
29+ " flex items-center justify-center gap-4 px-1 py-2 " ,
3030 banner .kind === " error" ? " bg-red-300" : " bg-green-300" ,
3131 ]}
3232 >
3333 <span class = " hidden md:inline" >{ banner .long } </span >
34- <span aria-hidden class = " inline md:hidden" >
34+ <span
35+ aria-hidden
36+ class = " sm:text-md inline text-center text-sm md:hidden"
37+ >
3538 { banner .short }
3639 </span >
3740 <a
@@ -49,10 +52,10 @@ const { focus } = Astro.props;
4952 }
5053 <div class =" flex h-16" >
5154 <a href =" /" class =" flex items-center px-4" data-astro-prefetch =" viewport" >
52- <Logo class =" ml-8 w-36" variant =" default" />
55+ <Logo class =" w-36 sm:ml-8 " variant =" default" />
5356 </a >
54- <div aria-hidden = " true " class =" flex-grow " ></div >
55- <ul class =" hidden md :flex" >
57+ <div aria-hidden class =" flex-1 " ></div >
58+ <ul class =" hidden lg :flex" >
5659 {
5760 links .map ((link ) => (
5861 <li >
@@ -71,7 +74,7 @@ const { focus } = Astro.props;
7174 </ul >
7275 <button
7376 type =" button"
74- class =" flex h-full w-16 items-center justify-center hover:bg-gray-100 md :hidden"
77+ class =" flex h-full w-16 items-center justify-center hover:bg-gray-100 lg :hidden"
7578 popovertarget =" navigation-panel"
7679 popovertargetaction =" toggle"
7780 >
@@ -81,9 +84,9 @@ const { focus } = Astro.props;
8184 <div
8285 id =" navigation-panel"
8386 popover
84- class =" top-0 w-full transition-opacity duration-300 md :hidden"
87+ class =" absolute inset-auto top-0 w-full transition-opacity duration-300 lg :hidden"
8588 >
86- <ul class = " " >
89+ <ul >
8790 {
8891 links .map ((link ) => (
8992 <li class = " hover:brightness-75" >
@@ -107,6 +110,7 @@ const { focus } = Astro.props;
107110 position: fixed;
108111 }
109112 /* https://stackoverflow.com/questions/77042256/css-transition-animation-not-working-for-popover-attribute */
113+ /* https://developer.mozilla.org/en-US/docs/Web/API/Popover_API/Using#animating_popovers */
110114 [popover] {
111115 opacity: 0;
112116 &:popover-open {
@@ -115,9 +119,7 @@ const { focus } = Astro.props;
115119 opacity: 0;
116120 }
117121 }
118- transition:
119- opacity 0.3s,
120- display 0.3s;
122+ transition: opacity 0.3s;
121123 transition-behavior: allow-discrete;
122124 }
123125
0 commit comments