Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
743ebee
create navbar component with style #40
Nov 1, 2021
3e7fbfc
create user info card
muhammadharoun Nov 2, 2021
d67fb18
make data as props
muhammadharoun Nov 2, 2021
3fabdd6
create home images
muhammadharoun Nov 2, 2021
162dc4d
edit state name to logged #40
Nov 3, 2021
77d3074
edit qurey to select all data like agent info. , estate agent #80
Nov 3, 2021
9279265
property card
muhammadharoun Nov 4, 2021
350caca
change func and file name
muhammadharoun Nov 4, 2021
3344af2
change func name add margin
muhammadharoun Nov 4, 2021
d238c47
Reslove conflicts
Mu7ammadAbed Nov 5, 2021
8358748
edit link router #40
Nov 6, 2021
1a5be00
Changes Requested
muhammadharoun Nov 7, 2021
5d4e5a8
remove comment
muhammadharoun Nov 7, 2021
bca9f7a
add changes
muhammadharoun Nov 7, 2021
70bc9a8
create query for get agent,and edit query estates #80
mohammedsalah7 Nov 7, 2021
ff24d02
Merge pull request #77 from GSG-G10/53-user-contact-card
Mu7ammadAbed Nov 7, 2021
f31301e
Merge pull request #78 from GSG-G10/54-home-images-section
Mu7ammadAbed Nov 7, 2021
f506223
create router in app , and format style #40
mohammedsalah7 Nov 7, 2021
d2085b8
solve conflict #40
mohammedsalah7 Nov 7, 2021
1d3c26a
Merge pull request #74 from GSG-G10/40-navbar
Mu7ammadAbed Nov 7, 2021
358bcbe
Merge pull request #81 from GSG-G10/80-edit-query
Mu7ammadAbed Nov 7, 2021
f021b2c
add PropertyCard and change file name
muhammadharoun Nov 7, 2021
a584905
solve conflect
muhammadharoun Nov 7, 2021
de0882c
convert h1 to div
muhammadharoun Nov 7, 2021
5ba39c8
fix rectangle
muhammadharoun Nov 7, 2021
2e4488d
Merge pull request #84 from GSG-G10/51-property-card
muhammadharoun Nov 7, 2021
e4d9087
add query and controler
muhammadharoun Nov 7, 2021
e535cfd
complete function
muhammadharoun Nov 7, 2021
737a5e8
add changes
muhammadharoun Nov 8, 2021
cc22fcf
Merge pull request #91 from GSG-G10/90-getEstateQuer
muhammadharoun Nov 8, 2021
f442434
page stucture
muhammadharoun Nov 10, 2021
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
2 changes: 2 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
"dependencies": {
"@emotion/react": "^11.5.0",
"@emotion/styled": "^11.3.0",
"@mui/icons-material": "^5.0.5",
"@mui/material": "^5.0.4",
"@mui/styles": "^5.0.2",
"axios": "^0.23.0",
"eslint-config-react-app": "^6.0.0",
"prop-types": "^15.7.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-icons": "^4.3.1",
Expand Down
17 changes: 14 additions & 3 deletions client/src/App.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
import { Footer } from './components';
import { BrowserRouter as Router } from 'react-router-dom';
// import PropertyCard from './components/PropertyCard';
// import NavBar from './components/Navbar';
// import { Footer } from './components';
import Estate from './pages/Estate';

function App() {
return (
<div className="App">
<Footer />
<Router>
<Estate />

</Router>
{/* <Router>
<NavBar />

</Router>
<Footer /> */}
</div>

);
}

export default App;
Binary file added client/src/assets/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/src/assets/bath.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/src/assets/beds.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/src/assets/profile-picture.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/src/assets/rooms.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/src/assets/space.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/src/asstes/avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/src/asstes/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions client/src/components/ImageSection/imageSection.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.main{
display: flex;
width: 80%;
height: 60vh;
margin-top: 5rem;
}
.bigImage{
width: 70%;
}
.bigImage img{
min-width: 100%;
max-height: 100%
}
.anotherImage{
display: flex;
flex-direction:column;
width: 30%;
justify-content: space-between

}
.anotherImage img{
min-width: 100%;
min-height: 30%;
margin-left:2rem;
margin-bottom: 6px;

}

img:nth-child(3){
margin-bottom: 0px;
}
33 changes: 33 additions & 0 deletions client/src/components/ImageSection/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import PropTypes from 'prop-types';
import './imageSection.css';

function ImageSection({ images }) {
let imagesarr = Object.values(images);
const mainImage = imagesarr[0];
console.log(imagesarr);
imagesarr = imagesarr.slice(1);
return (
<section className="main">
<section className="bigImage">
<img
src={mainImage}
alt="home"
loading="lazy"
/>
</section>
<section className="anotherImage">
{imagesarr.map((item) => (
<img
src={item}
alt="home"
loading="lazy"
/>
))}
</section>
</section>
);
}
ImageSection.propTypes = {
images: PropTypes.arrayOf(PropTypes.string).isRequired,
};
export default ImageSection;
75 changes: 75 additions & 0 deletions client/src/components/Navbar/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/* eslint-disable no-unused-vars */
import React, { useState } from 'react';
import { Link } from 'react-router-dom';
import {
ListItem, ListItemText, Button, Avatar, Container, List,
} from '@mui/material';
import './style.css';

import Logo from '../../asstes/logo.png';
import PresonImg from '../../asstes/avatar.png';

function NavBar() {
const [logged, setLogged] = useState(true);
return (
<Container maxWidth="xl">
<nav className="container">
<Link to="/">
<img src={Logo} alt="logo-housy" className="img-logo" />
</Link>
{' '}
<List
className="list"
sx={{ justifyContent: 'space-between' }}
style={{
marginRight: '150px', alignSelf: 'center', color: '#797B7D',
}}
>
<Link to="/" style={{ color: '#797B7D', textDecoration: 'none' }}>
<ListItem button style={{ textDecoration: 'none' }}>
<ListItemText primary="Home" />
</ListItem>
</Link>

<Link to="/signup" style={{ color: '#797B7D', textDecoration: 'none' }}>
<ListItem button>
<ListItemText primary="About" />
</ListItem>
</Link>
<Link to="/" style={{ color: '#797B7D', textDecoration: 'none' }}>
<ListItem button>
<ListItemText primary="Buy" />
</ListItem>
</Link>
<Link to="/" style={{ color: '#797B7D', textDecoration: 'none' }}>
<ListItem button>
<ListItemText primary="Rent" />
</ListItem>
</Link>
</List>

<div className="agent">
<Button style={{
marginRight: '30px', alignSelf: 'center', backgroundColor: '#3781CB', color: '#FFFFFF', textTransform: 'none',
}}
>
{' '}
<Link to="/login" className="btn-host">
<ListItemText primary="Host my House" style={{ color: '#fff' }} />
</Link>
</Button>
{logged ? (
<Link to="/">
<Avatar src={PresonImg} />
</Link>
) : (
''
)}
</div>

</nav>
</Container>

);
}
export default NavBar;
18 changes: 18 additions & 0 deletions client/src/components/Navbar/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.container {
display: flex;
flex-direction: row;
justify-content: space-around;
}
.img-logo {
width: 90px;
height: 80px;
}
.list {
display: flex;
align-self: center;
}
.agent {
display: flex;
flex-direction: row;
align-self: center;
}
37 changes: 37 additions & 0 deletions client/src/components/PropertyCard/PropertyCard.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.row{
display: flex;
flex-wrap: wrap;
}
.rectangle{
width: 50%;
background-color:#26B919;
clip-path: polygon(0 -134%, 91% 75%, 91% 100%, 0% 100%);
border-radius: 6px;
display: flex;
justify-content: flex-start;
align-items: center;
padding: 10px;


}
.loveicon{
text-align: end;
}
.price{
font-size: 1.9rem;
width: 100%;
text-align: center;
margin-top: 5px;
}
.bathroom,.rooms,.beds,.sqft{
width: 45%;
background-color:#3781CB;
padding: 10px;
margin:0 0 10px 10px;
border-radius: 6px;
display: flex;
justify-content: space-around;
align-items: center;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);

}
103 changes: 103 additions & 0 deletions client/src/components/PropertyCard/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
import {
Card,
CardContent,
} from '@mui/material';
import PropTypes from 'prop-types';

import FavoriteBorderIcon from '@mui/icons-material/FavoriteBorder';
import { makeStyles } from '@mui/styles';
import Space from '../../assets/space.png';
import Bath from '../../assets/bath.png';
import Rooms from '../../assets/rooms.png';
import Bed from '../../assets/beds.png';
import './PropertyCard.css';

const useStyles = makeStyles({
card: {
backgroundColor: '#F1F1F1',
maxWidth: 345,
display: 'flex',
flexDirection: 'column',
},
icons: {
display: 'flex',
flexDirection: 'row',
flexWrap: 'wrap',

},
});
function PropertyCard({
data: {
type, price, beds, baths, rooms, space,
},
}) {
const classes = useStyles();

return (
<Card className={classes.card} style={{ backgroundColor: '#F1F1F1' }}>
<CardContent className="row">
<div className="rectangle">
{type}
</div>
<div className="loveicon" style={{ width: '50%' }}>
<FavoriteBorderIcon />
</div>
<div className="price">
{price}
{' '}
$
</div>
</CardContent>

<CardContent className={classes.icons}>
<div className="bathroom">
<img
src={Bath}
alt="space"
/>
{baths}
{' '}
Bathrooms
</div>
<div className="rooms">
<img
src={Rooms}
alt="space"
/>
{rooms}
{' '}
Rooms
</div>
<div className="beds">
<img
src={Bed}
alt="space"
/>
{beds}
{' '}
Beds
</div>
<div className="sqft">
<img
src={Space}
alt="space"
/>
{space}
Sqft
</div>
</CardContent>
</Card>
);
}
PropertyCard.propTypes = {
data: PropTypes.shape({
type: PropTypes.string,
price: PropTypes.string,
beds: PropTypes.string,
baths: PropTypes.string,
rooms: PropTypes.string,
space: PropTypes.string,
}).isRequired,
};

export default PropertyCard;
Loading