Skip to content

Commit

Permalink
Updating profile style
Browse files Browse the repository at this point in the history
  • Loading branch information
Areeba-Imran committed Feb 18, 2022
1 parent 33cc323 commit d0286c6
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 26 deletions.
34 changes: 22 additions & 12 deletions public/stylesheets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -471,23 +471,33 @@ input.search-input-field {
}

.profile-img {
<<<<<<< HEAD
width: 200px;
height: 200px;
width: 150px;
height: 150px;
object-fit: cover;
border-radius: 50%;
=======
width: 150px;
height: 150px;
object-fit: cover;
border-radius: 50%;
>>>>>>> fda3020a7316663a0f5a78ad1511cdf9a0b3d4ec
border: 3px solid white;
}

.user-info{
display: flex;
background-color: #000000cf;
height: 120px;
padding: 20px 30px;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
margin-bottom: 80px;
color: #fff;
}

.user-info-sub-div{
padding: 30px;
}

.profile-body {
margin: 0px 90px;
padding: 0px 120px;
background-color: bisque;
font-family: "Marcellus", serif;
margin: 60px 170px 0px;
border: 2px solid black;
border-radius: 10px;
}

#image-container-login {
Expand Down
4 changes: 0 additions & 4 deletions routes/recipes.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,8 @@ router.get("/:id", (req, res, next) => {
let showDelete;
if (!req.session.user) {
showDelete = false
<<<<<<< HEAD
}
else {
=======
} else {
>>>>>>> fda3020a7316663a0f5a78ad1511cdf9a0b3d4ec
showDelete = req.session.user._id == recipe.creater._id
console.log(showDelete)
}
Expand Down
4 changes: 2 additions & 2 deletions views/event/details.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{#with event}}
<div class="event-details-box">
<div class="join-event">
<img src="{{cloudinaryResize this.img " c_fill,w_500,h_400"}}" alt="Image of the {{title}} event">
<img src="{{cloudinaryResize this.img "c_fill,w_500,h_400"}}" alt="Image of the {{title}} event">
<div>
<p>⏰{{startDate}}, {{startTime}} - {{endTime}}</p>
<h1>{{title}}</h1>
Expand All @@ -19,7 +19,7 @@
</div>

<div class="adjust-event-btn">
{#if ../showDelete}}
{{#if ../showDelete}}
<a href="/event/{{_id}}/delete"><button type="submit">Delete</button></a>
<a href="/event/{{_id}}/edit"><button type="submit">Edit</button></a>
{{/if}}
Expand Down
25 changes: 17 additions & 8 deletions views/user/profile.hbs
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@

<div class="profile-body">

{{#with user}}
<img src="{{imageUrl}}" alt="Picture of {{name}}" class="profile-img" >
<h3 class="user-name">{{name}}</h3>
<h3>{{city}}</h3>
<h3>{{age}}</h3>
<p>{{intro}}</p>
<div class="user-info">
<img src="{{imageUrl}}" alt="Picture of {{name}}" class="profile-img" >

<div class="user-info-sub-div">
<h4 class="user-name">{{name}}</h4>
<h5>{{city}}</h5>
<p>{{intro}}</p>
</div>
</div>

{{/with}}


<h2>My Recipes</h2>
{{#if recipe}}
<h4 class="text-center">Check out my recipes below!</h4>
<div class="recipes-collection-div">
{{#each recipe}}

Expand All @@ -20,8 +26,10 @@

{{/each}}
</div>
{{/if}}

<h2>My Events</h2>
{{#if events}}
<h4 class="text-center">Events Hosted</h4>
<div class="recipes-collection-div">
{{#each event}}
<div class="recipe-info-box">
Expand All @@ -30,5 +38,6 @@
</div>
{{/each}}
</div>
{{/if}}

</div>

0 comments on commit d0286c6

Please sign in to comment.