File tree Expand file tree Collapse file tree 3 files changed +95
-1
lines changed Expand file tree Collapse file tree 3 files changed +95
-1
lines changed Original file line number Diff line number Diff line change 4848 </ li >
4949 </ ul >
5050 </ div >
51+
5152 < div class ="desktop-menu inactive ">
5253 < ul >
5354 < li >
6364 </ li >
6465 </ ul >
6566 </ div >
67+
68+ < div class ="mobile-menu inactive ">
69+ < ul >
70+ < li >
71+ < a href ="/ "> CATEGORIES</ a >
72+ </ li >
73+ < li >
74+ < a href ="/ "> All</ a >
75+ </ li >
76+ < li >
77+ < a href ="/ "> Clothes</ a >
78+ </ li >
79+ < li >
80+ < a href ="/ "> Electronics</ a >
81+ </ li >
82+ < li >
83+ < a href ="/ "> Furnitures</ a >
84+ </ li >
85+ < li >
86+ < a href ="/ "> Toys</ a >
87+ </ li >
88+ < li >
89+ < a href ="/ "> Other</ a >
90+ </ li >
91+ </ ul >
92+
93+ < ul >
94+ < li >
95+ < a href ="/ "> My orders</ a >
96+ </ li >
97+ < li >
98+ < a href ="/ "> My account</ a >
99+ </ li >
100+ </ ul >
101+
102+ < ul >
103+ < li >
104+ < a href ="
/ "
class ="
email "
> [email protected] </ a > 105+ </ li >
106+ < li >
107+ < a href ="/ " class ="sign-out "> Sign out</ a >
108+ </ li >
109+ </ ul >
110+ </ div >
66111 </ nav >
67112 < script src ="./main.js "> </ script >
68113</ body >
Original file line number Diff line number Diff line change 11const menuEmail = document . querySelector ( '.navbar-email' ) ;
22const desktopMenu = document . querySelector ( '.desktop-menu' ) ;
3+ const hamburgerMenu = document . querySelector ( '.menu' ) ;
4+ const mobileMenu = document . querySelector ( '.mobile-menu' ) ;
35
46menuEmail . addEventListener ( 'click' , toggleDesktopMenu ) ;
7+ hamburgerMenu . addEventListener ( 'click' , toggleMobileMenu ) ;
58
69function toggleDesktopMenu ( ) {
710 desktopMenu . classList . toggle ( 'inactive' ) ;
811}
12+ function toggleMobileMenu ( ) {
13+ mobileMenu . classList . toggle ( 'inactive' ) ;
14+ }
Original file line number Diff line number Diff line change 1+ /*General*/
12: root {
23 --white : # FFFFFF ;
34 --black : # 000000 ;
1516 .inactive {
1617 display : none;
1718 }
19+
20+ /*Navbar (general)*/
1821 nav {
1922 display : flex;
2023 justify-content : space-between;
7982 align-items : center;
8083 }
8184
82-
85+ /*Menu Desktop*/
8386 .desktop-menu {
8487 position : absolute;
8588 background-color : var (--white );
118121 display : inline-block;
119122 }
120123
124+ /*Menu en mobile*/
125+
126+ .mobile-menu {
127+ position : absolute;
128+ top : 60px ;
129+ padding : 24px ;
130+ }
131+ .mobile-menu a {
132+ text-decoration : none;
133+ color : var (--black );
134+ font-weight : bold;
135+ /* margin-bottom: 24px; */
136+ }
137+ .mobile-menu ul {
138+ padding : 0 ;
139+ margin : 24px 0 0 ;
140+ list-style : none;
141+ }
142+ .mobile-menu ul : nth-child (1 ) {
143+ border-bottom : 1px solid var (--very-light-pink );
144+ }
145+ .mobile-menu ul li {
146+ margin-bottom : 24px ;
147+ }
148+ .email {
149+ font-size : var (--sm );
150+ font-weight : 300 !important ;
151+ }
152+ .sign-out {
153+ font-size : var (--sm );
154+ color : var (--hospital-green ) !important ;
155+ }
121156 @media (max-width : 640px ) {
122157 .menu {
123158 display : block;
128163 .navbar-email {
129164 display : none;
130165 }
166+ .desktop-menu {
167+ display : none;
168+ }
169+ }
170+ @media (min-width : 641px ) {
171+ .mobile-menu {
172+ display : none;
173+ }
131174 }
You can’t perform that action at this time.
0 commit comments