File tree Expand file tree Collapse file tree 3 files changed +40
-0
lines changed
Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 8585 margin-right : 10px ;
8686 }
8787 }
88+
89+ @media all and (display-mode : standalone) {
90+ & __logo {
91+ padding-left : 72px ;
92+ padding-right : 10px ;
93+ }
94+ }
8895}
Original file line number Diff line number Diff line change 7878 }
7979 }
8080
81+ & __backbtn {
82+ display : none ;
83+ }
84+
8185 @media (max-width : $tabletWidth ) {
8286 background-color : $mainBackgroundColor ;
8387 text-align : center ;
230234 position : absolute ;
231235 }
232236}
237+
238+ @media all and (display-mode : standalone) {
239+ .toggle-btn {
240+ left : 36px ;
241+ }
242+
243+ .navigation__backbtn {
244+ display : inline-block ;
245+ position : absolute ;
246+ top : 14px ;
247+ left : 0 ;
248+ }
249+
250+ .navigation__backicon {
251+ height : 32px ;
252+ width : 32px ;
253+ fill : $mainColor ;
254+ }
255+ }
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import './Navigation.scss';
1010import { NavMenu } from './NavMenu' ;
1111import { ReactComponent as MenuIcon } from './images/icons/ic_menu.svg' ;
1212import { ReactComponent as CloseIcon } from './images/icons/ic_close.svg' ;
13+ import { ReactComponent as ArrowIcon } from './images/icons/arrow_left.svg' ;
1314
1415export const Navigation : React . FC = ( ) => {
1516 const { t } = useTranslation ( ) ;
@@ -51,6 +52,10 @@ export const Navigation: React.FC = () => {
5152 setIsOpen ( false ) ;
5253 } ) ;
5354
55+ const handleGoBack = ( ) => {
56+ window . history . back ( ) ;
57+ } ;
58+
5459 function renderTopCategories ( categories : Category [ ] ) : React . ReactElement {
5560 const topCategories = [
5661 { name : 'home' , displayName : t ( 'home' ) , url : '/' } ,
@@ -96,6 +101,11 @@ export const Navigation: React.FC = () => {
96101
97102 return (
98103 < >
104+ { window . matchMedia ( '(display-mode: standalone)' ) . matches && (
105+ < button className = "navigation__backbtn" aria-label = "back button" type = "button" onClick = { handleGoBack } >
106+ < ArrowIcon className = "navigation__backicon" />
107+ </ button >
108+ ) }
99109 < button
100110 className = "toggle-btn"
101111 type = "button"
You can’t perform that action at this time.
0 commit comments