Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment section #27

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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: 10 additions & 0 deletions src/assets/icons/burger-2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/assets/icons/burger.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 50 additions & 0 deletions src/components/CommentsSection/CommentsSection.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import React from 'react';
import './CommentsSection.scss';
import burger from '../../assets/icons/burger.svg';
import burger2 from '../../assets/icons/burger-2.svg';

const CommentsSection = (props) => {
return(
<div className="comments">
<h1 className="Header">Komentarze</h1>
<div className="Comment">
<h3 className="Username">Dominik</h3>
<div className="burgers">
<img src={burger2} alt="icon-1" className="burger" />
<img src={burger2} alt="icon-1" className="burger" />
<img src={burger} alt="icon-1" className="burger" />
<img src={burger} alt="icon-1" className="burger" />
<img src={burger} alt="icon-1" className="burger" />
</div>
<span className="date">20-09-2019</span>
<p className="Commenttext" >Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore dolore magna aliqua.</p>
</div>
<div className="Comment">
<h3 className="Username">Dominik</h3>
<div className="burgers">
<img src={burger2} alt="icon-1" className="burger" />
<img src={burger2} alt="icon-1" className="burger" />
<img src={burger2} alt="icon-1" className="burger" />
<img src={burger2} alt="icon-1" className="burger" />
<img src={burger} alt="icon-1" className="burger" />
</div>
<span className="date">20-09-2019</span>
<p className="Commenttext" >Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore dolore magna aliqua.</p>
</div>
<div className="Comment">
<h3>Zostaw komentarz:</h3>
<input className="name" placeholder="Imię"></input>
<div className="burgers">
<img src={burger} alt="icon-1" className="burger" />
<img src={burger} alt="icon-1" className="burger" />
<img src={burger} alt="icon-1" className="burger" />
<img src={burger} alt="icon-1" className="burger" />
<img src={burger} alt="icon-1" className="burger" />
</div>
<textarea className="Area" placeholder="Remember, be nice!" rows="8"></textarea>
<button type="submit" className="btn">Wyślij</button>
</div>
</div>
);
};
export default CommentsSection;
96 changes: 96 additions & 0 deletions src/components/CommentsSection/CommentsSection.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
@import '../../assets/styles/_colors.scss';


.comments {

margin: 0 ;

}
.header {
color: $accent;
margin: 0 0 0 15px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

margin-left: 15px

}
.Comment {
position: relative;
display: block;
width: 100%;
padding: 5%;
border-radius: 5px;
background-color: $comment;
margin:5% 0;


}
.burgers {
padding: 0 5% ;
padding-top: 2.5%;
width: 60%;

}
.name+.burgers{
float: right;
padding: auto 0;
padding-right: 0;
text-align: right;


}
.burger {
margin: 0 1%;

}
.Commenttext {
padding: 5%;
background:$comment;
}
.date {
position: absolute;
right: 4px;
top: 4px;

}
.Username {
position: relative;
padding: 0 5%;
}

.Area {
position: relative;
width: 100%;
height: auto;
margin: 0 auto;
font-family: 'Montserrat', sans-serif;
padding: 5%;
resize: none;
outline: none;
border-radius: 5px;
border: none;
}
.name {
padding:2.5%;
margin: 2.5% 0;
border-radius: 15px;
width: 40%;
border: none;
font-size: 16px;

}
.btn {
position: relative;
top:5px;
width: 100%;
border-radius: 15px;
background-color: $accent;
font-family: 'Montserrat', sans-serif;
color: $white;
font-weight: 500;
font-size: 16px;
border: none;
padding: 5px 0 5px;
}
::-webkit-input-placeholder {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

autoprefixer should be automatically included

font-family: 'Montserrat', sans-serif;
font-size: 16px;


}
5 changes: 2 additions & 3 deletions src/pages/RestaurantPageInfo/RestaurantPageInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import RestaurantPicture from '../../assets/images/restaurant.jpg';
import './RestaurantPageInfo.scss';
import BackButton from '../../components/BackButton/BackButton';
import MenuBlock from '../../components/MenuBlock/MenuBlock';
import CommentsSection from '../../components/CommentsSection/CommentsSection';

export default function RestaurantInfoPage() {
return (
Expand All @@ -28,9 +29,7 @@ export default function RestaurantInfoPage() {
<OpeningHours />
</div>
<MenuBlock />
<div className="comments">
<h3>Komentarze</h3>
</div>
<CommentsSection />
</div>

<BackButton />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/RestaurantPageInfo/RestaurantPageInfo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

.restaurant-info-content {
background-color: $white;
padding: 40px;
padding: 15px;
border-radius: 20px 20px 0 0;
position: relative;
top: -25px;
Expand Down