Skip to content

Commit 2e77645

Browse files
authored
Draft main app using VSCode components (#11)
1 parent d6c5758 commit 2e77645

File tree

17 files changed

+1036
-320
lines changed

17 files changed

+1036
-320
lines changed

package-lock.json

Lines changed: 871 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@babel/preset-react": "^7.23.3",
2020
"babel-loader": "^9.1.3",
2121
"css-loader": "^6.10.0",
22-
"csss-raspberry": "github:csss/csss-raspberry#v1.1.0",
22+
"csss-raspberry": "github:csss/csss-raspberry#v2.1.1",
2323
"eslint": "^8.56.0",
2424
"eslint-config-react-app": "^7.0.1",
2525
"eslint-config-semistandard": "^17.0.0",
@@ -29,6 +29,7 @@
2929
"eslint-plugin-promise": "^6.1.1",
3030
"react": "^18.2.0",
3131
"react-dom": "^18.2.0",
32+
"react-router-dom": "^6.23.1",
3233
"serve": "^14.2.1",
3334
"style-loader": "^3.3.4",
3435
"url-loader": "^4.1.1",

public/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<link rel="icon" type="image/png" href="/icons/favicon.png">
88
<script defer="defer" src="/js/main.js"></script>
9+
<script src="https://cdn.tailwindcss.com"></script>
910
</head>
1011
<body>
1112
<noscript>You need to enable JavaScript to run this app.</noscript>

src/main/App.js

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

src/main/components/Header/Container/Container.css

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

src/main/components/Header/Container/index.js

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

src/main/components/Header/Dropdown/Dropdown.css

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

src/main/components/Header/Dropdown/index.js

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

src/main/components/Header/index.js

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

src/main/components/index.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/main/index.css

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

src/main/index.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import React from 'react';
2-
import ReactDOM from 'react-dom/client';
2+
import { createRoot } from 'react-dom/client';
3+
import { createHashRouter, RouterProvider } from 'react-router-dom';
34

4-
import { App } from './App';
5+
import { Home, Profile, NotFound } from './pages';
56

6-
const root = ReactDOM.createRoot(document.getElementById('root'));
7+
const router = createHashRouter([
8+
{ path: '/', element: <Home /> },
9+
{ path: '/profile', element: <Profile /> },
10+
{ path: '*', element: <NotFound /> }
11+
]);
712

8-
root.render(
9-
<React.StrictMode>
10-
<App />
11-
</React.StrictMode>
13+
createRoot(document.getElementById('root')).render(
14+
<RouterProvider router={router} />
1215
);

src/main/pages/Home.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import React from 'react';
2+
import { Page } from './Page.js';
3+
4+
export const Home = () => {
5+
return (
6+
<Page>
7+
<div className="p-4">
8+
<p>
9+
WELCOME TO<br />
10+
THE <b>FUTURE WEBSITE</b><br />
11+
OF THE <b>SIMON FRASER UNIVERSITY</b><br />
12+
<b>COMPUTING SCIENCE STUDENT SOCIETY</b> (CSSS)!<br />
13+
</p>
14+
<p className="text-slate-400">
15+
(Currently under construction.)
16+
</p>
17+
<p className="text-blue-400">
18+
<a href="https://sfucsss.org">
19+
Click here to go see the old site.
20+
</a>
21+
</p>
22+
</div>
23+
</Page>
24+
);
25+
};

0 commit comments

Comments
 (0)