11--- 
22import  { Icon  } from  " astro-icon"  ;
33
4- const   desktop  =  [
4+ const   navItems  =  [
55  { 
66    name: " Snippets"  , 
77    href: " /snippets/"  , 
@@ -16,10 +16,10 @@ const desktop = [
1616
1717<header  class =" dark:bg-zinc-900 bg-white max-w-7xl m-auto transition-colors"  >
1818  <a  href =" /"   class =" text-lg sm:text-xl text-black dark:text-zinc-300 hover:dark:text-white transition-colors absolute m-8"  >Angular Snippets</a >
19-   <nav  class =" p-8 flex justify-end"  >
19+   <nav  class =" p-8 hidden sm: flex justify-end"  >
2020    <ul  class =" flex justify-end items-center m-0 space-x-1"  >
2121      { 
22-         desktop .map ((item ) =>  (
22+         navItems .map ((item ) =>  (
2323          <li >
2424            <a  href  = { item .href }  class = " hover:bg-zinc-300 dark:hover:bg-zinc-700 dark:text-zinc-300 text-black p-2 transition-colors rounded-lg"  >
2525              { item .name } 
@@ -36,5 +36,32 @@ const desktop = [
3636      <Icon  name =" akar-icons:sun"   class =" w-6 dark:text-white text-black transition-colors hidden dark:block"   />
3737    </button >
3838  </nav >
39-   
39+   <nav  class =" p-2 flex sm:hidden justify-end"  >
40+     <a  aria-label =" github"   class =" pointer mx-3 py-6"   href =" https://github.com/santoshyadavdev/angular-snipptes"   target =" _blank"  >
41+       <Icon  name =" simple-icons:github"   class =" w-6 dark:text-white text-black"   />
42+     </a >
43+     <button  aria-label =" theme toggle"   class =" pointer theme-toggle"  >
44+       <Icon  name =" eva:moon-outline"   class =" w-6 dark:text-white text-black transition-colors dark:hidden"   />
45+       <Icon  name =" akar-icons:sun"   class =" w-6 dark:text-white text-black transition-colors hidden dark:block"   />
46+     </button >
47+     <button  class =" flex sm:hidden justify-end nav-toggle ml-3 mr-6 py-6"   aria-label =" menu button"  >
48+       <Icon  name =" ri:menu-4-line"   class =" w-6 h-6"   />
49+     </button >
50+   </nav >
51+ 
52+ </header >
53+ 
54+ <header  class =" nav-menu hidden bg-white dark:bg-zinc-900"  >
55+   { 
56+     (
57+         <nav  class = " m-8 flex flex-col inline-flex space-y-1 "  >
58+           { navItems .map ((navbar ) =>  (
59+               <a  href = { navbar .href }  class = " hover:bg-zinc-300 dark:hover:bg-zinc-700 dark:text-zinc-300 text-black p-2 transition-colors rounded-lg"  >
60+                 { navbar .name } 
61+               </a >
62+           ))} 
63+         </nav >
64+     )
65+   } 
66+ 
4067</header >
0 commit comments