From 6dd7bd4a37ca676fed86aa5449906d718f74722c Mon Sep 17 00:00:00 2001 From: qingruil Date: Tue, 25 Oct 2022 23:06:30 -0700 Subject: [PATCH 1/4] Add test --- test.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 test.txt diff --git a/test.txt b/test.txt new file mode 100644 index 0000000..4a1ec01 --- /dev/null +++ b/test.txt @@ -0,0 +1 @@ +It is a test. From a176e5c8286ec1ac3c4b8fb13ec7764226690980 Mon Sep 17 00:00:00 2001 From: qingruil Date: Tue, 25 Oct 2022 23:08:26 -0700 Subject: [PATCH 2/4] delete test --- test.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 test.txt diff --git a/test.txt b/test.txt deleted file mode 100644 index 4a1ec01..0000000 --- a/test.txt +++ /dev/null @@ -1 +0,0 @@ -It is a test. From 860aa580f146fe531d063341341c89ee2b7d1e90 Mon Sep 17 00:00:00 2001 From: Sanyam Singh Date: Wed, 9 Nov 2022 09:36:05 -0800 Subject: [PATCH 3/4] Topic List view --- .sample-env | 16 +- components/Button.js | 14 + components/Button.module.css | 42 + components/HomePageComponent.js | 53 + components/LoginComponent.js | 3 +- components/NavComponent.js | 13 + context/Pages.js | 1 + firebase.js | 17 +- package-lock.json | 1092 +++++-- package.json | 9 +- pages/_app.js | 1 - pages/index.js | 4 + styles/globals.css | 3 +- yarn.lock | 4997 ++++++++++++++++--------------- 14 files changed, 3640 insertions(+), 2625 deletions(-) create mode 100644 components/Button.js create mode 100644 components/Button.module.css create mode 100644 components/HomePageComponent.js diff --git a/.sample-env b/.sample-env index 3a9f91f..6bf7d4b 100644 --- a/.sample-env +++ b/.sample-env @@ -1,9 +1,9 @@ -NEXT_PUBLIC_FIREBASE_API_KEY= -NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN= -NEXT_PUBLIC_FIREBASE_DATABASE_URL= -NEXT_PUBLIC_FIREBASE_PROJECT_ID= -NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET= -NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID= -NEXT_PUBLIC_FIREBASE_APP_ID= -NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID= +NEXT_PUBLIC_FIREBASE_API_KEY="AIzaSyCqT9M3yFddNtVe2i7vsiQCiqXjMn3a-sA" +NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=cmpt415-59e14.firebaseapp.com +NEXT_PUBLIC_FIREBASE_DATABASE_URL=https://cmpt415-59e14-default-rtdb.firebaseio.com/ +NEXT_PUBLIC_FIREBASE_PROJECT_ID=cmpt415-59e14 +NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=cmpt415-59e14.appspot.com +NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=217450358131 +NEXT_PUBLIC_FIREBASE_APP_ID=1:217450358131:web:d11779aac8d8cc3dc85106 +NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=G-LT3MBTXZDZ NEXT_PUBLIC_RAPIDAPI_KEY= \ No newline at end of file diff --git a/components/Button.js b/components/Button.js new file mode 100644 index 0000000..dba4278 --- /dev/null +++ b/components/Button.js @@ -0,0 +1,14 @@ +import styles from './Button.module.css' + +export function Button() { + return ( + + ) +} \ No newline at end of file diff --git a/components/Button.module.css b/components/Button.module.css new file mode 100644 index 0000000..dfc5e5e --- /dev/null +++ b/components/Button.module.css @@ -0,0 +1,42 @@ + +.box +{ + width: 330px; +} +.box h2 +{ + color: #f6f6f6; + background: #f60000; + padding: 20px 50px; + font-size: 20px; + font-weight: 700; + border-top-left-radius: 20px; + border-top-right-radius: 20px; + margin-left: 35px; +} + +.box ul +{ + position: relative; + background: #fff; +} + +.box ul li +{ + list-style: none; + padding: 50px; + width: 300px; + background: #fff; + box-shadow: 0 5px 25px rgba(0,0,0,.1); + transition: transform 0.5s; +} + +.box ul li:hover +{ + transform: scale(1,1); + z-index: 100; + background: #25c1ff; + box-shadow: 0 5px 25px rgba(0,0,0,.1); + color: #fff; +} + diff --git a/components/HomePageComponent.js b/components/HomePageComponent.js new file mode 100644 index 0000000..21ebbd2 --- /dev/null +++ b/components/HomePageComponent.js @@ -0,0 +1,53 @@ +import Editor from "@monaco-editor/react" +import { useRef, useState, useContext, useEffect } from 'react' +import Context from '../context/Context' +import axios from 'axios' +import styles from './Button.module.css' + +import CircularProgress from '@material-ui/core/CircularProgress'; + +export default function HomePageComponent(props) { + + const containerStyles = { + height: 20, + width: '100%', + backgroundColor: "#e0e0de", + borderRadius: 50, + margin: 50 + } + + const fillerStyles = { + height: '100%', + width: `67%`, + backgroundColor: 'red', + borderRadius: 'inherit', + textAlign: 'right' + } + + const labelStyles = { + padding: 5, + color: 'white', + fontWeight: 'bold' + } + + + return ( + +
+ +

Introduction to programming



+
+
+ +

+
    +
  • Conditonal Statement
  • +
  • Topic Two
  • +
  • Topic Three
  • +
  • Topic Four
  • +
  • Topic Five
  • +
  • Topic Six
  • +
+
+ ) +} \ No newline at end of file diff --git a/components/LoginComponent.js b/components/LoginComponent.js index 3b00778..0497ac3 100644 --- a/components/LoginComponent.js +++ b/components/LoginComponent.js @@ -88,7 +88,8 @@ function LoginComponent(props) { const email = signUpEmailRef.current.value const password = signUpPasswordRef.current.value const passwordRepeat = signUpPasswordConfirmRef.current.value - + console.log('auth:') + console.log(auth) if (validateSignUp({ name, email, password, passwordRepeat })) { createUserWithEmailAndPassword(auth, email, password) .then(() => { diff --git a/components/NavComponent.js b/components/NavComponent.js index 364838b..cce56c7 100644 --- a/components/NavComponent.js +++ b/components/NavComponent.js @@ -43,6 +43,16 @@ export default function NavComponent(props) { setPage(Pages.PROFILE) } + /** + * Handles the user's profile being opened. + * @param {*} e + */ + const handleHomeClick = (e) => { + e.preventDefault() + setOpenedModule(null) + setPage(Pages.Home) + } + /** * Handles the discussion board being opened. * @param {*} e @@ -87,6 +97,9 @@ export default function NavComponent(props) { navBarContents = (