diff --git a/components/Curriculum/SubjCard.js b/components/Curriculum/SubjCard.js index 182e24cc..47079871 100644 --- a/components/Curriculum/SubjCard.js +++ b/components/Curriculum/SubjCard.js @@ -1,11 +1,46 @@ import styles from "@styles/scss/subjcard.module.scss"; import Link from "next/link"; +import Avatar from '@mui/material/Avatar'; +// import InitialsAvatar from /'react-initials-avatar'; +// import 'react-initials-avatar/lib/ReactInitialsAvatar.css'; + +function stringToColor(string) { + let hash = 0; + let i; + + /* eslint-disable no-bitwise */ + for (i = 0; i < string.length; i += 1) { + hash = string.charCodeAt(i) + ((hash << 5) - hash); + } + + let color = '#'; + + for (i = 0; i < 3; i += 1) { + const value = (hash >> (i * 8)) & 0xff; + color += `00${value.toString(16)}`.slice(-2); + } + /* eslint-enable no-bitwise */ + + return color; +} + +function stringAvatar(name) { + return { + sx: { + bgcolor: stringToColor(name), + }, + children: `${name.split(' ')[0][0]}${name.split(' ')[0][1]}`, + }; +} const SubjCard = ({ details }) => { + return (
- {/* */} +
+ +
{details.name}
diff --git a/components/common/Navbar.js b/components/common/Navbar.js index eb20f087..85b6c5df 100644 --- a/components/common/Navbar.js +++ b/components/common/Navbar.js @@ -220,17 +220,17 @@ const Navbar = () => { onClick={() => setDropdown(false)} className={styles.dropdownLink} > - B.Tech + B.Tech/B.E
  • - + setDropdown(false)} className={styles.dropdownLink} > - BE + MBBS
  • diff --git a/data/semData.js b/data/semData.js index 1015180c..860c5475 100644 --- a/data/semData.js +++ b/data/semData.js @@ -1,3 +1,4 @@ + export const firstYearSems = [ { name: null, @@ -5,7 +6,7 @@ export const firstYearSems = [ { name: "Applied Mathematics 1", slug: "applied-mathematics-1", - img: null, + // img:( ), linkToPage: "/courses/btech/first-year/applied-mathematics-1", }, { diff --git a/package.json b/package.json index ce3c36df..a7875a78 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,13 @@ "lint": "next lint" }, "dependencies": { + "@emotion/react": "^11.11.4", + "@emotion/styled": "^11.11.5", "@fortawesome/fontawesome-svg-core": "^1.2.36", "@fortawesome/free-brands-svg-icons": "^5.15.4", "@fortawesome/free-solid-svg-icons": "^5.15.4", "@fortawesome/react-fontawesome": "^0.2.0", + "@mui/material": "^5.15.18", "aos": "^2.3.4", "axios": "^0.27.2", "bcryptjs": "^2.4.3", diff --git a/pages/courses/btech/first-year/[subject].js b/pages/courses/btech/ChemicalEngineering/[subject].js similarity index 100% rename from pages/courses/btech/first-year/[subject].js rename to pages/courses/btech/ChemicalEngineering/[subject].js diff --git a/pages/courses/btech/ChemicalEngineering/index.js b/pages/courses/btech/ChemicalEngineering/index.js new file mode 100644 index 00000000..3d8f86f3 --- /dev/null +++ b/pages/courses/btech/ChemicalEngineering/index.js @@ -0,0 +1,50 @@ +import Footer from "components/common/Footer"; +import Header from "components/common/Header/Header"; +import Sems from "components/Curriculum/Sems"; +import { firstYearSems } from "data/semData"; +import styles from '@styles/Home.module.css'; +const ComputerEngineering = () => { + return ( +
    +
    +
    +

    First Year

    + /
    + + {/* second yr */} +
    +

    Second Year

    + /
    + + {/* third Year*/} +
    +

    Third Year

    + /
    + + {/* fourth */} +
    +

    Fourth Year

    + /
    + +
    + ); +}; + +export default ComputerEngineering; diff --git a/pages/courses/btech/CivilEngineering/[subject].js b/pages/courses/btech/CivilEngineering/[subject].js new file mode 100644 index 00000000..9933c5a5 --- /dev/null +++ b/pages/courses/btech/CivilEngineering/[subject].js @@ -0,0 +1,68 @@ +import Subject from "components/Curriculum/Subject"; +import { getSubjectPages } from "data/semData"; + +export const getStaticPaths = async () => { + const paths = [ + { + params: { + subject: "applied-mathematics-1", + }, + }, + { + params: { + subject: "applied-chemistry", + }, + }, + { + params: { + subject: "thermo-dynamics", + }, + }, + { + params: { + subject: "electrical-engineering", + }, + }, + { + params: { + subject: "environmental-studies", + }, + }, + { + params: { + subject: "applied-chemistry-lab", + }, + }, + { + params: { + subject: "computer-programming-lab", + }, + }, + ]; + + return { + paths, + fallback: false, + }; +}; + +export const getStaticProps = async (context) => { + let subject = context.params.subject; + const data = getSubjectPages(subject); + + if (data == null || data == undefined) { + return { notFound: true }; + } + + return { props: { data } }; +}; + +const GeneralSubject = ({ data }) => { + return ( + <> + + + ); +}; + +export default GeneralSubject; diff --git a/pages/courses/btech/CivilEngineering/index.js b/pages/courses/btech/CivilEngineering/index.js new file mode 100644 index 00000000..2bcccd34 --- /dev/null +++ b/pages/courses/btech/CivilEngineering/index.js @@ -0,0 +1,50 @@ +import Footer from "components/common/Footer"; +import Header from "components/common/Header/Header"; +import Sems from "components/Curriculum/Sems"; +import { firstYearSems } from "data/semData"; +import styles from '@styles/Home.module.css'; +const ComputerEngineering = () => { + return ( +
    +
    +
    +

    First Year

    + /
    + + {/* second yr */} +
    +

    Second Year

    + /
    + + {/* third Year*/} +
    +

    Third Year

    + /
    + + {/* fourth */} +
    +

    Fourth Year

    + /
    + +
    +
    + ); +}; + +export default ComputerEngineering; diff --git a/pages/courses/btech/ComputerEngineering/[subject].js b/pages/courses/btech/ComputerEngineering/[subject].js new file mode 100644 index 00000000..9933c5a5 --- /dev/null +++ b/pages/courses/btech/ComputerEngineering/[subject].js @@ -0,0 +1,68 @@ +import Subject from "components/Curriculum/Subject"; +import { getSubjectPages } from "data/semData"; + +export const getStaticPaths = async () => { + const paths = [ + { + params: { + subject: "applied-mathematics-1", + }, + }, + { + params: { + subject: "applied-chemistry", + }, + }, + { + params: { + subject: "thermo-dynamics", + }, + }, + { + params: { + subject: "electrical-engineering", + }, + }, + { + params: { + subject: "environmental-studies", + }, + }, + { + params: { + subject: "applied-chemistry-lab", + }, + }, + { + params: { + subject: "computer-programming-lab", + }, + }, + ]; + + return { + paths, + fallback: false, + }; +}; + +export const getStaticProps = async (context) => { + let subject = context.params.subject; + const data = getSubjectPages(subject); + + if (data == null || data == undefined) { + return { notFound: true }; + } + + return { props: { data } }; +}; + +const GeneralSubject = ({ data }) => { + return ( + <> + + + ); +}; + +export default GeneralSubject; diff --git a/pages/courses/btech/ComputerEngineering/index.js b/pages/courses/btech/ComputerEngineering/index.js new file mode 100644 index 00000000..01c8dc19 --- /dev/null +++ b/pages/courses/btech/ComputerEngineering/index.js @@ -0,0 +1,50 @@ +import Footer from "components/common/Footer"; +import Header from "components/common/Header/Header"; +import Sems from "components/Curriculum/Sems"; +import { firstYearSems } from "data/semData"; +import styles from '@styles/Home.module.css'; +const ComputerEngineering = () => { + return ( +
    +
    +
    +

    First Year

    + /
    + + {/* second yr */} +
    +

    Second Year

    + /
    + + {/* third Year*/} +
    +

    Third Year

    + /
    + + {/* fourth */} +
    +

    Fourth Year

    + /
    + +
    +
    + ); +}; + +export default ComputerEngineering; diff --git a/pages/courses/btech/EceEngineering/[subject].js b/pages/courses/btech/EceEngineering/[subject].js new file mode 100644 index 00000000..9933c5a5 --- /dev/null +++ b/pages/courses/btech/EceEngineering/[subject].js @@ -0,0 +1,68 @@ +import Subject from "components/Curriculum/Subject"; +import { getSubjectPages } from "data/semData"; + +export const getStaticPaths = async () => { + const paths = [ + { + params: { + subject: "applied-mathematics-1", + }, + }, + { + params: { + subject: "applied-chemistry", + }, + }, + { + params: { + subject: "thermo-dynamics", + }, + }, + { + params: { + subject: "electrical-engineering", + }, + }, + { + params: { + subject: "environmental-studies", + }, + }, + { + params: { + subject: "applied-chemistry-lab", + }, + }, + { + params: { + subject: "computer-programming-lab", + }, + }, + ]; + + return { + paths, + fallback: false, + }; +}; + +export const getStaticProps = async (context) => { + let subject = context.params.subject; + const data = getSubjectPages(subject); + + if (data == null || data == undefined) { + return { notFound: true }; + } + + return { props: { data } }; +}; + +const GeneralSubject = ({ data }) => { + return ( + <> + + + ); +}; + +export default GeneralSubject; diff --git a/pages/courses/btech/EceEngineering/index.js b/pages/courses/btech/EceEngineering/index.js new file mode 100644 index 00000000..b1130427 --- /dev/null +++ b/pages/courses/btech/EceEngineering/index.js @@ -0,0 +1,50 @@ +import Footer from "components/common/Footer"; +import Header from "components/common/Header/Header"; +import Sems from "components/Curriculum/Sems"; +import { firstYearSems } from "data/semData"; +import styles from '@styles/Home.module.css'; +const ComputerEngineering = () => { + return ( +
    +
    +
    +

    First Year

    + /
    + + {/* second yr */} +
    +

    Second Year

    + /
    + + {/* third Year*/} +
    +

    Third Year

    + /
    + + {/* fourth */} +
    +

    Fourth Year

    + /
    + +
    +
    + ); +}; + +export default ComputerEngineering; diff --git a/pages/courses/btech/ElectricalEngineering/[subject].js b/pages/courses/btech/ElectricalEngineering/[subject].js new file mode 100644 index 00000000..9933c5a5 --- /dev/null +++ b/pages/courses/btech/ElectricalEngineering/[subject].js @@ -0,0 +1,68 @@ +import Subject from "components/Curriculum/Subject"; +import { getSubjectPages } from "data/semData"; + +export const getStaticPaths = async () => { + const paths = [ + { + params: { + subject: "applied-mathematics-1", + }, + }, + { + params: { + subject: "applied-chemistry", + }, + }, + { + params: { + subject: "thermo-dynamics", + }, + }, + { + params: { + subject: "electrical-engineering", + }, + }, + { + params: { + subject: "environmental-studies", + }, + }, + { + params: { + subject: "applied-chemistry-lab", + }, + }, + { + params: { + subject: "computer-programming-lab", + }, + }, + ]; + + return { + paths, + fallback: false, + }; +}; + +export const getStaticProps = async (context) => { + let subject = context.params.subject; + const data = getSubjectPages(subject); + + if (data == null || data == undefined) { + return { notFound: true }; + } + + return { props: { data } }; +}; + +const GeneralSubject = ({ data }) => { + return ( + <> + + + ); +}; + +export default GeneralSubject; diff --git a/pages/courses/btech/ElectricalEngineering/index.js b/pages/courses/btech/ElectricalEngineering/index.js new file mode 100644 index 00000000..173ebde8 --- /dev/null +++ b/pages/courses/btech/ElectricalEngineering/index.js @@ -0,0 +1,50 @@ +import Footer from "components/common/Footer"; +import Header from "components/common/Header/Header"; +import Sems from "components/Curriculum/Sems"; +import { firstYearSems } from "data/semData"; +import styles from '@styles/Home.module.css'; +const ComputerEngineering = () => { + return ( +
    +
    +
    +

    First Year

    + /
    + + {/* second yr */} +
    +

    Second Year

    + /
    + + {/* third Year*/} +
    +

    Third Year

    + /
    + + {/* fourth */} +
    +

    Fourth Year

    + /
    + +
    +
    + ); +}; + +export default ComputerEngineering; diff --git a/pages/courses/btech/ElectronicsEngineering/[subject].js b/pages/courses/btech/ElectronicsEngineering/[subject].js new file mode 100644 index 00000000..9933c5a5 --- /dev/null +++ b/pages/courses/btech/ElectronicsEngineering/[subject].js @@ -0,0 +1,68 @@ +import Subject from "components/Curriculum/Subject"; +import { getSubjectPages } from "data/semData"; + +export const getStaticPaths = async () => { + const paths = [ + { + params: { + subject: "applied-mathematics-1", + }, + }, + { + params: { + subject: "applied-chemistry", + }, + }, + { + params: { + subject: "thermo-dynamics", + }, + }, + { + params: { + subject: "electrical-engineering", + }, + }, + { + params: { + subject: "environmental-studies", + }, + }, + { + params: { + subject: "applied-chemistry-lab", + }, + }, + { + params: { + subject: "computer-programming-lab", + }, + }, + ]; + + return { + paths, + fallback: false, + }; +}; + +export const getStaticProps = async (context) => { + let subject = context.params.subject; + const data = getSubjectPages(subject); + + if (data == null || data == undefined) { + return { notFound: true }; + } + + return { props: { data } }; +}; + +const GeneralSubject = ({ data }) => { + return ( + <> + + + ); +}; + +export default GeneralSubject; diff --git a/pages/courses/btech/ElectronicsEngineering/index.js b/pages/courses/btech/ElectronicsEngineering/index.js new file mode 100644 index 00000000..c9f90bd5 --- /dev/null +++ b/pages/courses/btech/ElectronicsEngineering/index.js @@ -0,0 +1,50 @@ +import Footer from "components/common/Footer"; +import Header from "components/common/Header/Header"; +import Sems from "components/Curriculum/Sems"; +import { firstYearSems } from "data/semData"; +import styles from '@styles/Home.module.css'; +const ComputerEngineering = () => { + return ( +
    +
    +
    +

    First Year

    + /
    + + {/* second yr */} +
    +

    Second Year

    + /
    + + {/* third Year*/} +
    +

    Third Year

    + /
    + + {/* fourth */} +
    +

    Fourth Year

    + /
    + +
    +
    + ); +}; + +export default ComputerEngineering; diff --git a/pages/courses/btech/FoodEngineering/[subject].js b/pages/courses/btech/FoodEngineering/[subject].js new file mode 100644 index 00000000..9933c5a5 --- /dev/null +++ b/pages/courses/btech/FoodEngineering/[subject].js @@ -0,0 +1,68 @@ +import Subject from "components/Curriculum/Subject"; +import { getSubjectPages } from "data/semData"; + +export const getStaticPaths = async () => { + const paths = [ + { + params: { + subject: "applied-mathematics-1", + }, + }, + { + params: { + subject: "applied-chemistry", + }, + }, + { + params: { + subject: "thermo-dynamics", + }, + }, + { + params: { + subject: "electrical-engineering", + }, + }, + { + params: { + subject: "environmental-studies", + }, + }, + { + params: { + subject: "applied-chemistry-lab", + }, + }, + { + params: { + subject: "computer-programming-lab", + }, + }, + ]; + + return { + paths, + fallback: false, + }; +}; + +export const getStaticProps = async (context) => { + let subject = context.params.subject; + const data = getSubjectPages(subject); + + if (data == null || data == undefined) { + return { notFound: true }; + } + + return { props: { data } }; +}; + +const GeneralSubject = ({ data }) => { + return ( + <> + + + ); +}; + +export default GeneralSubject; diff --git a/pages/courses/btech/FoodEngineering/index.js b/pages/courses/btech/FoodEngineering/index.js new file mode 100644 index 00000000..e7eb38df --- /dev/null +++ b/pages/courses/btech/FoodEngineering/index.js @@ -0,0 +1,50 @@ +import Footer from "components/common/Footer"; +import Header from "components/common/Header/Header"; +import Sems from "components/Curriculum/Sems"; +import { firstYearSems } from "data/semData"; +import styles from '@styles/Home.module.css'; +const ComputerEngineering = () => { + return ( +
    +
    +
    +

    First Year

    + /
    + + {/* second yr */} +
    +

    Second Year

    + /
    + + {/* third Year*/} +
    +

    Third Year

    + /
    + + {/* fourth */} +
    +

    Fourth Year

    + /
    + +
    +
    + ); +}; + +export default ComputerEngineering; diff --git a/pages/courses/btech/MechanicalEngineering/[subject].js b/pages/courses/btech/MechanicalEngineering/[subject].js new file mode 100644 index 00000000..9933c5a5 --- /dev/null +++ b/pages/courses/btech/MechanicalEngineering/[subject].js @@ -0,0 +1,68 @@ +import Subject from "components/Curriculum/Subject"; +import { getSubjectPages } from "data/semData"; + +export const getStaticPaths = async () => { + const paths = [ + { + params: { + subject: "applied-mathematics-1", + }, + }, + { + params: { + subject: "applied-chemistry", + }, + }, + { + params: { + subject: "thermo-dynamics", + }, + }, + { + params: { + subject: "electrical-engineering", + }, + }, + { + params: { + subject: "environmental-studies", + }, + }, + { + params: { + subject: "applied-chemistry-lab", + }, + }, + { + params: { + subject: "computer-programming-lab", + }, + }, + ]; + + return { + paths, + fallback: false, + }; +}; + +export const getStaticProps = async (context) => { + let subject = context.params.subject; + const data = getSubjectPages(subject); + + if (data == null || data == undefined) { + return { notFound: true }; + } + + return { props: { data } }; +}; + +const GeneralSubject = ({ data }) => { + return ( + <> + + + ); +}; + +export default GeneralSubject; diff --git a/pages/courses/btech/MechanicalEngineering/index.js b/pages/courses/btech/MechanicalEngineering/index.js new file mode 100644 index 00000000..6a22cf37 --- /dev/null +++ b/pages/courses/btech/MechanicalEngineering/index.js @@ -0,0 +1,50 @@ +import Footer from "components/common/Footer"; +import Header from "components/common/Header/Header"; +import Sems from "components/Curriculum/Sems"; +import { firstYearSems } from "data/semData"; +import styles from '@styles/Home.module.css'; +const ComputerEngineering = () => { + return ( +
    +
    +
    +

    First Year

    + /
    + + {/* second yr */} +
    +

    Second Year

    + /
    + + {/* third Year*/} +
    +

    Third Year

    + /
    + + {/* fourth */} +
    +

    Fourth Year

    + /
    + +
    +
    + ); +}; + +export default ComputerEngineering; diff --git a/pages/courses/btech/first-year/index.js b/pages/courses/btech/first-year/index.js deleted file mode 100644 index 16601df3..00000000 --- a/pages/courses/btech/first-year/index.js +++ /dev/null @@ -1,16 +0,0 @@ -import Footer from "components/common/Footer"; -import Header from "components/common/Header/Header"; -import Sems from "components/Curriculum/Sems"; -import { firstYearSems } from "data/semData"; - -const FirstYear = () => { - return ( -
    -
    - -
    -
    - ); -}; - -export default FirstYear; diff --git a/pages/courses/btech/index.js b/pages/courses/btech/index.js index d1202837..90596412 100644 --- a/pages/courses/btech/index.js +++ b/pages/courses/btech/index.js @@ -23,15 +23,15 @@ export default function BTech() {

    Choose Your Branch

    - + */} + + @@ -49,8 +51,10 @@ export default function BTech() {

    Computer Engineering

    + + @@ -58,6 +62,8 @@ export default function BTech() {

    Electronics Engineering

    + + Electrical Engineering

    + + Mechanical Engineering

    + + Engineering

    + + Chemical Engineering

    + + -