Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
improve mobile display
Browse files
frontend/src/components/Footer/Footer.js
CHANGED
@@ -1,21 +1,22 @@
|
|
1 |
-
import React from
|
2 |
-
import { Box, Typography, Link } from
|
3 |
|
4 |
const Footer = () => {
|
5 |
return (
|
6 |
<Box
|
7 |
component="footer"
|
8 |
sx={{
|
9 |
-
width:
|
10 |
py: 4,
|
11 |
-
textAlign:
|
12 |
}}
|
13 |
>
|
14 |
-
<Typography variant="body2" color="text.secondary">
|
15 |
-
© 2024 Hugging Face - Open LLM Leaderboard - Made with 🤗 by the HF team
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
19 |
rel="noopener noreferrer"
|
20 |
color="inherit"
|
21 |
>
|
@@ -26,4 +27,4 @@ const Footer = () => {
|
|
26 |
);
|
27 |
};
|
28 |
|
29 |
-
export default Footer;
|
|
|
1 |
+
import React from "react";
|
2 |
+
import { Box, Typography, Link } from "@mui/material";
|
3 |
|
4 |
const Footer = () => {
|
5 |
return (
|
6 |
<Box
|
7 |
component="footer"
|
8 |
sx={{
|
9 |
+
width: "100%",
|
10 |
py: 4,
|
11 |
+
textAlign: "center",
|
12 |
}}
|
13 |
>
|
14 |
+
<Typography variant="body2" color="text.secondary" sx={{ mx: 4 }}>
|
15 |
+
© 2024 Hugging Face - Open LLM Leaderboard - Made with 🤗 by the HF team
|
16 |
+
-{" "}
|
17 |
+
<Link
|
18 |
+
href="https://huggingface.co"
|
19 |
+
target="_blank"
|
20 |
rel="noopener noreferrer"
|
21 |
color="inherit"
|
22 |
>
|
|
|
27 |
);
|
28 |
};
|
29 |
|
30 |
+
export default Footer;
|
frontend/src/components/shared/FilterTag.js
CHANGED
@@ -15,6 +15,7 @@ const FilterTag = ({
|
|
15 |
variant = "tag",
|
16 |
showCheckbox = false,
|
17 |
stacked = false,
|
|
|
18 |
}) => {
|
19 |
const theme = useTheme();
|
20 |
|
@@ -129,6 +130,7 @@ const FilterTag = ({
|
|
129 |
? "secondary.main"
|
130 |
: "primary.main"
|
131 |
: "divider",
|
|
|
132 |
}}
|
133 |
/>
|
134 |
);
|
|
|
15 |
variant = "tag",
|
16 |
showCheckbox = false,
|
17 |
stacked = false,
|
18 |
+
sx = {},
|
19 |
}) => {
|
20 |
const theme = useTheme();
|
21 |
|
|
|
130 |
? "secondary.main"
|
131 |
: "primary.main"
|
132 |
: "divider",
|
133 |
+
...sx,
|
134 |
}}
|
135 |
/>
|
136 |
);
|
frontend/src/pages/LeaderboardPage/components/Leaderboard/components/Filters/QuickFilters.js
CHANGED
@@ -7,6 +7,26 @@ import { useLeaderboard } from "../../context/LeaderboardContext";
|
|
7 |
import InfoIconWithTooltip from "../../../../../../components/shared/InfoIconWithTooltip";
|
8 |
import { UI_TOOLTIPS } from "../../constants/tooltips";
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
export const QuickFiltersSkeleton = () => (
|
11 |
<Box sx={{ width: "100%" }}>
|
12 |
<Box
|
@@ -28,55 +48,16 @@ export const QuickFiltersSkeleton = () => (
|
|
28 |
width: "100%",
|
29 |
}}
|
30 |
>
|
31 |
-
<
|
32 |
sx={{
|
33 |
-
display: "flex",
|
34 |
-
alignItems: "center",
|
35 |
-
gap: 1,
|
36 |
-
width: "100%",
|
37 |
mb: { xs: 1, md: 2, lg: 0 },
|
38 |
}}
|
39 |
-
>
|
40 |
-
<Typography
|
41 |
-
variant="subtitle2"
|
42 |
-
sx={{
|
43 |
-
fontSize: "0.8rem",
|
44 |
-
fontWeight: 700,
|
45 |
-
color: "text.secondary",
|
46 |
-
}}
|
47 |
-
>
|
48 |
-
Quick Filters
|
49 |
-
</Typography>
|
50 |
-
<InfoIconWithTooltip
|
51 |
-
tooltip={UI_TOOLTIPS.QUICK_FILTERS}
|
52 |
-
iconProps={{ sx: { fontSize: "1rem" } }}
|
53 |
-
/>
|
54 |
-
</Box>
|
55 |
-
<Box
|
56 |
-
sx={{
|
57 |
-
display: "flex",
|
58 |
-
flexDirection: { xs: "column", md: "row" },
|
59 |
-
gap: 1,
|
60 |
-
width: "100%",
|
61 |
-
"& > *": {
|
62 |
-
flex: { md: 1 },
|
63 |
-
},
|
64 |
-
}}
|
65 |
-
>
|
66 |
-
{[1, 2, 3].map((i) => (
|
67 |
-
<Skeleton
|
68 |
-
key={i}
|
69 |
-
width={{ xs: "100%", md: "auto" }}
|
70 |
-
height={32}
|
71 |
-
sx={{ borderRadius: 1 }}
|
72 |
-
/>
|
73 |
-
))}
|
74 |
-
</Box>
|
75 |
-
<Skeleton
|
76 |
-
width={{ xs: "100%", md: 150 }}
|
77 |
-
height={32}
|
78 |
-
sx={{ borderRadius: 1 }}
|
79 |
/>
|
|
|
|
|
|
|
|
|
|
|
80 |
</Box>
|
81 |
</Box>
|
82 |
);
|
@@ -139,7 +120,7 @@ const QuickFilters = ({ totalCount = 0, loading = false }) => {
|
|
139 |
}
|
140 |
|
141 |
return (
|
142 |
-
<Box
|
143 |
<Box
|
144 |
sx={{
|
145 |
backgroundColor: (theme) => ({
|
@@ -154,66 +135,55 @@ const QuickFilters = ({ totalCount = 0, loading = false }) => {
|
|
154 |
borderRadius: 1,
|
155 |
p: 3,
|
156 |
display: "flex",
|
157 |
-
flexDirection: { xs: "column",
|
|
|
158 |
gap: 2,
|
159 |
width: "100%",
|
160 |
}}
|
161 |
>
|
162 |
<Box
|
163 |
sx={{
|
164 |
-
|
165 |
-
alignItems: "center",
|
166 |
-
gap: 0.5,
|
167 |
mb: { xs: 1, md: 2, lg: 0 },
|
168 |
}}
|
169 |
>
|
170 |
-
<
|
171 |
-
Quick Filters
|
172 |
-
</Typography>
|
173 |
-
<InfoIconWithTooltip
|
174 |
-
tooltip={UI_TOOLTIPS.QUICK_FILTERS}
|
175 |
-
iconProps={{ sx: { fontSize: "1rem" } }}
|
176 |
-
/>
|
177 |
</Box>
|
178 |
|
179 |
<Box
|
180 |
sx={{
|
181 |
display: "flex",
|
182 |
-
flexDirection: { xs: "column", md: "
|
183 |
-
|
184 |
-
|
185 |
-
width: "100%",
|
|
|
|
|
|
|
|
|
186 |
}}
|
187 |
>
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
}
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
label={preset.label}
|
203 |
-
checked={
|
204 |
-
currentParams[0] === preset.filters.paramsRange[0] &&
|
205 |
-
currentParams[1] === preset.filters.paramsRange[1]
|
206 |
-
}
|
207 |
-
onChange={() => handleSizePresetClick(preset)}
|
208 |
-
count={getPresetCount(preset)}
|
209 |
-
totalCount={totalCount}
|
210 |
-
sx={{
|
211 |
-
width: { xs: "100%", md: "auto" },
|
212 |
-
}}
|
213 |
-
/>
|
214 |
-
))}
|
215 |
-
</Box>
|
216 |
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
{officialProvidersPreset && (
|
218 |
<FilterTag
|
219 |
label={officialProvidersPreset.label}
|
@@ -223,7 +193,9 @@ const QuickFilters = ({ totalCount = 0, loading = false }) => {
|
|
223 |
totalCount={totalCount}
|
224 |
showCheckbox={true}
|
225 |
variant="secondary"
|
226 |
-
sx={{
|
|
|
|
|
227 |
/>
|
228 |
)}
|
229 |
</Box>
|
|
|
7 |
import InfoIconWithTooltip from "../../../../../../components/shared/InfoIconWithTooltip";
|
8 |
import { UI_TOOLTIPS } from "../../constants/tooltips";
|
9 |
|
10 |
+
const QuickFiltersTitle = ({ sx = {} }) => (
|
11 |
+
<Box
|
12 |
+
sx={{
|
13 |
+
display: "flex",
|
14 |
+
alignItems: "center",
|
15 |
+
gap: 0.5,
|
16 |
+
whiteSpace: "nowrap",
|
17 |
+
...sx,
|
18 |
+
}}
|
19 |
+
>
|
20 |
+
<Typography variant="body2" sx={{ fontWeight: 600 }}>
|
21 |
+
Quick Filters
|
22 |
+
</Typography>
|
23 |
+
<InfoIconWithTooltip
|
24 |
+
tooltip={UI_TOOLTIPS.QUICK_FILTERS}
|
25 |
+
iconProps={{ sx: { fontSize: "1rem" } }}
|
26 |
+
/>
|
27 |
+
</Box>
|
28 |
+
);
|
29 |
+
|
30 |
export const QuickFiltersSkeleton = () => (
|
31 |
<Box sx={{ width: "100%" }}>
|
32 |
<Box
|
|
|
48 |
width: "100%",
|
49 |
}}
|
50 |
>
|
51 |
+
<QuickFiltersTitle
|
52 |
sx={{
|
|
|
|
|
|
|
|
|
53 |
mb: { xs: 1, md: 2, lg: 0 },
|
54 |
}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
/>
|
56 |
+
|
57 |
+
{[1, 2, 3].map((i) => (
|
58 |
+
<Skeleton key={i} width={120} height={32} sx={{ borderRadius: 1 }} />
|
59 |
+
))}
|
60 |
+
<Skeleton width={150} height={32} sx={{ borderRadius: 1 }} />
|
61 |
</Box>
|
62 |
</Box>
|
63 |
);
|
|
|
120 |
}
|
121 |
|
122 |
return (
|
123 |
+
<Box>
|
124 |
<Box
|
125 |
sx={{
|
126 |
backgroundColor: (theme) => ({
|
|
|
135 |
borderRadius: 1,
|
136 |
p: 3,
|
137 |
display: "flex",
|
138 |
+
flexDirection: { xs: "column", lg: "row" },
|
139 |
+
alignItems: "center",
|
140 |
gap: 2,
|
141 |
width: "100%",
|
142 |
}}
|
143 |
>
|
144 |
<Box
|
145 |
sx={{
|
146 |
+
width: { xs: "100%", lg: "auto" },
|
|
|
|
|
147 |
mb: { xs: 1, md: 2, lg: 0 },
|
148 |
}}
|
149 |
>
|
150 |
+
<QuickFiltersTitle />
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
</Box>
|
152 |
|
153 |
<Box
|
154 |
sx={{
|
155 |
display: "flex",
|
156 |
+
flexDirection: { xs: "column", md: "row" },
|
157 |
+
flexWrap: { md: "wrap" },
|
158 |
+
gap: 1,
|
159 |
+
width: { xs: "100%", lg: "auto" },
|
160 |
+
"& > *": {
|
161 |
+
width: { xs: "100%", md: "auto" },
|
162 |
+
flex: { md: "0 0 auto" },
|
163 |
+
},
|
164 |
}}
|
165 |
>
|
166 |
+
{modelSizePresets.map((preset) => (
|
167 |
+
<FilterTag
|
168 |
+
key={preset.id}
|
169 |
+
label={preset.label}
|
170 |
+
checked={
|
171 |
+
currentParams[0] === preset.filters.paramsRange[0] &&
|
172 |
+
currentParams[1] === preset.filters.paramsRange[1]
|
173 |
+
}
|
174 |
+
onChange={() => handleSizePresetClick(preset)}
|
175 |
+
count={getPresetCount(preset)}
|
176 |
+
totalCount={totalCount}
|
177 |
+
/>
|
178 |
+
))}
|
179 |
+
</Box>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
|
181 |
+
<Box
|
182 |
+
sx={{
|
183 |
+
width: { xs: "100%", md: "100%", lg: "auto" },
|
184 |
+
display: "flex",
|
185 |
+
}}
|
186 |
+
>
|
187 |
{officialProvidersPreset && (
|
188 |
<FilterTag
|
189 |
label={officialProvidersPreset.label}
|
|
|
193 |
totalCount={totalCount}
|
194 |
showCheckbox={true}
|
195 |
variant="secondary"
|
196 |
+
sx={{
|
197 |
+
width: { xs: "100%", md: "100%", lg: "auto" },
|
198 |
+
}}
|
199 |
/>
|
200 |
)}
|
201 |
</Box>
|