Skip to content

Commit bfcf8a1

Browse files
committed
stupid upgrade not working
1 parent 6025ecf commit bfcf8a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+6859
-9341
lines changed

.github/workflows/deploy.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,20 @@ jobs:
1010
matrix:
1111
node-version: [12.x]
1212
steps:
13-
- uses: actions/checkout@v1
14-
- name: Install Packages
15-
uses: borales/[email protected]
13+
- name: Check out repository
14+
uses: actions/checkout@v2
15+
- name: Install packages
16+
uses: borales/[email protected]
1617
with:
1718
cmd: install
1819
- name: Build page
19-
uses: borales/actions-yarn@v2.0.0
20+
uses: borales/actions-yarn@v2.3.0
2021
with:
2122
cmd: build
2223
env:
2324
CI: ""
2425
- name: Deploy to gh-pages
25-
uses: peaceiris/actions-gh-pages@v3
26+
uses: JamesIves/github-pages[email protected]
2627
with:
27-
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
28-
publish_dir: ./build
28+
branch: gh-pages
29+
folder: build

package.json

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,38 @@
44
"private": true,
55
"homepage": "https://stanfordpython.com",
66
"dependencies": {
7-
"@testing-library/jest-dom": "^4.2.4",
8-
"@testing-library/react": "^9.5.0",
9-
"@testing-library/user-event": "^7.2.1",
10-
"@types/bootstrap": "^4.5.0",
11-
"@types/node": "^14.6.4",
12-
"@types/react": "^16.9.49",
13-
"@types/react-dom": "^16.9.8",
14-
"@types/react-html-parser": "^2.0.1",
15-
"@types/react-router-dom": "^5.1.5",
16-
"@types/react-syntax-highlighter": "^11.0.5",
17-
"@types/uslug": "^1.0.0",
18-
"bootstrap": "^4.5.0",
7+
"@testing-library/jest-dom": "^5.16.2",
8+
"@testing-library/react": "^12.1.4",
9+
"@testing-library/user-event": "^13.5.0",
10+
"@types/bootstrap": "^5.1.9",
11+
"@types/node": "^17.0.22",
12+
"@types/react": "^17.0.41",
13+
"@types/react-dom": "^17.0.14",
14+
"@types/react-html-parser": "^2.0.2",
15+
"@types/react-router-bootstrap": "^0.24.5",
16+
"@types/react-router-dom": "^5.3.3",
17+
"@types/react-syntax-highlighter": "^13.5.2",
18+
"@types/uslug": "^1.0.1",
19+
"bootstrap": "^5.1.3",
20+
"buffer": "^6.0.3",
1921
"esnext": "^3.3.1",
20-
"gh-pages": "^3.1.0",
22+
"gh-pages": "^3.2.3",
2123
"markdown-toc-unlazy": "^1.0.1",
2224
"moment": "^2.27.0",
23-
"react": "^16.13.1",
24-
"react-bootstrap": "^1.2.2",
25-
"react-dom": "^16.13.1",
25+
"react": "^17.0.2",
26+
"react-bootstrap": "^2.2.1",
27+
"react-dom": "^17.0.2",
2628
"react-html-parser": "^2.0.2",
27-
"react-markdown": "^4.3.1",
28-
"react-player": "^2.6.0",
29-
"react-router-bootstrap": "^0.25.0",
30-
"react-router-dom": "^5.2.0",
31-
"react-scripts": "^3.4.3",
32-
"react-syntax-highlighter": "^13.5.1",
33-
"react-youtube": "^7.11.3",
29+
"react-markdown": "^8.0.1",
30+
"react-player": "^2.10.0",
31+
"react-router-bootstrap": "^0.26.1",
32+
"react-router-dom": "^6.2.2",
33+
"react-scripts": "^5.0.0",
34+
"react-syntax-highlighter": "^15.5.0",
35+
"react-youtube": "^7.14.0",
3436
"remarkable": "^2.0.1",
35-
"styled-components": "^5.1.1",
36-
"typescript": "^4.0.2",
37+
"styled-components": "^5.3.3",
38+
"typescript": "^4.6.2",
3739
"uslug": "^1.0.4"
3840
},
3941
"scripts": {
@@ -58,5 +60,8 @@
5860
"last 1 firefox version",
5961
"last 1 safari version"
6062
]
63+
},
64+
"resolutions": {
65+
"react-error-overlay": "6.0.9"
6166
}
6267
}
-204 KB
Binary file not shown.

public/lab/Lab3_try_except.key

-492 KB
Binary file not shown.

public/lab/Lab3_try_except.pdf

-54.5 KB
Binary file not shown.

public/lab/inheritance.pdf

-147 KB
Binary file not shown.

public/lab/inheritance.pptx

-640 KB
Binary file not shown.

public/lab/lab5-deployment.pdf

-137 KB
Binary file not shown.

public/lecture/1.1-condensed.pdf

-429 KB
Binary file not shown.

public/lecture/1.1-full.pdf

-602 KB
Binary file not shown.

public/lecture/1.2-condensed.pdf

-486 KB
Binary file not shown.

public/lecture/1.2-full.pdf

-584 KB
Binary file not shown.

public/lecture/2-condensed.pdf

-505 KB
Binary file not shown.

public/lecture/2-full.pdf

-804 KB
Binary file not shown.

public/lecture/3-condensed.pdf

-275 KB
Binary file not shown.

public/lecture/3-full.pdf

-318 KB
Binary file not shown.

public/lecture/4-condensed.pdf

-2.18 MB
Binary file not shown.

public/lecture/4-full.pdf

-2.18 MB
Binary file not shown.

public/lecture/5-condensed.pdf

-16 MB
Binary file not shown.

public/lecture/5-full.pdf

-16.2 MB
Binary file not shown.

public/lecture/6-code.zip

-2.19 KB
Binary file not shown.

public/lecture/6-condensed.pdf

-4.98 MB
Binary file not shown.

public/lecture/6-full.pdf

-4.98 MB
Binary file not shown.

public/lecture/7-condensed.pdf

-4.81 MB
Binary file not shown.

public/lecture/7-full.pdf

-4.81 MB
Binary file not shown.

public/lecture/9-condensed.pdf

-102 KB
Binary file not shown.

public/lecture/9-full.pdf

-139 KB
Binary file not shown.

public/lecture/lecture-9.zip

-2.31 MB
Binary file not shown.

src/App.tsx

Lines changed: 0 additions & 36 deletions
This file was deleted.
File renamed without changes.

src/App/App.tsx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import React, { FunctionComponent } from "react";
2+
import { Routes, HashRouter, Route } from "react-router-dom";
3+
4+
import "./App.css";
5+
6+
import Page from "../Page";
7+
import Layout from "../Layout";
8+
import NavigationBar from "../NavigationBar";
9+
10+
import Home from "../Page/Home";
11+
import Lectures from "../Page/Lectures";
12+
import Labs from "../Page/Labs";
13+
import Assignments from "../Page/Assignments";
14+
import NoMatch from "../Page/NoMatch";
15+
16+
const App: FunctionComponent = () => {
17+
return (
18+
<React.Fragment>
19+
<HashRouter>
20+
<NavigationBar />
21+
<Layout>
22+
<Routes>
23+
<Route path="/" element={<Home />} />
24+
<Route path="/lectures" element={<Lectures />} />
25+
<Route path="/labs" element={<Labs />} />
26+
<Route path="/assignments" element={<Assignments />} />
27+
<Route path="/page/:slug+" element={<Page />}/>
28+
<Route element={<NoMatch />}/>
29+
</Routes>
30+
</Layout>
31+
</HashRouter>
32+
</React.Fragment>
33+
);
34+
}
35+
36+
export default App;

src/App/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from './App';

src/Layout.js

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

src/Layout/Layout.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import React, { PropsWithChildren } from 'react';
2+
import { Container } from 'react-bootstrap';
3+
4+
const Layout = (props: PropsWithChildren<{}>) => (
5+
<Container className='mt-2'>
6+
{props.children}
7+
</Container>
8+
)
9+
10+
export default Layout;

src/Layout/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from './Layout';

src/NavigationBar.js renamed to src/NavigationBar/NavigationBar.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import React, { useState } from 'react';
1+
import React, { PropsWithChildren, useState } from 'react';
22
import { Nav, Navbar } from 'react-bootstrap';
33
import { LinkContainer } from 'react-router-bootstrap';
44

5-
export const NavigationBar = () => {
5+
const NavigationBar = () => {
66
const [expanded, setExpanded] = useState(false);
77

88
return (
@@ -27,10 +27,12 @@ export const NavigationBar = () => {
2727
);
2828
}
2929

30-
const RouterNavLink = ({ children, ...props }) => (
31-
<LinkContainer exact {...props}>
30+
const RouterNavLink = ({ children, ...props }: PropsWithChildren<{ to: string }>) => (
31+
<LinkContainer {...props}>
3232
<Nav.Link active={false}>
3333
{children}
3434
</Nav.Link>
3535
</LinkContainer>
36-
)
36+
)
37+
38+
export default NavigationBar;

src/NavigationBar/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from './NavigationBar';

src/components/AssignmentTable.tsx renamed to src/Page/Assignments/AssignmentTable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ interface AssignmentDataState {
6767
assignmentData?: Array<AssignmentRowProps>
6868
}
6969

70-
export class AssignmentData extends Component<{}, AssignmentDataState> {
70+
export default class AssignmentData extends Component<{}, AssignmentDataState> {
7171
constructor(props: {}) {
7272
super(props);
7373

@@ -77,7 +77,7 @@ export class AssignmentData extends Component<{}, AssignmentDataState> {
7777
}
7878

7979
componentDidMount() {
80-
let assignmentData = require("../res/assignments.json");
80+
let assignmentData = require("../../res/assignments.json");
8181
assignmentData = assignmentData.map(
8282
<AssignmentRowProps,> ({ due, ...v }: {due: string}) => {
8383
return {

src/pages/Assignments.tsx renamed to src/Page/Assignments/Assignments.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { FunctionComponent } from "react";
22

3-
// import { AssignmentData } from "../components/AssignmentTable";
3+
import AssignmentTable from "./AssignmentTable";
44

55
const Assignments: FunctionComponent = () => (
66
<div className="assignments">
@@ -15,7 +15,7 @@ const Assignments: FunctionComponent = () => (
1515
material, so enjoy! We hope you have fun completing these
1616
assignments.
1717
</p>
18-
{/* <AssignmentData />*/}
18+
<AssignmentTable />
1919
</div>
2020
);
2121

src/Page/Assignments/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from "./Assignments"

src/components/CodeBlock.tsx renamed to src/Page/CodeBlock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ const CodeBlock: FunctionComponent<CodeProps> =
1818
)
1919
}
2020

21-
export default CodeBlock;
21+
export default CodeBlock;

src/components/CourseInfo.tsx renamed to src/Page/Home/CourseInfo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { FunctionComponent } from "react";
2-
import courseInfoLinks from "../res/courseInfoLinks.json";
2+
import courseInfoLinks from "../../res/courseInfoLinks.json";
33

44
function obfuscate( name: string, domain:string, em_name:string ) {
55
// Citation: Dan Jurafsky for this function.

src/pages/Home.tsx renamed to src/Page/Home/Home.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React, { FunctionComponent } from "react";
22

3-
// import { Schedule } from "../components/Schedule";
4-
import SiteHeader from "../components/SiteHeader";
5-
import CourseInfo from "../components/CourseInfo";
3+
import Schedule from "./Schedule";
4+
import SiteHeader from "./SiteHeader";
5+
import CourseInfo from "./CourseInfo";
66

77
const Home: FunctionComponent = () => (
88
<div className="home">

0 commit comments

Comments
 (0)