forked from Open-Science-Community-Saudi-Arabia/MOOCs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Open-Science-Community-Saudi-Arabia#146 from Open-…
…Science-Community-Saudi-Arabia/dev Merge the dev into the main for 1st prototype
- Loading branch information
Showing
108 changed files
with
15,088 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# node node_modules | ||
/node_modules/* | ||
|
||
#build artefacts | ||
dist/* | ||
build/* | ||
coverage/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
node: true, | ||
}, | ||
extends: ["plugin:react/recommended", "airbnb", "prettier"], | ||
overrides: [], | ||
parserOptions: { | ||
ecmaVersion: "latest", | ||
sourceType: "module", | ||
}, | ||
plugins: ["react", "prettier"], | ||
rules: { | ||
"prettier/prettier": ["error"], | ||
"no-unused-vars": "warn", | ||
"react/no-unescaped-entities": 0, | ||
"jsx-a11y/anchor-is-valid": 0, | ||
"react/button-has-type": 0, | ||
"react/self-closing-comp": "warn", | ||
"import/newline-after-import": "warn", | ||
"import/order": "warn", | ||
"no-console": "warn", | ||
"camelcase":"off", | ||
'react/jsx-props-no-spreading': 'off', | ||
'react/no-array-index-key':'off', | ||
'import/prefer-default-export':'off', | ||
'jsx-a11y/click-events-have-key-events':'off', | ||
'jsx-a11y/no-static-element-interactions':'off', | ||
'react/prop-types': ['off'], | ||
'react/jsx-no-constructed-context-values': 'off' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
cd Frontend | ||
yarn lint-staged | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
# include other rules here eg. unit tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!include:../.gitignore | ||
node_modules/ | ||
|
||
# html files | ||
*.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"printWidth": 100, | ||
"trailingComma": "all", | ||
"tabWidth": 2, | ||
"semi": false, | ||
"singleQuote": false, | ||
"arrowParens": "always", | ||
"requirePragma": true, | ||
"endOfLine": "lf", | ||
"overrides": [ | ||
{ | ||
"files": "*.json", | ||
"options": { | ||
"singleQuote": false | ||
} | ||
}, | ||
{ | ||
"files": ".*rc", | ||
"options": { | ||
"singleQuote": false, | ||
"parser": "json" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
<link href="https://fonts.googleapis.com/css2?family=Lato&display=swap" rel="stylesheet" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
|
||
<!-- Google Signup/signin script --> | ||
<script src="https://accounts.google.com/gsi/client" async defer></script> | ||
|
||
<title>Vite + React</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.jsx"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
'*.{js,jsx}': ['yarn lint'], | ||
'*.{js,json,css,jsx}': ['yarn format'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"name": "oscsa", | ||
"private": true, | ||
"version": "0.0.0", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build", | ||
"preview": "vite preview", | ||
"lint": "eslint --fix", | ||
"lint:fix": "eslint --fix */**/*.{jsx,js,tsx} --color", | ||
"lint:check": "eslint */**/*.{jsx,js,tsx} --color", | ||
"prettier": "prettier .", | ||
"format": "prettier --write", | ||
"format:fix": "yarn prettier -- --write", | ||
"format:check": "yarn prettier -- --check", | ||
"prepare": "cd .. && husky install Frontend/.husky", | ||
"lint-staged": "lint-staged --config lint-staged.config.js" | ||
}, | ||
"dependencies": { | ||
"@vitejs/plugin-react": "^2.1.0", | ||
"axios": "^1.1.3", | ||
"gapi-script": "^1.2.0", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-google-login": "^5.2.2", | ||
"react-icons": "^4.6.0", | ||
"react-router-dom": "^6.4.2", | ||
"react-slick": "^0.29.0", | ||
"react-toastify": "^9.1.1", | ||
"slick-carousel": "^1.8.1", | ||
"vite": "^3.1.0" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^18.0.17", | ||
"@types/react-dom": "^18.0.6", | ||
"eslint": "^7.32.0 || ^8.2.0", | ||
"eslint-config-airbnb": "^19.0.4", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-import": "^2.25.3", | ||
"eslint-plugin-jsx-a11y": "^6.5.1", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-react": "^7.28.0", | ||
"eslint-plugin-react-hooks": "^4.3.0", | ||
"husky": "^8.0.1", | ||
"lint-staged": "^13.0.3", | ||
"prettier": "^2.7.1", | ||
"sass": "^1.56.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* /index.html 200 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from "react" | ||
import "./styles/GlobalStyles.scss" | ||
import { Routes, Route } from "react-router-dom" | ||
import LandingPage from "./pages/landing-page/LandingPage" | ||
import Login from "./pages/auth/login" | ||
import Signup from "./pages/auth/signup" | ||
import Dashboard from "./pages/Dashboard" | ||
import {AppProvider} from "./context"; | ||
import ResetPassword from "./pages/auth/password/reset-password"; | ||
import ForgotPassword from "./pages/auth/password/forgotpassword"; | ||
|
||
function App() { | ||
|
||
return ( | ||
|
||
<Routes> | ||
<Route path="/" element={<LandingPage />} /> | ||
<Route path="/login" element={<Login />} /> | ||
<Route path="/signup" element={<Signup />} /> | ||
<Route path="/resetpassword" element={<ResetPassword />} /> | ||
<Route path="/forgotpassword" element={<ForgotPassword />} /> | ||
<Route path="/dashboard" | ||
element={ <AppProvider><Dashboard /></AppProvider>} | ||
/> | ||
|
||
</Routes>) | ||
} | ||
|
||
export default App | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import React from "react"; | ||
import './Carousel.scss' | ||
import Slider from 'react-slick' | ||
import "slick-carousel/slick/slick.css"; | ||
import "slick-carousel/slick/slick-theme.css"; | ||
import LeftArrow from '../vectors/LeftArrow' | ||
import RightArrow from '../vectors/RightArrow' | ||
|
||
function Carousel({children}) { | ||
const settings = { | ||
infinite:true, | ||
speed: 500, | ||
slidesToShow: 4, | ||
slidesToScroll: 1, | ||
initialSlide: 0, | ||
nextArrow: <SampleNextArrow />, | ||
prevArrow: <SamplePreviousArrow />, | ||
responsive: [ | ||
{ | ||
breakpoint: 1024, | ||
settings: { | ||
slidesToShow: 3, | ||
slidesToScroll: 3, | ||
infinite: true, | ||
dots: true | ||
} | ||
}, | ||
{ | ||
breakpoint: 768, | ||
settings: { | ||
slidesToShow: 2, | ||
slidesToScroll: 2, | ||
initialSlide: 2 | ||
} | ||
}, | ||
{ | ||
breakpoint: 425, | ||
settings: { | ||
slidesToShow: 1, | ||
slidesToScroll: 1 | ||
} | ||
} | ||
] | ||
} | ||
return ( | ||
<Slider {...settings} className='carosel'> | ||
{children} | ||
</Slider> | ||
) | ||
} | ||
|
||
export default Carousel | ||
|
||
function SampleNextArrow({ | ||
onClick, | ||
}) { | ||
return ( | ||
<div | ||
className=" next " | ||
onClick={onClick} | ||
> | ||
|
||
<RightArrow/> | ||
</div> | ||
); | ||
} | ||
|
||
function SamplePreviousArrow({ | ||
onClick, | ||
}) { | ||
return ( | ||
<div | ||
className="prev" | ||
onClick={onClick} | ||
> | ||
<LeftArrow/> | ||
</div> | ||
); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.slick-list { | ||
margin: 0 -10px; | ||
} | ||
|
||
.slick-slide>div { | ||
margin: 0 15px; | ||
} |
Oops, something went wrong.