From 5fff9512502fdcb29272d0351448f27f704395c1 Mon Sep 17 00:00:00 2001 From: Dogapinarr <147092474+Dogapinarr@users.noreply.github.com> Date: Sun, 26 May 2024 18:43:26 +0300 Subject: [PATCH] upgrade user view user dashboard --- scripts/userViewProfile.js | 10 ++++++++-- styles/userViewProfile.css | 1 + templates/dashboard.html | 20 ++++++++++---------- templates/userDashboard.html | 9 ++++++--- templates/userViewProfile.html | 2 +- 5 files changed, 26 insertions(+), 16 deletions(-) diff --git a/scripts/userViewProfile.js b/scripts/userViewProfile.js index 11c8b25..05a351d 100644 --- a/scripts/userViewProfile.js +++ b/scripts/userViewProfile.js @@ -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 => { diff --git a/styles/userViewProfile.css b/styles/userViewProfile.css index 5c648cb..67ca0cb 100644 --- a/styles/userViewProfile.css +++ b/styles/userViewProfile.css @@ -62,6 +62,7 @@ body { border: none; padding: 0; position: relative; + margin-right: 1450px; } .back-arrow { diff --git a/templates/dashboard.html b/templates/dashboard.html index da6e203..08d97a1 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -24,7 +24,7 @@ Recipes by Users Profile - Search By Ingredient + Search By Ingredient diff --git a/templates/userDashboard.html b/templates/userDashboard.html index b20cc5b..004736e 100644 --- a/templates/userDashboard.html +++ b/templates/userDashboard.html @@ -31,8 +31,10 @@

USER RECIPE DASHBOARD

USER RECIPE DASHBOARD 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 + Explore Recipes
diff --git a/templates/userViewProfile.html b/templates/userViewProfile.html index 8f09925..b7bcc41 100644 --- a/templates/userViewProfile.html +++ b/templates/userViewProfile.html @@ -11,7 +11,7 @@ -

MY PROFILE

+