File tree Expand file tree Collapse file tree 3 files changed +39
-3
lines changed
starter/07-Omnifood-Desktop Expand file tree Collapse file tree 3 files changed +39
-3
lines changed Original file line number Diff line number Diff line change @@ -123,10 +123,11 @@ Insted, 1rem = 1em = 16px */
123
123
/* MOBILE NAVIGATION */
124
124
.btn-mobile-nav {
125
125
display : block;
126
+ z-index : 100 ;
126
127
}
127
128
128
129
.main-nav {
129
- background-color : rgba (255 , 255 , 255 , 0.95 );
130
+ background-color : rgba (255 , 255 , 255 , 0.9 );
130
131
position : absolute;
131
132
top : 0 ;
132
133
left : 0 ;
@@ -148,7 +149,7 @@ Insted, 1rem = 1em = 16px */
148
149
}
149
150
150
151
.nav-open .main-nav {
151
- z-index : 100 ;
152
+ z-index : 20 ;
152
153
opacity : 1 ;
153
154
pointer-events : auto;
154
155
visibility : visible;
Original file line number Diff line number Diff line change 7
7
< link rel ="stylesheet " href ="css/general.css " />
8
8
< link rel ="stylesheet " href ="css/style.css " />
9
9
< link rel ="stylesheet " href ="css/queries.css " />
10
+
11
+ < script src ="js/script.js " defer > </ script >
12
+
10
13
< title > Omnifood</ title >
11
14
</ head >
12
15
< body >
@@ -510,7 +513,9 @@ <h2 class="heading-secondary">Get your first meal for free!</h2>
510
513
</ li >
511
514
</ ul >
512
515
513
- < p class ="copyright "> Copyright © 2021 by Omnifood, Inc. All rights reserved</ p >
516
+ < p class ="copyright ">
517
+ Copyright © < span id ="year "> 2027</ span > by Omnifood, Inc. All rights reserved
518
+ </ p >
514
519
</ div >
515
520
516
521
<!-- Adress -->
Original file line number Diff line number Diff line change
1
+ ///////////////////////////////////////////////////////////
2
+ // Fixing flexbox gap property missing in some Safari versions
3
+ function checkFlexGap ( ) {
4
+ var flex = document . createElement ( 'div' ) ;
5
+ flex . style . display = 'flex' ;
6
+ flex . style . flexDirection = 'column' ;
7
+ flex . style . rowGap = '1px' ;
8
+
9
+ flex . appendChild ( document . createElement ( 'div' ) ) ;
10
+ flex . appendChild ( document . createElement ( 'div' ) ) ;
11
+
12
+ document . body . appendChild ( flex ) ;
13
+ var isSupported = flex . scrollHeight === 1 ;
14
+ flex . parentNode . removeChild ( flex ) ;
15
+ console . log ( isSupported ) ;
16
+
17
+ if ( ! isSupported ) document . body . classList . add ( 'no-flexbox-gap' ) ;
18
+ }
19
+ checkFlexGap ( ) ;
20
+
21
+ // https://unpkg.com/smoothscroll-polyfill@0.4.4/dist/smoothscroll.min.js
22
+
23
+ // get and set current year in footer copy right
24
+ document . getElementById ( 'year' ) . textContent = new Date ( ) . getFullYear ( ) ;
25
+
26
+ // Make mobile navigation work
27
+ const btnNav = document . querySelector ( '.btn-mobile-nav' ) ;
28
+ btnNav . addEventListener ( 'click' , ( ) => {
29
+ document . querySelector ( '.header' ) . classList . toggle ( 'nav-open' ) ;
30
+ } ) ;
You can’t perform that action at this time.
0 commit comments