@@ -10,15 +10,28 @@ import React from "react";
10
10
import { Link } from "react-router-dom" ;
11
11
import { WorkflowsNavbar } from "workflows-lib" ;
12
12
13
+ const cardHeight = 160 ;
14
+
13
15
const workflowsCard = (
14
16
< React . Fragment >
15
17
< CardActionArea component = { Link } to = "/workflows" >
16
- < CardContent >
17
- < Typography gutterBottom variant = "h5" component = "div" >
18
- Workflows
18
+ < CardContent style = { { height : cardHeight } } >
19
+ < Typography
20
+ gutterBottom
21
+ variant = "h5"
22
+ component = "div"
23
+ sx = { { textAlign : "center" } }
24
+ >
25
+ Submitted Workflows
19
26
</ Typography >
20
- < Typography variant = "body2" sx = { { color : "text.secondary" } } >
21
- Provides an overview of current and past workflows for a given visit.
27
+ < Typography
28
+ variant = "body2"
29
+ sx = { {
30
+ color : "text.secondary" ,
31
+ textAlign : "center" ,
32
+ } }
33
+ >
34
+ View current and past workflows for a given visit.
22
35
</ Typography >
23
36
</ CardContent >
24
37
</ CardActionArea >
@@ -28,12 +41,23 @@ const workflowsCard = (
28
41
const templatesCard = (
29
42
< React . Fragment >
30
43
< CardActionArea component = { Link } to = "/templates" >
31
- < CardContent >
32
- < Typography gutterBottom variant = "h5" component = "div" >
33
- Templates
44
+ < CardContent style = { { height : cardHeight } } >
45
+ < Typography
46
+ gutterBottom
47
+ variant = "h5"
48
+ component = "div"
49
+ sx = { { textAlign : "center" } }
50
+ >
51
+ Run New Workflow
34
52
</ Typography >
35
- < Typography variant = "body2" sx = { { color : "text.secondary" } } >
36
- Provides an overview of all available workflowTemplates and Sensors.
53
+ < Typography
54
+ variant = "body2"
55
+ sx = { {
56
+ color : "text.secondary" ,
57
+ textAlign : "center" ,
58
+ } }
59
+ >
60
+ Submit a new workflow from a template.
37
61
</ Typography >
38
62
</ CardContent >
39
63
</ CardActionArea >
@@ -46,12 +70,23 @@ const documentationCard = (
46
70
href = "https://diamondlightsource.github.io/workflows/docs"
47
71
target = "_blank"
48
72
>
49
- < CardContent >
50
- < Typography gutterBottom variant = "h5" component = "div" >
73
+ < CardContent style = { { height : cardHeight } } >
74
+ < Typography
75
+ gutterBottom
76
+ variant = "h5"
77
+ component = "div"
78
+ sx = { { textAlign : "center" } }
79
+ >
51
80
Documentation
52
81
</ Typography >
53
- < Typography variant = "body2" sx = { { color : "text.secondary" } } >
54
- Full user documentation with tutorials, how-tos, explanations and
82
+ < Typography
83
+ variant = "body2"
84
+ sx = { {
85
+ color : "text.secondary" ,
86
+ textAlign : "center" ,
87
+ } }
88
+ >
89
+ Full user documentation with tutorials, explanations, how-tos, and
55
90
references.
56
91
</ Typography >
57
92
</ CardContent >
@@ -65,12 +100,23 @@ const helpCard = (
65
100
href = "https://diamondlightsource.slack.com/archives/C08NYJSGMFD"
66
101
target = "_blank"
67
102
>
68
- < CardContent >
69
- < Typography gutterBottom variant = "h5" component = "div" >
103
+ < CardContent style = { { height : cardHeight } } >
104
+ < Typography
105
+ gutterBottom
106
+ variant = "h5"
107
+ component = "div"
108
+ sx = { { textAlign : "center" } }
109
+ >
70
110
Help/Feedback
71
111
</ Typography >
72
- < Typography variant = "body2" sx = { { color : "text.secondary" } } >
73
- Get help from the workflows team and leave feedback.
112
+ < Typography
113
+ variant = "body2"
114
+ sx = { {
115
+ color : "text.secondary" ,
116
+ textAlign : "center" ,
117
+ } }
118
+ >
119
+ Get help and leave feedback via Slack.
74
120
</ Typography >
75
121
</ CardContent >
76
122
</ CardActionArea >
@@ -83,12 +129,23 @@ const reportCard = (
83
129
href = "https://github.com/DiamondLightSource/workflows/issues/new"
84
130
target = "_blank"
85
131
>
86
- < CardContent >
87
- < Typography gutterBottom variant = "h5" component = "div" >
88
- Report an issue
132
+ < CardContent style = { { height : cardHeight } } >
133
+ < Typography
134
+ gutterBottom
135
+ variant = "h5"
136
+ component = "div"
137
+ sx = { { textAlign : "center" } }
138
+ >
139
+ Report an Issue
89
140
</ Typography >
90
- < Typography variant = "body2" sx = { { color : "text.secondary" } } >
91
- Report an issue on the workflows GitHub page.
141
+ < Typography
142
+ variant = "body2"
143
+ sx = { {
144
+ color : "text.secondary" ,
145
+ textAlign : "center" ,
146
+ } }
147
+ >
148
+ Report an issue via GitHub.
92
149
</ Typography >
93
150
</ CardContent >
94
151
</ CardActionArea >
@@ -99,33 +156,50 @@ function DashboardPage() {
99
156
return (
100
157
< >
101
158
< WorkflowsNavbar />
102
- < Container maxWidth = "sm " sx = { { mt : 5 , mb : 4 } } >
159
+ < Container maxWidth = "lg " sx = { { mt : 5 , mb : 4 } } >
103
160
< Grid
104
161
container
105
162
alignItems = "stretch"
163
+ justifyContent = "center"
106
164
spacing = { { xs : 2 , sm : 2 , md : 3 } }
107
- columns = { { xs : 2 , sm : 4 , md : 6 } }
165
+ columns = { { xs : 2 , sm : 8 , md : 12 } }
166
+ sx = { { mt : 5 , mb : 4 } }
108
167
>
109
168
< Grid key = { "workflows" } size = { { xs : 2 , sm : 2 , md : 3 } } >
110
- < Card style = { { height : "100%" , minHeight : 150 } } >
111
- { workflowsCard }
112
- </ Card >
169
+ < Card style = { { height : "100%" } } > { workflowsCard } </ Card >
113
170
</ Grid >
114
- < Grid key = { "templates" } size = { { xs : 2 , sm : 4 , md : 3 } } >
115
- < Card style = { { height : "100%" , minHeight : 150 } } >
171
+ < Grid key = { "templates" } size = { { xs : 2 , sm : 2 , md : 3 } } >
172
+ < Card
173
+ style = { { height : "100%" } }
174
+ sx = { {
175
+ height : "100%" ,
176
+ transition : "all 0.3s ease" ,
177
+ "&:hover .card-description" : {
178
+ opacity : 1 ,
179
+ maxHeight : 200 ,
180
+ } ,
181
+ } }
182
+ >
116
183
{ templatesCard }
117
184
</ Card >
118
185
</ Grid >
186
+ </ Grid >
187
+ < Grid
188
+ container
189
+ alignItems = "stretch"
190
+ justifyContent = "center"
191
+ spacing = { { xs : 2 , sm : 2 , md : 3 } }
192
+ columns = { { xs : 2 , sm : 8 , md : 12 } }
193
+ sx = { { mt : 5 , mb : 4 } }
194
+ >
119
195
< Grid key = { "documentation" } size = { { xs : 2 , sm : 2 , md : 3 } } >
120
- < Card style = { { height : "100%" , minHeight : 150 } } >
121
- { documentationCard }
122
- </ Card >
196
+ < Card style = { { height : "100%" } } > { documentationCard } </ Card >
123
197
</ Grid >
124
198
< Grid key = { "help" } size = { { xs : 2 , sm : 2 , md : 3 } } >
125
- < Card style = { { height : "100%" , minHeight : 150 } } > { helpCard } </ Card >
199
+ < Card style = { { height : "100%" } } > { helpCard } </ Card >
126
200
</ Grid >
127
201
< Grid key = { "report" } size = { { xs : 2 , sm : 2 , md : 3 } } >
128
- < Card style = { { height : "100%" , minHeight : 150 } } > { reportCard } </ Card >
202
+ < Card style = { { height : "100%" } } > { reportCard } </ Card >
129
203
</ Grid >
130
204
</ Grid >
131
205
</ Container >
0 commit comments