Spaces:
Running
Running
update logo
Browse files- client/src/assets/crown.svg +4 -0
- client/src/assets/gradient.svg +34 -0
- client/src/assets/logo-text.svg +48 -0
- client/src/assets/logo.svg +48 -0
- client/src/components/LeaderboardFilters/LeaderboardFilters.jsx +8 -1
- client/src/components/Logo/Logo.jsx +23 -4
- client/src/components/PageTitle/PageTitle.jsx +67 -0
- client/src/pages/LeaderboardPage/LeaderboardPage.jsx +2 -3
client/src/assets/crown.svg
ADDED
|
client/src/assets/gradient.svg
ADDED
|
client/src/assets/logo-text.svg
ADDED
|
client/src/assets/logo.svg
ADDED
|
client/src/components/LeaderboardFilters/LeaderboardFilters.jsx
CHANGED
@@ -42,7 +42,14 @@ const LeaderboardFilters = ({ allSections }) => {
|
|
42 |
return (
|
43 |
<Stack spacing={4} sx={{ width: "100%", mb: 4, alignItems: "center" }}>
|
44 |
{/* Categories */}
|
45 |
-
<Box
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
<Stack
|
47 |
direction="row"
|
48 |
spacing={1}
|
|
|
42 |
return (
|
43 |
<Stack spacing={4} sx={{ width: "100%", mb: 4, alignItems: "center" }}>
|
44 |
{/* Categories */}
|
45 |
+
<Box
|
46 |
+
sx={{
|
47 |
+
width: {
|
48 |
+
xs: "90%",
|
49 |
+
md: "60%",
|
50 |
+
},
|
51 |
+
}}
|
52 |
+
>
|
53 |
<Stack
|
54 |
direction="row"
|
55 |
spacing={1}
|
client/src/components/Logo/Logo.jsx
CHANGED
@@ -1,19 +1,38 @@
|
|
1 |
import React from "react";
|
2 |
import { Link } from "react-router-dom";
|
3 |
import { Box } from "@mui/material";
|
|
|
|
|
4 |
|
5 |
const Logo = () => {
|
6 |
return (
|
7 |
-
<Link to="/" style={{ textDecoration: "none" }}>
|
8 |
<Box
|
9 |
component="img"
|
10 |
-
src=
|
11 |
-
alt="
|
12 |
sx={{
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
width: "auto",
|
15 |
display: "block",
|
16 |
margin: "0 auto",
|
|
|
|
|
17 |
}}
|
18 |
/>
|
19 |
</Link>
|
|
|
1 |
import React from "react";
|
2 |
import { Link } from "react-router-dom";
|
3 |
import { Box } from "@mui/material";
|
4 |
+
import logoText from "../../assets/logo-text.svg";
|
5 |
+
import gradient from "../../assets/gradient.svg";
|
6 |
|
7 |
const Logo = () => {
|
8 |
return (
|
9 |
+
<Link to="/" style={{ textDecoration: "none", position: "relative" }}>
|
10 |
<Box
|
11 |
component="img"
|
12 |
+
src={gradient}
|
13 |
+
alt=""
|
14 |
sx={{
|
15 |
+
position: "absolute",
|
16 |
+
width: "150%",
|
17 |
+
height: "auto",
|
18 |
+
top: "50%",
|
19 |
+
left: "50%",
|
20 |
+
transform: "translate(-50%, -50%)",
|
21 |
+
zIndex: 0,
|
22 |
+
opacity: 1,
|
23 |
+
}}
|
24 |
+
/>
|
25 |
+
<Box
|
26 |
+
component="img"
|
27 |
+
src={logoText}
|
28 |
+
alt="Leaderboards on the Hub"
|
29 |
+
sx={{
|
30 |
+
height: 110,
|
31 |
width: "auto",
|
32 |
display: "block",
|
33 |
margin: "0 auto",
|
34 |
+
position: "relative",
|
35 |
+
zIndex: 1,
|
36 |
}}
|
37 |
/>
|
38 |
</Link>
|
client/src/components/PageTitle/PageTitle.jsx
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import React from "react";
|
2 |
+
import { Box, Typography } from "@mui/material";
|
3 |
+
import crown from "../../assets/crown.svg";
|
4 |
+
|
5 |
+
const PageTitle = () => {
|
6 |
+
const text = "Leaderboards on the Hub";
|
7 |
+
const words = text.split(" ");
|
8 |
+
|
9 |
+
// Find the position of the first 'd'
|
10 |
+
const firstDIndex = text.toLowerCase().indexOf("d");
|
11 |
+
|
12 |
+
let letterCount = 0;
|
13 |
+
|
14 |
+
return (
|
15 |
+
<Typography
|
16 |
+
fontWeight="900"
|
17 |
+
variant="h3"
|
18 |
+
component="h1"
|
19 |
+
color="#364254"
|
20 |
+
sx={{
|
21 |
+
display: "flex",
|
22 |
+
justifyContent: "center",
|
23 |
+
flexWrap: "wrap",
|
24 |
+
}}
|
25 |
+
>
|
26 |
+
{words.map((word, wordIndex) => (
|
27 |
+
<span
|
28 |
+
key={wordIndex}
|
29 |
+
style={{ position: "relative", whiteSpace: "nowrap" }}
|
30 |
+
>
|
31 |
+
{word.split("").map((letter, letterIndex) => {
|
32 |
+
const isFirstD = letterCount === firstDIndex;
|
33 |
+
letterCount++;
|
34 |
+
return (
|
35 |
+
<span
|
36 |
+
key={letterIndex}
|
37 |
+
style={{
|
38 |
+
display: "inline",
|
39 |
+
position: "relative",
|
40 |
+
}}
|
41 |
+
>
|
42 |
+
{isFirstD && (
|
43 |
+
<Box
|
44 |
+
component="img"
|
45 |
+
src={crown}
|
46 |
+
alt=""
|
47 |
+
sx={{
|
48 |
+
position: "absolute",
|
49 |
+
top: "0px",
|
50 |
+
left: "21px",
|
51 |
+
transform: "translateX(-50%)",
|
52 |
+
width: "13px",
|
53 |
+
}}
|
54 |
+
/>
|
55 |
+
)}
|
56 |
+
{letter}
|
57 |
+
</span>
|
58 |
+
);
|
59 |
+
})}
|
60 |
+
{wordIndex < words.length - 1 && "\u00A0"}
|
61 |
+
</span>
|
62 |
+
))}
|
63 |
+
</Typography>
|
64 |
+
);
|
65 |
+
};
|
66 |
+
|
67 |
+
export default PageTitle;
|
client/src/pages/LeaderboardPage/LeaderboardPage.jsx
CHANGED
@@ -12,6 +12,7 @@ import {
|
|
12 |
} from "@mui/material";
|
13 |
import SearchIcon from "@mui/icons-material/Search";
|
14 |
import Logo from "../../components/Logo/Logo";
|
|
|
15 |
import PageHeader from "../../components/PageHeader/PageHeader";
|
16 |
import LeaderboardSection from "../../components/LeaderboardSection";
|
17 |
import LeaderboardFilters from "../../components/LeaderboardFilters/LeaderboardFilters";
|
@@ -69,9 +70,7 @@ const LeaderboardPageContent = () => {
|
|
69 |
gap: 2,
|
70 |
}}
|
71 |
>
|
72 |
-
<
|
73 |
-
Leaderboards on the Hub
|
74 |
-
</Typography>
|
75 |
<Typography variant="h6" color="text.secondary">
|
76 |
<span style={{ fontWeight: 600 }}>Discover</span> and{" "}
|
77 |
<span style={{ fontWeight: 600 }}>explore</span> all leaderboards from
|
|
|
12 |
} from "@mui/material";
|
13 |
import SearchIcon from "@mui/icons-material/Search";
|
14 |
import Logo from "../../components/Logo/Logo";
|
15 |
+
import PageTitle from "../../components/PageTitle/PageTitle";
|
16 |
import PageHeader from "../../components/PageHeader/PageHeader";
|
17 |
import LeaderboardSection from "../../components/LeaderboardSection";
|
18 |
import LeaderboardFilters from "../../components/LeaderboardFilters/LeaderboardFilters";
|
|
|
70 |
gap: 2,
|
71 |
}}
|
72 |
>
|
73 |
+
<PageTitle />
|
|
|
|
|
74 |
<Typography variant="h6" color="text.secondary">
|
75 |
<span style={{ fontWeight: 600 }}>Discover</span> and{" "}
|
76 |
<span style={{ fontWeight: 600 }}>explore</span> all leaderboards from
|