Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
46 changes: 22 additions & 24 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
@@ -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 (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
);
}
// function App() {
// 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 App;
// export default App
46 changes: 46 additions & 0 deletions frontend/src/Users.js
Original file line number Diff line number Diff line change
@@ -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 <div> bitch this is loading right now </div>
}

const Title = ({ title }) => <div>{title}</div>;
const ListItem = ({ item }) => <Title title={item.title} />;
return (
<div>
<ul>
{response.map(response1 =>
<li key={response1.id}><div><p >{response1.title}</p> {response1.content}</div><hr></hr></li>
)}
</ul>
</div>
);
}
}
Binary file added frontend/src/components/Home/body/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
104 changes: 104 additions & 0 deletions frontend/src/components/Home/body/Events.js
Original file line number Diff line number Diff line change
@@ -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">&bullet;</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">&bullet;</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">&bullet;</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">&bullet;</span> 3 min read{' '}
<span class="icon-star2"></span>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
)
}
}

export default Events;
22 changes: 22 additions & 0 deletions frontend/src/components/Home/body/IdeasNVision.js
Original file line number Diff line number Diff line change
@@ -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;
23 changes: 23 additions & 0 deletions frontend/src/components/Home/body/banner.js
Original file line number Diff line number Diff line change
@@ -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
58 changes: 58 additions & 0 deletions frontend/src/components/Home/body/body.css
Original file line number Diff line number Diff line change
@@ -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;
}
Binary file added frontend/src/components/Home/footer/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading