diff --git a/frontend/package.json b/frontend/package.json index 4ff295a..558b650 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -6,12 +6,18 @@ "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", "@testing-library/user-event": "^7.1.2", + "bootstrap": "^4.5.0", + "jquery": "^3.5.1", + "lite-server": "^2.5.4", + "popper.js": "^1.16.1", "react": "^16.13.1", "react-dom": "^16.13.1", - "react-scripts": "3.4.1" + "react-js-banner": "^0.5.2", + "react-scripts": "3.4.1", + "reactstrap": "^8.5.1" }, "scripts": { - "start": "react-scripts start", + "start": "react-scripts start npm run lite-server", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" diff --git a/frontend/src/App.js b/frontend/src/App.js index ce9cbd2..1c29261 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -1,26 +1,24 @@ -import React from 'react'; -import logo from './logo.svg'; -import './App.css'; +// import React from 'react' +// import 'bootstrap/dist/css/bootstrap.min.css' +// import './components/Home/body/body.css' +// import logo from './components/Home/footer/1.png' +// import './components/Home/body/body.css' +// import Banner from 'react-js-banner' -function App() { - return ( -
-
- logo -

- Edit src/App.js and save to reload. -

- - Learn React - -
-
- ); -} +// function App() { +// return ( +//
+//
+//
+// +//
+//
+//
+// ) +// } -export default App; +// export default App diff --git a/frontend/src/Users.js b/frontend/src/Users.js new file mode 100644 index 0000000..0656ee5 --- /dev/null +++ b/frontend/src/Users.js @@ -0,0 +1,46 @@ +import React from 'react'; +// import fetch from 'node-fetch'; + +export default class Users extends React.Component { + constructor(props) { + super(props); + this.state = { + response: [], + loadingF: true, + } + }; + + componentDidMount() { + fetch('http://localhost:2017/rest/getposts', { + method: 'GET', + headers: { + 'Content-Type': 'application/json' + }, + }).then(res => res.json()) + .then(response => { + console.log({ response }); + this.setState({ + response: response, + loadingF: false + }) + }).catch((err) => this.setState({ loadingF: false })); + } + render() { + const { loadingF, response } = this.state; + if (loadingF) { + return
bitch this is loading right now
+ } + + const Title = ({ title }) =>
{title}
; + const ListItem = ({ item }) => ; + return ( + <div> + <ul> + {response.map(response1 => + <li key={response1.id}><div><p >{response1.title}</p> {response1.content}</div><hr></hr></li> + )} + </ul> + </div> + ); + } +} \ No newline at end of file diff --git a/frontend/src/components/Home/body/1.png b/frontend/src/components/Home/body/1.png new file mode 100644 index 0000000..72a54ae Binary files /dev/null and b/frontend/src/components/Home/body/1.png differ diff --git a/frontend/src/components/Home/body/Events.js b/frontend/src/components/Home/body/Events.js new file mode 100644 index 0000000..b164db3 --- /dev/null +++ b/frontend/src/components/Home/body/Events.js @@ -0,0 +1,104 @@ +import React, { Component} from 'react'; +import './body.css'; + +class Events extends Component { + render() { + return ( + <div> + <div class="site-section"> + <div class="container"> + <div class="row"> + <div class="col-lg-4"> + <div class="section-title"> + <h2>Events list</h2> + </div> + + <div class="trend-entry d-flex"> + <div class="trend-contents"> + <h2> + <a href="/"> + This is the ./ website new and events feed. Dotslash + website + </a> + </h2> + <div class="post-meta"> + <span class="d-block"> + <a href="/">Dave Rogers</a> in <a href="#">News</a> + </span> + <span class="date-read"> + Jun 14 <span class="mx-1">•</span> 3 min read{' '} + <span class="icon-star2"></span> + </span> + </div> + </div> + </div> + + <div class="trend-entry d-flex"> + <div class="trend-contents"> + <h2> + <a href="/"> + This is the ./ website new and events feed. Dotslash + website + </a> + </h2> + <div class="post-meta"> + <span class="d-block"> + <a href="#">Dave Rogers</a> in <a href="#">News</a> + </span> + <span class="date-read"> + Jun 14 <span class="mx-1">•</span> 3 min read{' '} + <span class="icon-star2"></span> + </span> + </div> + </div> + </div> + + <div class="trend-entry d-flex"> + <div class="trend-contents"> + <h2> + <a href="/"> + This is the ./ website new and events feed. Dotslash + website + </a> + </h2> + <div class="post-meta"> + <span class="d-block"> + <a href="#">Dave Rogers</a> in <a href="#">News</a> + </span> + <span class="date-read"> + Jun 14 <span class="mx-1">•</span> 3 min read{' '} + <span class="icon-star2"></span> + </span> + </div> + </div> + </div> + + <div class="trend-entry d-flex"> + <div class="trend-contents"> + <h2> + <a href="/"> + This is the ./ website new and events feed. Dotslash + website + </a> + </h2> + <div class="post-meta"> + <span class="d-block"> + <a href="#">Dave Rogers</a> in <a href="#">News</a> + </span> + <span class="date-read"> + Jun 14 <span class="mx-1">•</span> 3 min read{' '} + <span class="icon-star2"></span> + </span> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + ) + } +} + +export default Events; \ No newline at end of file diff --git a/frontend/src/components/Home/body/IdeasNVision.js b/frontend/src/components/Home/body/IdeasNVision.js new file mode 100644 index 0000000..439c27e --- /dev/null +++ b/frontend/src/components/Home/body/IdeasNVision.js @@ -0,0 +1,22 @@ +import React, { Component} from 'react'; +import {Card, CardImg, CardBody, CardHeader, CardText, CardImgOverlay, CardTitle} from 'reactstrap'; +import logo from '../footer/1.png'; +import 'bootstrap/dist/css/bootstrap.min.css'; +import './body.css'; + +class IdeasNVision extends Component { + render() { + return ( + <div className="container"> + <Card className="card-events"> + <CardHeader className="card-event-header">Events and Vision</CardHeader> + <CardImg className="cardimg" src={logo}></CardImg> + <CardTitle>NOtice</CardTitle> + {/* <CardImgOverlay src={logo}></CardImgOverlay> */} + </Card> + </div> + ); + } +} + +export default IdeasNVision; \ No newline at end of file diff --git a/frontend/src/components/Home/body/banner.js b/frontend/src/components/Home/body/banner.js new file mode 100644 index 0000000..f1d380f --- /dev/null +++ b/frontend/src/components/Home/body/banner.js @@ -0,0 +1,23 @@ +import React from 'react'; +import 'bootstrap/dist/css/bootstrap.min.css'; +import './body.css'; +import logo from '../footer/1.png'; +import Banner from 'react-js-banner'; + +function MainBanner() { + return ( + <div className="App"> + <div className="background"> + <div className="container"> + <Banner + title="This is an example banner with CSS and Image" + image={logo} + imageClass="Applogo" + /> + </div> + </div> + </div> + ) +} + +export default MainBanner diff --git a/frontend/src/components/Home/body/body.css b/frontend/src/components/Home/body/body.css new file mode 100644 index 0000000..3ff3b51 --- /dev/null +++ b/frontend/src/components/Home/body/body.css @@ -0,0 +1,58 @@ +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +.background { + width: 100%; + padding: 45px 0; + background-image: url(https://a0.muscache.com/airbnb/static/footer/background-317dd7c2cb678ddbdb0a983d511cb9a0.png); + background-color: #2b2d2e; + color: #fff; +} + +.Applogo { + width: 20%; +} + +.site-section { + padding: 2.5em 0; } + @media (min-width: 768px) { + .site-section { + padding: 7em 0; } } + .site-section.site-section-sm { + padding: 4em 0; } + +.site-section-heading { + padding-bottom: 20px; + margin-bottom: 0px; + position: relative; + font-size: 2.5rem; } + @media (min-width: 768px) { + .site-section-heading { + font-size: 3rem; } } + +.container { + width: 1045px; + margin: 0 auto; + padding: 0 24px; +} + +.section-title { + color: #000; +margin-bottom: 50px; +} + +.trend-entry { + margin-bottom: 30px; +} + +.post-meta { + font-size: .8rem; +} + +.cardimg { + width: 20%; + align-items: center; +} diff --git a/frontend/src/components/Home/footer/1.png b/frontend/src/components/Home/footer/1.png new file mode 100644 index 0000000..72a54ae Binary files /dev/null and b/frontend/src/components/Home/footer/1.png differ diff --git a/frontend/src/components/Home/footer/footer.js b/frontend/src/components/Home/footer/footer.js new file mode 100644 index 0000000..bf2bb34 --- /dev/null +++ b/frontend/src/components/Home/footer/footer.js @@ -0,0 +1,116 @@ +import React from 'react'; +import './style.css'; +import logo from './1.png' +export default class Footer extends React.Component { + render() { + return( + <footer className="footer"> + <div className="container"> + <section className="config"> + <img src={logo}/> + </section> + <nav className="footer-nav"> + <div className="col"> + <h2>Contact</h2> + <ul> + <li>Email:</li> + <li><a href="#">iiitn@ac.in</a></li> + <li>Address:</li> + <li><a href="#">IIIT Nagpur ,Seminary hills ,Nagpur</a></li> + <li>Contact:</li> + <li><a href="#">9845851255</a></li> + </ul> + </div> + <div className="col"> + <h2>Links</h2> + <ul> + <li><a href="#">Home</a></li> + <li><a href="#">IIITN website</a></li> + </ul> + </div> + </nav> + <section className="social"> + <h2>Join Us On</h2> + <ul> + <li> + <a href="#"> + <span className="title">facebook</span> + <svg version="1.1" xmlns="http://www.w3.org/2000/svg" + xmlnsXlink="http://www.w3.org/1999/xlink" width="32" height="32" + viewBox="0 0 32 32"> + <path + d="M19 6h5v-6h-5c-3.86 0-7 3.14-7 7v3h-4v6h4v16h6v-16h5l1-6h-6v-3c0-0.542 0.458-1 1-1z"/> + </svg> + </a> + </li> + <li> + <a href="#"> + <span className="title">google +</span> + <svg version="1.1" xmlns="http://www.w3.org/2000/svg" + xmlnsXlink="http://www.w3.org/1999/xlink" width="32" height="32" + viewBox="0 0 32 32"> + <path + d="M10.181 14.294v3.494h5.775c-0.231 1.5-1.744 4.394-5.775 4.394-3.475 0-6.313-2.881-6.313-6.431s2.838-6.431 6.313-6.431c1.981 0 3.3 0.844 4.056 1.569l2.762-2.662c-1.775-1.656-4.075-2.662-6.819-2.662-5.631 0.006-10.181 4.556-10.181 10.188s4.55 10.181 10.181 10.181c5.875 0 9.775-4.131 9.775-9.95 0-0.669-0.075-1.181-0.163-1.688h-9.613z"/> + <path d="M32 14h-3v-3h-3v3h-3v3h3v3h3v-3h3z"/> + </svg> + </a> + </li> + <li><a href="#"> + <span className="title">twitter</span> + <svg version="1.1" xmlns="http://www.w3.org/2000/svg" + xmlnsXlink="http://www.w3.org/1999/xlink" width="32" height="32" + viewBox="0 0 32 32"> + <path + d="M32 7.075c-1.175 0.525-2.444 0.875-3.769 1.031 1.356-0.813 2.394-2.1 2.887-3.631-1.269 0.75-2.675 1.3-4.169 1.594-1.2-1.275-2.906-2.069-4.794-2.069-3.625 0-6.563 2.938-6.563 6.563 0 0.512 0.056 1.012 0.169 1.494-5.456-0.275-10.294-2.888-13.531-6.862-0.563 0.969-0.887 2.1-0.887 3.3 0 2.275 1.156 4.287 2.919 5.463-1.075-0.031-2.087-0.331-2.975-0.819 0 0.025 0 0.056 0 0.081 0 3.181 2.263 5.838 5.269 6.437-0.55 0.15-1.131 0.231-1.731 0.231-0.425 0-0.831-0.044-1.237-0.119 0.838 2.606 3.263 4.506 6.131 4.563-2.25 1.762-5.075 2.813-8.156 2.813-0.531 0-1.050-0.031-1.569-0.094 2.913 1.869 6.362 2.95 10.069 2.95 12.075 0 18.681-10.006 18.681-18.681 0-0.287-0.006-0.569-0.019-0.85 1.281-0.919 2.394-2.075 3.275-3.394z"/> + </svg> + </a></li> + <li><a href="#"> + <span className="title">linkedin</span> + <svg version="1.1" xmlns="http://www.w3.org/2000/svg" + xmlnsXlink="http://www.w3.org/1999/xlink" width="32" height="32" + viewBox="0 0 32 32"> + <path + d="M12 12h5.535v2.837h0.079c0.77-1.381 2.655-2.837 5.464-2.837 5.842 0 6.922 3.637 6.922 8.367v9.633h-5.769v-8.54c0-2.037-0.042-4.657-3.001-4.657-3.005 0-3.463 2.218-3.463 4.509v8.688h-5.767v-18z"/> + <path d="M2 12h6v18h-6v-18z"/> + <path d="M8 7c0 1.657-1.343 3-3 3s-3-1.343-3-3c0-1.657 1.343-3 3-3s3 1.343 3 3z"/> + </svg> + </a></li> + <li><a href="#"> + <span className="title">pinterest</span> + <svg version="1.1" xmlns="http://www.w3.org/2000/svg" + xmlnsXlink="http://www.w3.org/1999/xlink" width="32" height="32" + viewBox="0 0 32 32"> + <path + d="M16 2.138c-7.656 0-13.863 6.206-13.863 13.863 0 5.875 3.656 10.887 8.813 12.906-0.119-1.094-0.231-2.781 0.050-3.975 0.25-1.081 1.625-6.887 1.625-6.887s-0.412-0.831-0.412-2.056c0-1.925 1.119-3.369 2.506-3.369 1.181 0 1.756 0.887 1.756 1.95 0 1.188-0.756 2.969-1.15 4.613-0.331 1.381 0.688 2.506 2.050 2.506 2.462 0 4.356-2.6 4.356-6.35 0-3.319-2.387-5.638-5.787-5.638-3.944 0-6.256 2.956-6.256 6.019 0 1.194 0.456 2.469 1.031 3.163 0.113 0.137 0.131 0.256 0.094 0.4-0.106 0.438-0.338 1.381-0.387 1.575-0.063 0.256-0.2 0.306-0.463 0.188-1.731-0.806-2.813-3.337-2.813-5.369 0-4.375 3.175-8.387 9.156-8.387 4.806 0 8.544 3.425 8.544 8.006 0 4.775-3.012 8.625-7.194 8.625-1.406 0-2.725-0.731-3.175-1.594 0 0-0.694 2.644-0.863 3.294-0.313 1.206-1.156 2.712-1.725 3.631 1.3 0.4 2.675 0.619 4.106 0.619 7.656 0 13.863-6.206 13.863-13.863 0-7.662-6.206-13.869-13.863-13.869z"/> + </svg> + </a></li> + <li><a href="#"> + <span className="title">youtube</span> + <svg version="1.1" xmlns="http://www.w3.org/2000/svg" + xmlnsXlink="http://www.w3.org/1999/xlink" width="32" height="32" + viewBox="0 0 32 32"> + <path + d="M31.681 9.6c0 0-0.313-2.206-1.275-3.175-1.219-1.275-2.581-1.281-3.206-1.356-4.475-0.325-11.194-0.325-11.194-0.325h-0.012c0 0-6.719 0-11.194 0.325-0.625 0.075-1.987 0.081-3.206 1.356-0.963 0.969-1.269 3.175-1.269 3.175s-0.319 2.588-0.319 5.181v2.425c0 2.587 0.319 5.181 0.319 5.181s0.313 2.206 1.269 3.175c1.219 1.275 2.819 1.231 3.531 1.369 2.563 0.244 10.881 0.319 10.881 0.319s6.725-0.012 11.2-0.331c0.625-0.075 1.988-0.081 3.206-1.356 0.962-0.969 1.275-3.175 1.275-3.175s0.319-2.587 0.319-5.181v-2.425c-0.006-2.588-0.325-5.181-0.325-5.181zM12.694 20.15v-8.994l8.644 4.513-8.644 4.481z"/> + </svg> + </a></li> + <li><a href="#"> + <span className="title">instagram</span> + <svg version="1.1" xmlns="http://www.w3.org/2000/svg" + xmlnsXlink="http://www.w3.org/1999/xlink" width="32" height="32" + viewBox="0 0 32 32"> + <path + d="M16 2.881c4.275 0 4.781 0.019 6.462 0.094 1.563 0.069 2.406 0.331 2.969 0.55 0.744 0.288 1.281 0.638 1.837 1.194 0.563 0.563 0.906 1.094 1.2 1.838 0.219 0.563 0.481 1.412 0.55 2.969 0.075 1.688 0.094 2.194 0.094 6.463s-0.019 4.781-0.094 6.463c-0.069 1.563-0.331 2.406-0.55 2.969-0.288 0.744-0.637 1.281-1.194 1.837-0.563 0.563-1.094 0.906-1.837 1.2-0.563 0.219-1.413 0.481-2.969 0.55-1.688 0.075-2.194 0.094-6.463 0.094s-4.781-0.019-6.463-0.094c-1.563-0.069-2.406-0.331-2.969-0.55-0.744-0.288-1.281-0.637-1.838-1.194-0.563-0.563-0.906-1.094-1.2-1.837-0.219-0.563-0.481-1.413-0.55-2.969-0.075-1.688-0.094-2.194-0.094-6.463s0.019-4.781 0.094-6.463c0.069-1.563 0.331-2.406 0.55-2.969 0.288-0.744 0.638-1.281 1.194-1.838 0.563-0.563 1.094-0.906 1.838-1.2 0.563-0.219 1.412-0.481 2.969-0.55 1.681-0.075 2.188-0.094 6.463-0.094zM16 0c-4.344 0-4.887 0.019-6.594 0.094-1.7 0.075-2.869 0.35-3.881 0.744-1.056 0.412-1.95 0.956-2.837 1.85-0.894 0.888-1.438 1.781-1.85 2.831-0.394 1.019-0.669 2.181-0.744 3.881-0.075 1.713-0.094 2.256-0.094 6.6s0.019 4.887 0.094 6.594c0.075 1.7 0.35 2.869 0.744 3.881 0.413 1.056 0.956 1.95 1.85 2.837 0.887 0.887 1.781 1.438 2.831 1.844 1.019 0.394 2.181 0.669 3.881 0.744 1.706 0.075 2.25 0.094 6.594 0.094s4.888-0.019 6.594-0.094c1.7-0.075 2.869-0.35 3.881-0.744 1.050-0.406 1.944-0.956 2.831-1.844s1.438-1.781 1.844-2.831c0.394-1.019 0.669-2.181 0.744-3.881 0.075-1.706 0.094-2.25 0.094-6.594s-0.019-4.887-0.094-6.594c-0.075-1.7-0.35-2.869-0.744-3.881-0.394-1.063-0.938-1.956-1.831-2.844-0.887-0.887-1.781-1.438-2.831-1.844-1.019-0.394-2.181-0.669-3.881-0.744-1.712-0.081-2.256-0.1-6.6-0.1v0z"/> + <path + d="M16 7.781c-4.537 0-8.219 3.681-8.219 8.219s3.681 8.219 8.219 8.219 8.219-3.681 8.219-8.219c0-4.537-3.681-8.219-8.219-8.219zM16 21.331c-2.944 0-5.331-2.387-5.331-5.331s2.387-5.331 5.331-5.331c2.944 0 5.331 2.387 5.331 5.331s-2.387 5.331-5.331 5.331z"/> + <path + d="M26.462 7.456c0 1.060-0.859 1.919-1.919 1.919s-1.919-0.859-1.919-1.919c0-1.060 0.859-1.919 1.919-1.919s1.919 0.859 1.919 1.919z"/> + </svg> + </a></li> + </ul> + <p>© IIIT Nagpur, Inc.</p> + </section> + </div> + </footer> + ) + } +} \ No newline at end of file diff --git a/frontend/src/components/Home/footer/style.css b/frontend/src/components/Home/footer/style.css new file mode 100644 index 0000000..d8f934f --- /dev/null +++ b/frontend/src/components/Home/footer/style.css @@ -0,0 +1,128 @@ +/* + ======================================== + Reset & Basic styles + ======================================== +*/ +* { + margin: 0; + padding: 0; + box-sizing: border-box; + } + body { + background: #F5F5F5; + font: 14px Arial, sans-serif; + } + a { + color: inherit; + text-decoration: none; + } + .cf { + overflow: auto; + } + .container { + width: 1045px; + margin: 0 auto; + padding: 0 24px; + } + h2 { + font-size: 16px; + font-weight: bold; + margin-bottom: 15px; + } + .footer { + width: 100%; + padding: 45px 0; + background-image: url(https://a0.muscache.com/airbnb/static/footer/background-317dd7c2cb678ddbdb0a983d511cb9a0.png); + background-color: #2b2d2e; + color: #fff; + } + + /* + ======================================== + Config + ======================================== + */ + .config { + display: inline-block; + vertical-align: top; + width: 447px; + } + .config img{ + padding-left: 8%; + margin-left: 10%; + padding-bottom: 8%; + } + + /* + ======================================== + Nav + ======================================== + */ + .footer-nav { + display: inline-block; + } + .footer-nav .col { + float: left; + padding: 0 6px; + width: 168px; + } + .footer-nav li { + list-style: none; + } + .footer-nav a { + line-height: 1.43; + } + .footer-nav a:hover { + color: #bbb; + } + + /* + ======================================== + Social + ======================================== + */ + .social { + border-top: 1px solid rgba(255,255,255,0.2); + margin-top: 48px; + padding-top: 24px; + } + .social h2 { + text-align: center; + margin-bottom: 24px; + } + .social ul { + width: 360px; + margin: 0 auto; + } + .social li { + display: inline-block; + } + .social a { + border: 1px solid rgba(255,255,255,0.2); + border-radius: 100%; + width: 36px; + height: 36px; + display: block; + text-align: center; + margin: 0 6px; + } + .social a .title { + display: none; + } + .social a svg { + fill: #fff; + width: 16px; + } + .social a:hover svg { + fill: #bbb; + } + .social p { + text-align: center; + margin-top: 12px; + color: #757575; + + } + img{ + height: 32%; + width: 47%; + } \ No newline at end of file diff --git a/frontend/src/components/Home/header/header.js b/frontend/src/components/Home/header/header.js new file mode 100644 index 0000000..7ff2569 --- /dev/null +++ b/frontend/src/components/Home/header/header.js @@ -0,0 +1,3 @@ +import React, { Component } from 'react'; +import logo from '../footer/1.png'; +import './'; \ No newline at end of file diff --git a/frontend/src/index.js b/frontend/src/index.js index f5185c1..9752c86 100644 --- a/frontend/src/index.js +++ b/frontend/src/index.js @@ -1,9 +1,10 @@ import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; -import App from './App'; +import Footer from "./components/Home/footer/footer"; import * as serviceWorker from './serviceWorker'; + ReactDOM.render( <React.StrictMode> <App />