Skip to content

Commit ef5abe0

Browse files
authored
Merge pull request #21 from codeXsit/codex-10-heading
Codex 10 heading
2 parents ad387b8 + cb737e0 commit ef5abe0

File tree

5 files changed

+78
-6
lines changed

5 files changed

+78
-6
lines changed

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@
1313
"prepare": "husky install"
1414
},
1515
"dependencies": {
16+
"@fontsource/league-gothic": "^5.0.18",
17+
"@fontsource/poppins": "^5.0.8",
18+
"@vitejs/plugin-react": "^4.2.1",
19+
"prop-types": "^15.8.1",
1620
"react": "^18.2.0",
1721
"react-dom": "^18.2.0",
1822
"react-router-dom": "^6.22.1",
1923
"react-toastify": "^10.0.4",
20-
"@vitejs/plugin-react": "^4.2.1",
2124
"vite": "^5.1.0"
2225
},
2326
"devDependencies": {

src/assets/styles/index.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
@import "tailwindcss/base";
22
@import "tailwindcss/components";
33
@import "tailwindcss/utilities";
4+
@import "@fontsource/poppins/400.css";
5+
@import "@fontsource/poppins/900.css";
6+
@import "@fontsource/league-gothic";
47

58
/* Reset default browser styles */
69
* {
710
margin: 0;
811
padding: 0;
912
box-sizing: border-box;
13+
font-family: "poppins", "sans-serif";
1014
}
1115

1216
a {
1317
text-decoration: none;
1418
color: inherit;
1519
}
20+
21+
.text-outlined {
22+
-webkit-text-stroke-width: 2px;
23+
-webkit-text-stroke-color: #737373;
24+
}

src/components/Heading/index.jsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import PropTypes from "prop-types";
2+
3+
function Heading({ text }) {
4+
return (
5+
<div className="relative text-center font-black uppercase tracking-tighter m-4">
6+
<div className="xs:text-4xl sm:text-6xl lg:text-8xl text-outlined text-transparent leading-[145%]">
7+
{text}
8+
</div>
9+
<div className="xs:text-2xl sm:text-4xl lg:text-6xl text-text-light absolute w-full leading-none bottom-[-20%]">
10+
{text}
11+
</div>
12+
</div>
13+
);
14+
}
15+
16+
Heading.propTypes = {
17+
text: PropTypes.string.isRequired,
18+
};
19+
20+
export default Heading;

src/pages/Home/index.jsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
1+
import Heading from "@/components/Heading";
2+
13
function Home() {
2-
return <div>Home</div>;
4+
return (
5+
<>
6+
<div className="bg-background-dark h-screen flex">
7+
<div className="m-auto">
8+
<div className="text-7xl md:text-9xl lg:text-[11rem] text-primary text-center font-gothic uppercase">
9+
Codex, SIT
10+
</div>
11+
<div className="text-lg md:text-2xl lg:text-3xl mt-4 text-text-light text-center">
12+
Coding Club
13+
</div>
14+
</div>
15+
</div>
16+
<Heading text="What do we do?" />
17+
</>
18+
);
319
}
420

521
export default Home;

tailwind.config.js

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,36 @@ export default {
44
theme: {
55
extend: {
66
colors: {
7-
background: '#232323',
8-
primary: '#F24E3F',
9-
text: '#F7F7F7',
7+
primary: {
8+
DEFAULT: "#E76941",
9+
light: "#FFA06D",
10+
dark: "#B54B1E",
11+
contrastText: "#F7F7F7",
12+
},
13+
secondary: {
14+
DEFAULT: "#737373",
15+
light: "#A3A3A3",
16+
dark: "#494949",
17+
},
18+
background: {
19+
dark: "#232323",
20+
light: "#F7F7F7",
21+
},
22+
text: {
23+
light: "#F7F7F7",
24+
dark: "#232323",
25+
}
26+
},
27+
screens: {
28+
xs: "0px",
29+
sm: "600px",
30+
md: "768px",
31+
lg: "1024px",
32+
xl: "1280px",
1033
},
1134
fontFamily: {
12-
sans: ['Roboto', 'sans-serif'],
35+
poppins: ["Poppins", "sans-serif"],
36+
gothic: ["League Gothic", "sans-serif"]
1337
},
1438
},
1539
},

0 commit comments

Comments
 (0)