File tree 6 files changed +62
-30
lines changed
6 files changed +62
-30
lines changed Original file line number Diff line number Diff line change
1
+ "use client"
2
+
3
+ import SecondarySplitHeader , { HEIGHT_HEADER } from "@/features/sidebar/view/SecondarySplitHeader"
4
+ import { Box } from "@mui/material"
5
+
6
+ export default function Page ( { children } : { children : React . ReactNode } ) {
7
+ return (
8
+ < >
9
+ < SecondarySplitHeader />
10
+ < Box
11
+ display = "flex"
12
+ alignItems = "center"
13
+ justifyContent = "center"
14
+ padding = { { xs : 4 } }
15
+ height = { { md : `calc(100vh - ${ HEIGHT_HEADER + 1 } px)` } }
16
+ >
17
+ { children }
18
+ </ Box >
19
+ </ >
20
+ )
21
+ }
Original file line number Diff line number Diff line change 1
1
import { env , splitOwnerAndRepository } from "@/common"
2
- import { Box } from "@mui/material"
3
2
import NewProject from "@/features/new-project/NewProject" ;
4
3
5
4
const Page = ( ) => {
@@ -8,13 +7,11 @@ const Page = () => {
8
7
const ownerRepository = templateName ? splitOwnerAndRepository ( templateName ) ?. owner : undefined
9
8
10
9
return (
11
- < Box display = "flex" alignItems = "center" justifyContent = "center" height = "100vh" >
12
- < NewProject
13
- repositoryNameSuffix = { repositoryNameSuffix }
14
- templateName = { templateName }
15
- ownerRepository = { ownerRepository }
16
- />
17
- </ Box >
18
- ) }
10
+ < NewProject
11
+ repositoryNameSuffix = { repositoryNameSuffix }
12
+ templateName = { templateName }
13
+ ownerRepository = { ownerRepository }
14
+ />
15
+ ) }
19
16
20
17
export default Page
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ const HighlightText = ({
51
51
variant = { variant }
52
52
sx = { {
53
53
...sx ,
54
- display : { xs : "box" , sm : "box" , md : "flex" } ,
54
+ display : "inline" ,
55
55
gap : 1 ,
56
56
} }
57
57
>
Original file line number Diff line number Diff line change @@ -24,14 +24,22 @@ const NewProject = ({
24
24
const title = "Add a new project to "
25
25
26
26
return (
27
- < Box display = "flex" alignItems = "start" justifyContent = "center" flexDirection = "column" height = "100vh" gap = { 6 } >
28
- < HighlightText
29
- content = { `${ title } ${ SITE_NAME } ` }
30
- highlight = { SITE_NAME }
31
- color = { BASE_COLORS [ 0 ] }
32
- variant = "h4"
33
- isSolidOpacity
34
- />
27
+ < Box
28
+ display = "flex"
29
+ alignItems = { { xs : "start" , md : "center" } }
30
+ justifyContent = { { xs : "start" , md : "center" } }
31
+ flexDirection = "column"
32
+ height = { 1 }
33
+ width = { 1 }
34
+ gap = { 6 }
35
+ >
36
+ < HighlightText
37
+ content = { `${ title } ${ SITE_NAME } ` }
38
+ highlight = { SITE_NAME }
39
+ color = { BASE_COLORS [ 0 ] }
40
+ variant = "h4"
41
+ isSolidOpacity
42
+ />
35
43
< NewProjectSteps
36
44
repositoryNameSuffix = { repositoryNameSuffix }
37
45
templateName = { templateName }
@@ -42,7 +50,6 @@ return (
42
50
< MessageLinkFooter
43
51
url = { HELP_URL }
44
52
content = { `Read more about Adding Documentation to ${ SITE_NAME } ` }
45
- sx = { { position : "absolute" , bottom : 30 } }
46
53
/>
47
54
}
48
55
</ Box >
Original file line number Diff line number Diff line change @@ -57,41 +57,45 @@ const NewProjectSteps = ({
57
57
58
58
const getStepContent = ( step : StepType , index : number ) => (
59
59
< Box
60
- display = " flex"
60
+ display = { { xs : "inline" , md : " flex"} }
61
61
flexDirection = "row"
62
62
alignItems = "center"
63
63
gap = { 2 }
64
- sx = { { width : { xs : 1 , sm : 1 , md : 1 } } }
64
+ width = { 1 }
65
65
>
66
66
{ step . highlight ?
67
67
< HighlightText
68
68
content = { `${ index + 1 } . ${ step . content } ` }
69
69
highlight = { step . highlight }
70
70
color = { BASE_COLORS [ 2 ] }
71
71
height = "80%"
72
- sx = { { fontSize : 20 } }
72
+ sx = { { fontSize : 20 , marginRight : { xs : 1 } } }
73
73
isBoldText
74
74
/> :
75
75
< Typography sx = { {
76
- display : { xs : "none" , sm : "none" , md : "flex" } ,
77
- fontSize : 20
76
+ display : { md : "flex" } ,
77
+ fontSize : 20 ,
78
+ marginRight : { xs : 4 }
78
79
} } >
79
80
{ `${ index + 1 } . ` }
80
81
{ step . content }
81
82
</ Typography >
82
83
}
83
- { step . helpURL && < Link
84
- style = { {
85
- fontSize : 14 ,
86
- color : "gray"
84
+ { step . helpURL &&
85
+ < Typography
86
+ sx = { {
87
+ fontSize : { xs : 16 , sm : 14 } ,
88
+ color : "gray" ,
87
89
} }
90
+ component = { Link }
88
91
aria-label = "help"
89
92
href = { step . helpURL }
90
93
target = "_blank"
91
94
rel = "noopener noreferrer"
92
95
>
93
96
(?)
94
- </ Link > }
97
+ </ Typography >
98
+ }
95
99
</ Box >
96
100
)
97
101
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ import { SidebarContext, isMac as checkIsMac } from "@/common"
10
10
import { useSidebarOpen } from "@/features/sidebar/data"
11
11
import ToggleMobileToolbarButton from "./internal/secondary/ToggleMobileToolbarButton"
12
12
13
+ export const HEIGHT_HEADER = 80
14
+
13
15
const Header = ( {
14
16
mobileToolbar,
15
17
children
@@ -27,6 +29,7 @@ const Header = ({
27
29
} , [ isMac , setIsMac ] )
28
30
const openCloseKeyboardShortcut = `(${ isMac ? "⌘" : "^" } + .)`
29
31
const theme = useTheme ( )
32
+
30
33
return (
31
34
< Box
32
35
sx = { {
@@ -40,7 +43,7 @@ const Header = ({
40
43
padding : 2 ,
41
44
maxWidth : "1460px" ,
42
45
margin : "auto" ,
43
- height : 80
46
+ height : HEIGHT_HEADER
44
47
} } >
45
48
{ isSidebarToggleable && ! isSidebarOpen &&
46
49
< Tooltip title = { `Show Projects ${ openCloseKeyboardShortcut } ` } >
You can’t perform that action at this time.
0 commit comments