From 442119756a3efde46f3f4e1a600420fdaec9c0d3 Mon Sep 17 00:00:00 2001 From: Swetha S Date: Wed, 29 May 2024 10:42:37 +0530 Subject: [PATCH] Syllabus for Particular Year Displayed --- src/components/page3/1Year.js | 2 +- src/components/page3/2Year.js | 2 +- src/components/page3/3Year.js | 2 +- src/components/page3/4Year.js | 58 ++++++++++------ src/components/page5(1st)/fstsyllabus.js | 68 ++++++++++++++++++- src/components/page6(2nd)/sndsyllabus.js | 80 ++++++++++++++++++++++ src/components/page7(4yr)/frthsyllabus.js | 81 +++++++++++++++++++++++ src/components/page8(3yr)/trdsyllabus.js | 81 +++++++++++++++++++++++ src/index.js | 25 ++++++- 9 files changed, 370 insertions(+), 29 deletions(-) create mode 100644 src/components/page6(2nd)/sndsyllabus.js create mode 100644 src/components/page7(4yr)/frthsyllabus.js create mode 100644 src/components/page8(3yr)/trdsyllabus.js diff --git a/src/components/page3/1Year.js b/src/components/page3/1Year.js index b0bdba5..b5259c8 100644 --- a/src/components/page3/1Year.js +++ b/src/components/page3/1Year.js @@ -36,7 +36,7 @@ function fstYear() { - +

Syllabus

diff --git a/src/components/page3/2Year.js b/src/components/page3/2Year.js index d920c57..0354ef4 100644 --- a/src/components/page3/2Year.js +++ b/src/components/page3/2Year.js @@ -35,7 +35,7 @@ function sndYear() {
- +

Syllabus

diff --git a/src/components/page3/3Year.js b/src/components/page3/3Year.js index 87f8a78..a8a34da 100644 --- a/src/components/page3/3Year.js +++ b/src/components/page3/3Year.js @@ -38,7 +38,7 @@ function TrdYear() {
- +

Syllabus

diff --git a/src/components/page3/4Year.js b/src/components/page3/4Year.js index 58b8265..b0bffe3 100644 --- a/src/components/page3/4Year.js +++ b/src/components/page3/4Year.js @@ -1,20 +1,7 @@ -// import React from 'react' - -// function fothYear() { -// return ( -//
-//

Fourth Year

-//
-// ) -// } - -// export default fothYear - - import React from 'react' import {Link} from 'react-router-dom'; -// import '../page3/3Year.css' import Header from '../../pages/header'; +import '../page3/1Year.css'; import quantumImage from '../../assets/5th.png'; @@ -27,13 +14,44 @@ import ComingSoon from '../../pages/cs.js' function fothYear() { - return ( -
- + + return ( +
-{/*
*/} +
+ +
+

4th year

- ) -} + +
+
+ + + + +
+ +

Syllabus

+
+ + + + + + + + +
+
+ +
+ + ) + } + + + + export default fothYear; diff --git a/src/components/page5(1st)/fstsyllabus.js b/src/components/page5(1st)/fstsyllabus.js index e508227..69f63bc 100644 --- a/src/components/page5(1st)/fstsyllabus.js +++ b/src/components/page5(1st)/fstsyllabus.js @@ -1,11 +1,73 @@ -import React from 'react' +import React from 'react' +import Header from "../../pages/header"; +import Footer from "../../pages/footer"; +import '../page4/syllabus.css'; -function fstsyllabus() { + +const fstsyllabus =() => { + + // const[selectSem, setSelectSem] = useState(null); + + const handleDownload = (syllabus) =>{ + const syllabusFilePath = process.env.PUBLIC_URL + `/syllabus/${syllabus}.pdf`; + + const link = document.createElement('a'); + link.href = syllabusFilePath; + link.download = `syllabus${syllabus}.pdf`; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + } return (
- +
+

Download Syllabus

+ + +
) } export default fstsyllabus + + + + diff --git a/src/components/page6(2nd)/sndsyllabus.js b/src/components/page6(2nd)/sndsyllabus.js new file mode 100644 index 0000000..76893f3 --- /dev/null +++ b/src/components/page6(2nd)/sndsyllabus.js @@ -0,0 +1,80 @@ +import React from 'react' +import Header from "../../pages/header"; +import Footer from "../../pages/footer"; +import '../page4/syllabus.css'; + + +const Syllabus =() => { + + // const[selectSem, setSelectSem] = useState(null); + + const handleDownload = (syllabus) =>{ + const syllabusFilePath = process.env.PUBLIC_URL + `/syllabus/${syllabus}.pdf`; + + const link = document.createElement('a'); + link.href = syllabusFilePath; + link.download = `syllabus${syllabus}.pdf`; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + } + return ( +
+
+ + +

Download Syllabus

+ + +
+
+ ) +} + +export default Syllabus + + diff --git a/src/components/page7(4yr)/frthsyllabus.js b/src/components/page7(4yr)/frthsyllabus.js new file mode 100644 index 0000000..9c0caf3 --- /dev/null +++ b/src/components/page7(4yr)/frthsyllabus.js @@ -0,0 +1,81 @@ +import React from 'react' +import Header from "../../pages/header"; +import Footer from "../../pages/footer"; +import '../page4/syllabus.css'; + + +const frthsyllabus =() => { + + // const[selectSem, setSelectSem] = useState(null); + + const handleDownload = (syllabus) =>{ + const syllabusFilePath = process.env.PUBLIC_URL + `/syllabus/${syllabus}.pdf`; + + const link = document.createElement('a'); + link.href = syllabusFilePath; + link.download = `syllabus${syllabus}.pdf`; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + } + return ( +
+
+ + +

Download Syllabus

+ + +
+
+ ) +} + +export default frthsyllabus + + diff --git a/src/components/page8(3yr)/trdsyllabus.js b/src/components/page8(3yr)/trdsyllabus.js new file mode 100644 index 0000000..2e4ebb3 --- /dev/null +++ b/src/components/page8(3yr)/trdsyllabus.js @@ -0,0 +1,81 @@ +import React from 'react' +import Header from "../../pages/header"; +import Footer from "../../pages/footer"; +import '../page4/syllabus.css'; + + +const trdsyllabus =() => { + + // const[selectSem, setSelectSem] = useState(null); + + const handleDownload = (syllabus) =>{ + const syllabusFilePath = process.env.PUBLIC_URL + `/syllabus/${syllabus}.pdf`; + + const link = document.createElement('a'); + link.href = syllabusFilePath; + link.download = `syllabus${syllabus}.pdf`; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + } + return ( +
+
+ + +

Download Syllabus

+ + +
+
+ ) +} + +export default trdsyllabus + + diff --git a/src/index.js b/src/index.js index ed1dd55..ea216dd 100644 --- a/src/index.js +++ b/src/index.js @@ -21,7 +21,10 @@ import SndQuantum from './components/page6(2nd)/sndquantum.js' import SndLecture from './components/page6(2nd)/sndlecture.js' import Fsttimetable from './components/page5(1st)/fsttimetable.js' import Sndtimetable from './components/page6(2nd)/sndtimetable.js'; - +import Fstsyllabus from './components/page5(1st)/fstsyllabus.js'; +import Sndsyllabus from './components/page6(2nd)/sndsyllabus.js' +import Frthsyllabus from './components/page7(4yr)/frthsyllabus.js' +import TrdSyllabus from './components/page8(3yr)/trdsyllabus.js'; import { createBrowserRouter, RouterProvider, @@ -45,9 +48,25 @@ const router = createBrowserRouter([ path: "/", element: , }, + // { + // path: "syllabus", + // element: + // }, { - path: "syllabus", - element: + path:"fstsyllabus", + element: + }, + { + path:"sndsyllabus", + element: + }, + { + path:"trdsyllabus", + element: + }, + { + path:"frthsyllabus", + element: }, { path: "timetable",