Skip to content

Commit 55882e4

Browse files
authored
Merge pull request #52 from CodeCafeCommunity/resources-page-poc
[RFC] Resources page proof of concept
2 parents d8f91f4 + 9a048a4 commit 55882e4

File tree

16 files changed

+270
-14
lines changed

16 files changed

+270
-14
lines changed

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
rel="stylesheet"
1818
/>
1919
</head>
20-
<body>
21-
<div id="root" class="bg-primary"></div>
20+
<body class="h-dvh">
21+
<div id="root" class="h-full bg-primary"></div>
2222
<script type="module" src="/src/main.tsx"></script>
2323
</body>
2424
</html>

src/App.tsx

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/components/Layout/Footer.tsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default function Footer() {
77
<div className="footer-container text-primary">
88
<h4 className="flex items-center gap-2 text-xl font-bold">
99
<Code size={48} className="text-primary" />
10-
Code Cafe
10+
Code Café
1111
</h4>
1212
<p className="text-sm">Your home for coding and community</p>
1313
</div>
@@ -25,9 +25,19 @@ export default function Footer() {
2525
<div className="footer-container text-primary">
2626
<h4 className="mb-4 text-xl font-bold">Resources</h4>
2727
<ul className="list-none">
28-
<li className="mb-3 text-sm">Documentation</li>
28+
<li className="mb-3 text-sm">
29+
<Link to="/resources">Resources</Link>
30+
</li>
2931
<li className="mb-3 text-sm">Blog</li>
30-
<li className="mb-3 text-sm">GitHub</li>
32+
<li className="mb-3 text-sm">
33+
<a
34+
href="https://github.com/CodeCafeCommunity/codecafecommunity.github.io"
35+
target="_blank"
36+
rel="noreferrer"
37+
>
38+
GitHub
39+
</a>
40+
</li>
3141
</ul>
3242
</div>
3343
</footer>

src/components/Layout/Header.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default function Header() {
99
src={"/images/coffee_cup.png"}
1010
alt="Code Cafe Logo"
1111
/>
12-
<h1 className="text-3xl text-secondary">Code Cafe</h1>
12+
<h1 className="text-3xl text-secondary">Code Café</h1>
1313
</NavLink>
1414
<nav>
1515
<ul className="flex list-none gap-3 text-secondary">
@@ -23,6 +23,11 @@ export default function Header() {
2323
About Us
2424
</NavLink>
2525
</li>
26+
<li>
27+
<NavLink className="hover:text-accent" to="/resources">
28+
Resources
29+
</NavLink>
30+
</li>
2631
<li>
2732
<NavLink className="hover:text-accent" to="/events">
2833
Events

src/components/Layout/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import { Outlet } from "react-router";
44

55
export default function Layout() {
66
return (
7-
<>
7+
<div className="flex h-full flex-col justify-between">
88
<Header />
99
<Outlet />
1010
<Footer />
11-
</>
11+
</div>
1212
);
1313
}

src/data/resources/css.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"pageName": "CSS Resources",
3+
"entries": [
4+
{
5+
"title": "CSS Official Docs",
6+
"url": "https://developer.mozilla.org/en-US/docs/Web/CSS",
7+
"tags": ["css", "official docs"]
8+
},
9+
{
10+
"title": "Tailwind Official Docs",
11+
"url": "https://tailwindcss.com",
12+
"tags": [
13+
"css",
14+
"official docs",
15+
"tailwind",
16+
"test1",
17+
"test2",
18+
"test3",
19+
"test4",
20+
"test5",
21+
"test6"
22+
]
23+
},
24+
{
25+
"title": "CSS Flexbox Layout Guide",
26+
"url": "https://css-tricks.com/snippets/css/a-guide-to-flexbox/",
27+
"tags": ["css", "cheatsheet"]
28+
}
29+
]
30+
}

src/data/resources/html.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"pageName": "HTML Resources",
3+
"entries": [
4+
{
5+
"title": "HTML Official Docs",
6+
"url": "https://developer.mozilla.org/en-US/docs/Web/HTML",
7+
"tags": ["html", "official docs"]
8+
}
9+
]
10+
}

src/data/resources/javascript.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"pageName": "JavaScript Resources",
3+
"entries": [
4+
{
5+
"title": "JavaScript Official Docs",
6+
"url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript",
7+
"tags": ["javascript", "official docs"]
8+
},
9+
{
10+
"title": "javacript.info",
11+
"url": "https://javascript.info",
12+
"tags": ["javascript", "crash course"]
13+
}
14+
]
15+
}

src/main.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import "./index.css";
55
import Layout from "./components/Layout";
66
import Home from "./routes/Home";
77
import About from "./routes/About";
8+
import Resources from "./routes/Resources";
9+
import ResourcePage from "./routes/Resources/ResourcePage";
810

911
const root = document.getElementById("root");
1012

@@ -16,6 +18,8 @@ if (root) {
1618
<Route element={<Layout />}>
1719
<Route index element={<Home />} />
1820
<Route path="/about" element={<About />} />
21+
<Route path="/resources" element={<Resources />} />
22+
<Route path="/resources/:category" element={<ResourcePage />} />
1923
</Route>
2024
</Routes>
2125
</BrowserRouter>

src/routes/Home/Hero.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export default function Hero() {
22
return (
33
<section
44
id="hero"
5-
className="flex min-h-[8vh] flex-col items-center justify-evenly bg-primary py-8 text-accent"
5+
className="flex flex-col items-center justify-evenly bg-primary py-8 text-accent"
66
>
77
<div className="flex flex-wrap items-center justify-center p-8 text-center lg:p-5 xl:flex-nowrap">
88
<div className="flex flex-col items-center">

0 commit comments

Comments
 (0)