-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathApp.razor
282 lines (279 loc) · 8.94 KB
/
App.razor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<CascadingValue Value="Theme">
<Router AppAssembly="@typeof(App).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)"/>
<FocusOnNavigate RouteData="@routeData" Selector="h1"/>
</Found>
<NotFound>
<PageTitle>Not found</PageTitle>
<LayoutView Layout="@typeof(MainLayout)">
<p role="alert">Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>
<MudThemeProvider Theme="Theme" IsDarkMode="true"/>
<MudDialogProvider/>
<MudSnackbarProvider/>
</CascadingValue>
@code
{
#if NET8_0_OR_GREATER
public MudTheme Theme { get; set; } = new()
{
PaletteLight = new()
{
Black = "#272c34ff",
Primary = "#0078d7",
Secondary = "#FEB16B",
Success = "#A4D266",
Warning = "#FEB16B",
Dark = "#303030",
Info = "#4889CD",
Error = "#EA4F52",
Surface = "#f0f0f0",
Background = "#f0f0f0",
BackgroundGray = "#f5f5f5ff",
DrawerBackground = "#f0f0f0",
DrawerText = "#424242ff",
DrawerIcon = "#616161ff",
AppbarBackground = "#0078d7",
AppbarText = "#ffffffff",
TextPrimary = "#424242ff",
TextSecondary = "#00000089",
ActionDefault = "#00000089",
ActionDisabled = "#00000042",
ActionDisabledBackground = "#0000001e",
Divider = "#e0e0e0ff",
DividerLight = "#000000cc",
TableLines = "#e0e0e0ff",
LinesDefault = "#0000001e",
LinesInputs = "#bdbdbdff",
TextDisabled = "#00000060"
},
PaletteDark = new()
{
Black = "#000000",
Primary = "#54A68F",
Secondary = "#FEB16B",
Success = "#A4D266",
Warning = "#FEB16B",
Dark = "#303030",
Info = "#4889CD",
Error = "#EA4F52",
Surface = "#303030",
Background = "#212121",
BackgroundGray = "#303030",
DrawerBackground = "#303030",
DrawerText = "#FFFFFF",
DrawerIcon = "#FFFFFF",
AppbarBackground = "#303030",
AppbarText = "#FFFFFF",
TextPrimary = "#FFFFFF",
TextSecondary = "#FFFFFF",
ActionDefault = "#adadb1",
ActionDisabled = "rgba(255,255,255, 0.26)",
ActionDisabledBackground = "rgba(255,255,255, 0.12)",
Divider = "rgba(255,255,255, 0.12)",
DividerLight = "rgba(255,255,255, 0.06)",
TableLines = "rgba(255,255,255, 0.12)",
LinesDefault = "rgba(255,255,255, 0.12)",
LinesInputs = "rgba(255,255,255, 0.3)",
TextDisabled = "rgba(255,255,255, 0.2)"
},
Typography = new()
{
Default = new DefaultTypography
{
FontSize = "1em"
},
Body1 = new Body1Typography
{
FontSize = "1em"
},
Body2 = new Body2Typography
{
FontSize = ".83em"
},
Caption = new CaptionTypography
{
FontSize = "1.12em",
FontWeight = "550"
},
Overline = new OverlineTypography
{
FontSize = "1.12em",
FontWeight = "550"
},
H1 = new H1Typography
{
FontSize = "2em",
FontWeight = "700"
},
H2 = new H2Typography
{
FontSize = "1.5em",
FontWeight = "650"
},
H3 = new H3Typography
{
FontSize = "1.17em",
FontWeight = "600"
},
H4 = new H4Typography
{
FontSize = "1.12em",
FontWeight = "550"
},
H5 = new H5Typography
{
FontSize = ".83em",
FontWeight = "500"
},
H6 = new H6Typography
{
FontSize = ".75em",
FontWeight = "450"
},
Subtitle1 = new Subtitle1Typography
{
FontSize = "3em",
FontWeight = "650"
},
Subtitle2 = new Subtitle2Typography
{
FontSize = "1.17em",
FontWeight = "600"
}
}
};
#else
public MudTheme Theme { get; set; } = new()
{
Palette = new PaletteLight
{
Black = "#272c34ff",
Primary = "#0078d7",
Secondary = "#FEB16B",
Success = "#A4D266",
Warning = "#FEB16B",
Dark = "#303030",
Info = "#4889CD",
Error = "#EA4F52",
Surface = "#f0f0f0",
Background = "#f0f0f0",
BackgroundGrey = "#f5f5f5ff",
DrawerBackground = "#f0f0f0",
DrawerText = "#424242ff",
DrawerIcon = "#616161ff",
AppbarBackground = "#0078d7",
AppbarText = "#ffffffff",
TextPrimary = "#424242ff",
TextSecondary = "#00000089",
ActionDefault = "#00000089",
ActionDisabled = "#00000042",
ActionDisabledBackground = "#0000001e",
Divider = "#e0e0e0ff",
DividerLight = "#000000cc",
TableLines = "#e0e0e0ff",
LinesDefault = "#0000001e",
LinesInputs = "#bdbdbdff",
TextDisabled = "#00000060"
},
PaletteDark = new PaletteDark
{
Black = "#000000",
Primary = "#54A68F",
Secondary = "#FEB16B",
Success = "#A4D266",
Warning = "#FEB16B",
Dark = "#303030",
Info = "#4889CD",
Error = "#EA4F52",
Surface = "#303030",
Background = "#212121",
BackgroundGrey = "#303030",
DrawerBackground = "#303030",
DrawerText = "#FFFFFF",
DrawerIcon = "#FFFFFF",
AppbarBackground = "#303030",
AppbarText = "#FFFFFF",
TextPrimary = "#FFFFFF",
TextSecondary = "#FFFFFF",
ActionDefault = "#adadb1",
ActionDisabled = "rgba(255,255,255, 0.26)",
ActionDisabledBackground = "rgba(255,255,255, 0.12)",
Divider = "rgba(255,255,255, 0.12)",
DividerLight = "rgba(255,255,255, 0.06)",
TableLines = "rgba(255,255,255, 0.12)",
LinesDefault = "rgba(255,255,255, 0.12)",
LinesInputs = "rgba(255,255,255, 0.3)",
TextDisabled = "rgba(255,255,255, 0.2)"
},
Typography = new Typography
{
Default = new Default
{
FontSize = "1em"
},
Body1 = new Body1
{
FontSize = "1em"
},
Body2 = new Body2
{
FontSize = ".83em"
},
Caption = new Caption
{
FontSize = "1.12em",
FontWeight = 550
},
Overline = new Overline
{
FontSize = "1.12em",
FontWeight = 550
},
H1 = new H1
{
FontSize = "2em",
FontWeight = 700
},
H2 = new H2
{
FontSize = "1.5em",
FontWeight = 650
},
H3 = new H3
{
FontSize = "1.17em",
FontWeight = 600
},
H4 = new H4
{
FontSize = "1.12em",
FontWeight = 550
},
H5 = new H5
{
FontSize = ".83em",
FontWeight = 500
},
H6 = new H6
{
FontSize = ".75em",
FontWeight = 450
},
Subtitle1 = new Subtitle1
{
FontSize = "3em",
FontWeight = 650
},
Subtitle2 = new Subtitle2
{
FontSize = "1.17em",
FontWeight = 600
}
}
};
#endif
}