File tree Expand file tree Collapse file tree 6 files changed +78
-46
lines changed Expand file tree Collapse file tree 6 files changed +78
-46
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import CircleFolder from '../images/circle-folder.svg';
2424import CircleInfo from '../images/circle-info.svg' ;
2525import Add from '../images/add.svg' ;
2626import Filter from '../images/filter.svg' ;
27+ import Cross from '../images/cross.svg' ;
2728
2829// HOC that adds the right web accessibility props
2930// https://www.scottohara.me/blog/2019/05/22/contextual-images-svgs-and-a11y.html
@@ -95,6 +96,7 @@ export const TerminalIcon = withLabel(Terminal);
9596export const CodeIcon = withLabel ( Code ) ;
9697export const SaveIcon = withLabel ( Save ) ;
9798export const FolderIcon = withLabel ( Folder ) ;
99+ export const CrossIcon = withLabel ( Cross ) ;
98100export const CircleTerminalIcon = withLabel ( CircleTerminal ) ;
99101export const CircleFolderIcon = withLabel ( CircleFolder ) ;
100102export const CircleInfoIcon = withLabel ( CircleInfo ) ;
Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ import {
1616 AccountIcon ,
1717 AddIcon ,
1818 EditorIcon ,
19- MoreIcon
19+ MoreIcon ,
20+ CrossIcon
2021} from '../../../../common/icons' ;
2122import {
2223 newFile ,
@@ -237,27 +238,39 @@ const MobileNav = () => {
237238 < h5 > by { project ?. owner ?. username } </ h5 >
238239 ) }
239240 </ Title >
240- < Options >
241- { pageName === 'myStuff' && < StuffMenu /> }
242- { user . authenticated ? (
243- < AccountMenu />
244- ) : (
245- < div >
246- < Link to = "/login" >
247- < IconButton icon = { AccountIcon } />
248- </ Link >
249- </ div >
250- ) }
251- { title === project . name ? (
252- < MoreMenu />
253- ) : (
241+ { /* check if the user is in login page */ }
242+ { pageName === 'login' || pageName === 'signup' ? (
243+ // showing the login page
244+ < Options >
254245 < div >
255246 < Link to = { editorLink } >
256- < IconButton icon = { EditorIcon } />
247+ < IconButton icon = { CrossIcon } />
257248 </ Link >
258249 </ div >
259- ) }
260- </ Options >
250+ </ Options >
251+ ) : (
252+ < Options >
253+ { pageName === 'myStuff' && < StuffMenu /> }
254+ { user . authenticated ? (
255+ < AccountMenu />
256+ ) : (
257+ < div >
258+ < Link to = "/login" >
259+ < IconButton icon = { AccountIcon } />
260+ </ Link >
261+ </ div >
262+ ) }
263+ { title === project . name ? (
264+ < MoreMenu />
265+ ) : (
266+ < div >
267+ < Link to = { editorLink } >
268+ < IconButton icon = { EditorIcon } />
269+ </ Link >
270+ </ div >
271+ ) }
272+ </ Options >
273+ ) }
261274 </ Nav >
262275 ) ;
263276} ;
Original file line number Diff line number Diff line change @@ -48,15 +48,15 @@ exports[`Nav renders dashboard version for mobile 1`] = `
4848<DocumentFragment >
4949 <header >
5050 <nav
51- class = " sc-giAqHp deBDHC "
51+ class = " sc-ezzafa bZzfr "
5252 >
5353 <div
54- class = " sc-ezzafa bKgrFx "
54+ class = " sc-bYwzuL bIGdtt "
5555 >
5656 <test-file-stub />
5757 </div >
5858 <div
59- class = " sc-bYwzuL lkVxhY "
59+ class = " sc-kLojOw btKDXx "
6060 >
6161 <h1 >
6262 <span
@@ -89,7 +89,7 @@ exports[`Nav renders dashboard version for mobile 1`] = `
8989 </h1 >
9090 </div >
9191 <div
92- class = " sc-kLojOw casOUg "
92+ class = " sc-iklJeh jupmlX "
9393 >
9494 <div >
9595 <a
@@ -459,15 +459,15 @@ exports[`Nav renders editor version for mobile 1`] = `
459459<DocumentFragment >
460460 <header >
461461 <nav
462- class = " sc-giAqHp deBDHC "
462+ class = " sc-ezzafa bZzfr "
463463 >
464464 <div
465- class = " sc-ezzafa bKgrFx "
465+ class = " sc-bYwzuL bIGdtt "
466466 >
467467 <test-file-stub />
468468 </div >
469469 <div
470- class = " sc-bYwzuL lkVxhY "
470+ class = " sc-kLojOw btKDXx "
471471 >
472472 <h1 >
473473 <span
@@ -500,7 +500,7 @@ exports[`Nav renders editor version for mobile 1`] = `
500500 </h1 >
501501 </div >
502502 <div
503- class = " sc-kLojOw casOUg "
503+ class = " sc-iklJeh jupmlX "
504504 >
505505 <div >
506506 <a
Original file line number Diff line number Diff line change 22 text-align : center ;
33 display : flex ;
44 flex-direction : column ;
5- align-items : center ;
5+ align-items : center ;
66 justify-content : center ;
77 flex : 1 ;
8+
9+ @media (max-width : 550px ) {
10+ text-align : left ;
11+ justify-content : start ;
12+ }
813}
914
1015.form-container--align-left {
11- text-align : left ;
16+ text-align : left ;
1217}
1318
1419.form-container--align-top {
15- height : unset ;
20+ height : unset ;
1621}
1722
1823.form-container__header {
1924 width : 100% ;
2025 padding : #{15 / $base-font-size } rem #{34 / $base-font-size } rem;
2126 display : flex ;
22- justify-content : space-between ;
27+ justify-content : space-between ;
2328}
2429
2530.form-container__content {
3136}
3237
3338.form-container--align-left .form-container__content {
34- align-items : left ;
39+ align-items : left ;
3540}
3641
3742.form-container__title {
3843 font-weight : normal ;
3944 @include themify () {
40- color : getThemifyVariable (' form-title-color' )
41- }
45+ color : getThemifyVariable (" form-title-color" );
46+ }
47+
48+ @media (max-width : 770px ) {
49+ display : none ;
50+ }
4251}
4352
4453.form-container__context {
45- @include themify () {
46- color : getThemifyVariable (' secondary-text-color' )
47- }
54+ @include themify () {
55+ color : getThemifyVariable (" secondary-text-color" );
56+ }
4857}
4958
5059.form-container__divider {
51- padding : #{20 / $base-font-size } rem 0 ;
60+ padding : #{20 / $base-font-size } rem 0 ;
5261}
5362
5463.form-container__logo-button {
55- @include icon ();
64+ @include icon ();
5665}
5766
5867.form-container__exit-button {
Original file line number Diff line number Diff line change 55 font-size : #{12 / $base-font-size } rem;
66 text-align : left ;
77 @include themify () {
8- color : getThemifyVariable (' error-color' );
8+ color : getThemifyVariable (" error-color" );
99 }
1010}
1111
2727 margin-top : #{16 / $base-font-size } rem;
2828 font-size : #{12 / $base-font-size } rem;
2929 @include themify () {
30- color : getThemifyVariable (' form-navigation-options-color' );
30+ color : getThemifyVariable (" form-navigation-options-color" );
31+ }
32+
33+ @media (max-width : 550px ) {
34+ text-align : center ;
35+ margin : #{12 / $base-font-size } rem;
3136 }
3237}
3338
34- .form__legend {
39+ .form__legend {
3540 font-size : #{21 / $base-font-size } rem;
3641 font-weight : bold ;
3742}
4247 margin-bottom : #{7 / $base-font-size } rem;
4348 display : block ;
4449 @include themify () {
45- color : getThemifyVariable (' form-secondary-title-color' );
50+ color : getThemifyVariable (" form-secondary-title-color" );
4651 }
4752}
4853
5661 height : #{40 / $base-font-size } rem;
5762 font-size : #{16 / $base-font-size } rem;
5863 @include themify () {
59- color : getThemifyVariable (' form-input-text-color' );
60- background-color : getThemifyVariable (' input-background-color' );
64+ color : getThemifyVariable (" form-input-text-color" );
65+ background-color : getThemifyVariable (" input-background-color" );
6166 }
6267}
6368
6772
6873.form__input ::placeholder {
6974 @include themify () {
70- color : getThemifyVariable (' form-input-placeholder-text-color' );
75+ color : getThemifyVariable (" form-input-placeholder-text-color" );
7176 }
7277}
7378
7883
7984.form__status {
8085 @include themify () {
81- color : getThemifyVariable (' form-navigation-options-color' );
86+ color : getThemifyVariable (" form-navigation-options-color" );
8287 }
8388}
8489
You can’t perform that action at this time.
0 commit comments