Skip to content

Commit

Permalink
upgrade user view user dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Dogapinarr committed May 26, 2024
1 parent 5595e34 commit 5fff951
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 16 deletions.
10 changes: 8 additions & 2 deletions scripts/userViewProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ async function CreateUserInfoPage() {
document.getElementById('userName').textContent = userInfo.name + ' ' + userInfo.lastName;
document.getElementById('userEmail').textContent = userInfo.email;
document.getElementById('userBio').textContent = userInfo.bio || "Type about yourself"; // Bio alanı boşsa "Type about yourself" yazısı
document.getElementById('userPhoto').src = userInfo.userPhoto; // Kullanıcı fotoğrafı

if(userInfo.userPhoto)
{
document.getElementById('userPhoto').src = userInfo.userPhoto;
}
else{
document.getElementById('userPhoto').src = "https://static.vecteezy.com/system/resources/thumbnails/005/129/844/small_2x/profile-user-icon-isolated-on-white-background-eps10-free-vector.jpg"
}

// Kullanıcının yayınladığı tarifleri listele
const userPublishedRecipesContainer = document.getElementById('userPublishedRecipes');
userInfo.userPublishedRecipes.forEach(recipe => {
Expand Down
1 change: 1 addition & 0 deletions styles/userViewProfile.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ body {
border: none;
padding: 0;
position: relative;
margin-right: 1450px;
}

.back-arrow {
Expand Down
20 changes: 10 additions & 10 deletions templates/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<a href="userDashboard.html">Recipes by Users</a>
<!-- <a href="recipes.html">Cuisines</a> -->
<a href="userProfile.html">Profile</a>
<a onclick="openNewTab()">Search By Ingredient</a>
<a href="searchByIngredientTab.html" target="_blank">Search By Ingredient</a>
<div class="nav-dropdown show-dropdown" onclick="toggleAndCloseDropdown(this)">
<button class="meal-types">Cuisines<ion-icon name="chevron-down-outline"
class="nav-dropdown-arrow-icon"></ion-icon></button>
Expand Down Expand Up @@ -196,15 +196,15 @@
<h2></h2>
<h1
style=" font-weight:bold;
min-block-size: 100%;
min-inline-size: 100%;
box-sizing: border-box;
display: grid;
place-content: center;
font-family: system-ui;
font-size: min(200%, 5vmin); font-size: 6vmin;
line-height: 1.1;">
Explore Recipies</h1>
min-block-size: 100%;
min-inline-size: 100%;
box-sizing: border-box;
display: grid;
place-content: center;
font-family: system-ui;
font-size: min(200%, 5vmin); font-size: 6vmin;
line-height: 1.1;">
Explore Recipes</h1>
</article>
</div>
</div>
Expand Down
9 changes: 6 additions & 3 deletions templates/userDashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ <h1 class="header-title">USER RECIPE DASHBOARD</h1>
<div class="hero-text">
<article style="background-size: cover; background: linear-gradient(
to right,
hsl(253, 19%, 58%),
hsl(270, 17%, 72%)
hsl(252, 65%, 8%),
hsl(268, 19%, 40%)
);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
Expand All @@ -43,11 +45,12 @@ <h1 class="header-title">USER RECIPE DASHBOARD</h1>
min-inline-size: 100%;
box-sizing: border-box;
display: grid;
margin-top: 3px;
place-content: center;
font-family: system-ui;
font-size: min(200%, 5vmin); font-size: 6vmin;
line-height: 1.1;">
Explore Recipies</h1>
Explore Recipes</h1>
</article>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/userViewProfile.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<button id="back-arrow-button">
<ion-icon class="back-arrow" name="chevron-back-circle-outline"></ion-icon>
</button>
<h1 class="header-title" style="color: #c4bbf0;">MY PROFILE</h1>
<h1 class="header-title" style="color: #c4bbf0;"></h1>
</div>
<div class="card-container">

Expand Down

0 comments on commit 5fff951

Please sign in to comment.