Skip to content

Commit 6386e99

Browse files
feat: add heading component
1 parent 4275d60 commit 6386e99

File tree

6 files changed

+47
-7
lines changed

6 files changed

+47
-7
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"prepare": "husky install"
1414
},
1515
"dependencies": {
16+
"@fontsource/league-gothic": "^5.0.18",
1617
"@fontsource/poppins": "^5.0.8",
1718
"@vitejs/plugin-react": "^4.2.1",
1819
"react": "^18.2.0",

src/assets/styles/index.css

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

68
/* Reset default browser styles */
79
* {
810
margin: 0;
911
padding: 0;
1012
box-sizing: border-box;
13+
font-family: 'poppins', 'sans-serif';
1114
}
1215

1316
a {
1417
text-decoration: none;
1518
color: inherit;
1619
}
20+
21+
.text-outlined {
22+
-webkit-text-stroke-width: 2px;
23+
-webkit-text-stroke-color: #737373;
24+
}

src/components/Heading/index.jsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
function Heading({headingText}) {
2+
return (
3+
<div className="relative text-center font-black uppercase tracking-tighter">
4+
<div className="xs:text-5xl text-[6.5rem] text-outlined text-transparent ">{headingText}</div>
5+
<div className="xs:text-2xl text-[3.75rem] text-foreground absolute w-full bottom-0">{headingText}</div>
6+
</div>
7+
);
8+
}
9+
10+
export default Heading;
11+

src/pages/Home/Hero.jsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
function Hero() {
2+
return (
3+
<div className='bg-background h-screen flex'>
4+
<div className='m-auto'>
5+
<div className="text-7xl md:text-[10rem] text-primary text-center font-gothic uppercase">Codex, SIT</div>
6+
<div className="text-lg md:text-2xl pt-4 text-foreground text-center">Coding Club</div>
7+
</div>
8+
</div>
9+
);
10+
}
11+
12+
export default Hero;

src/pages/Home/index.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
import Hero from './Hero';
2+
13
function Home() {
2-
return <div>Home</div>;
4+
return (
5+
<>
6+
<Hero/>
7+
</>
8+
);
39
}
410

511
export default Home;

tailwind.config.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,19 @@ export default {
66
colors: {
77
background: "#232323",
88
primary: "#E76941",
9-
text: "#F7F7F7",
9+
foreground: "#F7F7F7",
10+
gray: "737373",
1011
},
1112
screens: {
1213
xs: "0px",
1314
sm: "600px",
14-
md: "900px",
15-
lg: "1200",
16-
xl: "1536px",
15+
md: "768px",
16+
lg: "1024px",
17+
xl: "1280px",
1718
},
1819
fontFamily: {
19-
poppins: ['Poppins', 'sans-serif'],
20+
poppins: ["Poppins", "sans-serif"],
21+
gothic: ["League Gothic", "sans-serif"]
2022
},
2123
},
2224
},

0 commit comments

Comments
 (0)