Skip to content

Commit 9dffd4b

Browse files
committed
Refactored font weight declarations, changed icon imports to svgs
1 parent 973fe78 commit 9dffd4b

7 files changed

Lines changed: 79 additions & 48 deletions

File tree

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
"typescript.tsdk": "${workspaceFolder}/client/node_modules/typescript/lib",
1010
"shellcheck.ignorePatterns": {
1111
"**/.env*": true
12-
}
12+
},
13+
"editor.formatOnSave": true
1314
}

client/src/components/ui/footer.tsx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,10 @@ import { useRouter } from "next/router";
44
import * as React from "react";
55
import { FaFacebookF, FaInstagram } from "react-icons/fa";
66

7+
import { navlinks } from "@/lib/constants";
8+
79
export default function Footer() {
810
const router = useRouter();
9-
type NavLink = {
10-
label: string;
11-
href: string;
12-
};
13-
const navlinks: NavLink[] = [
14-
{ label: "Home", href: "/" },
15-
{ label: "Schedule", href: "/schedule" },
16-
{ label: "Format & Rules", href: "/format-rules" },
17-
{ label: "Guests & Sponsors", href: "/guests-sponsors" },
18-
{ label: "Leaderboard", href: "/leaderboard" },
19-
{ label: "Match Details", href: "/match-details" },
20-
];
2111
return (
2212
<footer className="bg-dark px-6 py-12 text-light">
2313
<div className="mx-auto max-w-7xl">

client/src/components/ui/navbar.tsx

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,12 @@ import { useRouter } from "next/router";
44
import { useState } from "react";
55
import { FiAlignJustify, FiX } from "react-icons/fi";
66

7+
import { navlinks } from "@/lib/constants";
8+
79
export default function Navbar() {
810
const router = useRouter();
911
const [menuOpen, setMenuOpen] = useState(false);
10-
type NavLink = {
11-
label: string;
12-
href: string;
13-
};
14-
const navlinks: NavLink[] = [
15-
{ label: "Home", href: "/" },
16-
{ label: "Schedule", href: "/schedule" },
17-
{ label: "Format & Rules", href: "/format-rules" },
18-
{ label: "Guests & Sponsors", href: "/guests-sponsors" },
19-
{ label: "Leaderboard", href: "/leaderboard" },
20-
{ label: "Match Details", href: "/match-details" },
21-
];
12+
2213
const handleNav = () => {
2314
setMenuOpen(!menuOpen);
2415
};

client/src/lib/constants.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
type NavLink = {
2+
label: string;
3+
href: string;
4+
};
5+
6+
export const navlinks: NavLink[] = [
7+
{ label: "Home", href: "/" },
8+
{ label: "Schedule", href: "/schedule" },
9+
{ label: "Format & Rules", href: "/format-rules" },
10+
{ label: "Guests & Sponsors", href: "/guests-sponsors" },
11+
{ label: "Leaderboard", href: "/leaderboard" },
12+
{ label: "Match Details", href: "/match-details" },
13+
];

client/src/pages/_app.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,9 @@ export default function App({ Component, pageProps }: AppProps) {
4444
<QueryClientProvider client={queryClient}>
4545
<ReactQueryDevtools initialIsOpen={false} />
4646
<Navbar />
47-
<div className="w-full pt-16">
48-
<main>
49-
<Component {...pageProps} />
50-
</main>
51-
</div>
47+
<main className="w-full pt-16">
48+
<Component {...pageProps} />
49+
</main>
5250
</QueryClientProvider>
5351
<Footer />
5452
</div>

client/src/pages/index.tsx

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
import Image from "next/image";
22
import Link from "next/link";
33
import { useRouter } from "next/router";
4-
import { LuCircleCheckBig } from "react-icons/lu";
5-
import { RiCalendarScheduleLine } from "react-icons/ri";
6-
import { TbDrone } from "react-icons/tb";
74

85
export default function Home() {
96
return (
@@ -59,7 +56,28 @@ export default function Home() {
5956
{/*stacking vertically 1 card at the time on smaller screens and centering the grid */}
6057
<div className="landing-card">
6158
<div className="card-icon bg-orange-100 text-orange-400">
62-
<TbDrone size={30} />
59+
<svg
60+
width="30"
61+
height="30"
62+
viewBox="0 0 24 24"
63+
fill="none"
64+
stroke="currentColor"
65+
stroke-width="2"
66+
stroke-linecap="round"
67+
stroke-linejoin="round"
68+
className="stroke-current"
69+
>
70+
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
71+
<path d="M10 10h4v4h-4z" />
72+
<path d="M10 10l-3.5 -3.5" />
73+
<path d="M9.96 6a3.5 3.5 0 1 0 -3.96 3.96" />
74+
<path d="M14 10l3.5 -3.5" />
75+
<path d="M18 9.96a3.5 3.5 0 1 0 -3.96 -3.96" />
76+
<path d="M14 14l3.5 3.5" />
77+
<path d="M14.04 18a3.5 3.5 0 1 0 3.96 -3.96" />
78+
<path d="M10 14l-3.5 3.5" />
79+
<path d="M6 14.04a3.5 3.5 0 1 0 3.96 3.96" />
80+
</svg>
6381
</div>
6482
<h3 className="card-heading">The Challenge</h3>
6583
<p className="caption text-muted-foreground">
@@ -74,7 +92,14 @@ export default function Home() {
7492

7593
<div className="landing-card">
7694
<div className="card-icon bg-blue-100 text-blue-500">
77-
<RiCalendarScheduleLine size={30} />
95+
<svg
96+
height="30"
97+
width="30"
98+
viewBox="0 0 24 24"
99+
fill="currentColor"
100+
>
101+
<path d="M7 3V1H9V3H15V1H17V3H21C21.5523 3 22 3.44772 22 4V9H20V5H17V7H15V5H9V7H7V5H4V19H10V21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H7ZM17 12C14.7909 12 13 13.7909 13 16C13 18.2091 14.7909 20 17 20C19.2091 20 21 18.2091 21 16C21 13.7909 19.2091 12 17 12ZM11 16C11 12.6863 13.6863 10 17 10C20.3137 10 23 12.6863 23 16C23 19.3137 20.3137 22 17 22C13.6863 22 11 19.3137 11 16ZM16 13V16.4142L18.2929 18.7071L19.7071 17.2929L18 15.5858V13H16Z"></path>
102+
</svg>
78103
</div>
79104
<h3 className="card-heading">The Schedule</h3>
80105
<div>
@@ -96,7 +121,20 @@ export default function Home() {
96121

97122
<div className="landing-card">
98123
<div className="card-icon bg-yellow-100 text-yellow-400">
99-
<LuCircleCheckBig size={30} />
124+
{/* <LuCircleCheckBig size={30} /> */}
125+
<svg
126+
width="30"
127+
height="30"
128+
viewBox="0 0 24 24"
129+
fill="none"
130+
stroke-width="2"
131+
stroke-linecap="round"
132+
stroke-linejoin="round"
133+
className="stroke-current"
134+
>
135+
<path d="M21.801 10A10 10 0 1 1 17 3.335" />
136+
<path d="m9 11 3 3L22 4" />
137+
</svg>
100138
</div>
101139
<h3 className="card-heading">The Rules</h3>
102140
<p className="caption text-muted-foreground">

client/src/styles/globals.css

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,21 @@
7777
@apply font-montserrat text-[32px] font-bold leading-[1.15em];
7878
}
7979
.medium-lg {
80-
@apply font-montserrat text-[24px] font-[500];
80+
@apply font-montserrat text-[24px] font-medium;
8181
}
8282
/* button */
8383
.medium-md {
84-
@apply font-montserrat text-[18px] font-[500];
84+
@apply font-montserrat text-[18px] font-medium;
8585
}
8686
/* navbar */
8787
.medium-sm {
8888
@apply font-montserrat text-[14px] font-bold;
8989
}
9090
.body-lg {
91-
@apply font-worksans text-[22px] font-[500];
91+
@apply font-worksans text-[22px] font-medium;
9292
}
9393
.body-sm {
94-
@apply font-worksans text-[17px] font-[500];
94+
@apply font-worksans text-[17px] font-medium;
9595
}
9696
.caption {
9797
@apply font-worksans text-[16px] font-normal;
@@ -110,21 +110,21 @@
110110
@apply font-montserrat text-[30px] font-bold leading-[1.15em];
111111
}
112112
.medium-lg {
113-
@apply font-montserrat text-[24px] font-[500];
113+
@apply font-montserrat text-[24px] font-medium;
114114
}
115115
/* button */
116116
.medium-md {
117-
@apply font-montserrat text-[18px] font-[500];
117+
@apply font-montserrat text-[18px] font-medium;
118118
}
119119
/* navbar */
120120
.medium-sm {
121121
@apply font-montserrat text-[14px] font-bold;
122122
}
123123
.body-lg {
124-
@apply font-worksans text-[22px] font-[500];
124+
@apply font-worksans text-[22px] font-medium;
125125
}
126126
.body-sm {
127-
@apply font-worksans text-[17px] font-[500];
127+
@apply font-worksans text-[17px] font-medium;
128128
}
129129
.caption {
130130
@apply font-worksans text-[16px] font-normal;
@@ -139,21 +139,21 @@
139139
@apply font-montserrat text-[30px] font-bold leading-[1.15em];
140140
}
141141
.medium-lg {
142-
@apply font-montserrat text-[24px] font-[500];
142+
@apply font-montserrat text-[24px] font-medium;
143143
}
144144
/* button */
145145
.medium-md {
146-
@apply font-montserrat text-[18px] font-[500];
146+
@apply font-montserrat text-[18px] font-medium;
147147
}
148148
/* navbar */
149149
.medium-sm {
150150
@apply font-montserrat text-[14px] font-bold tracking-wide;
151151
}
152152
.body-lg {
153-
@apply font-worksans text-[22px] font-[500];
153+
@apply font-worksans text-[22px] font-medium;
154154
}
155155
.body-sm {
156-
@apply font-worksans text-[17px] font-[500];
156+
@apply font-worksans text-[17px] font-medium;
157157
}
158158
.caption {
159159
@apply font-worksans text-[16px] font-normal;

0 commit comments

Comments
 (0)