diff --git a/WhoAtX/Controllers/HomeController.cs b/WhoAtX/Controllers/HomeController.cs index 953bd9e..01c9170 100644 --- a/WhoAtX/Controllers/HomeController.cs +++ b/WhoAtX/Controllers/HomeController.cs @@ -18,11 +18,6 @@ public class HomeController : Controller return View(); } - public IActionResult Privacy() - { - return View(); - } - [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public IActionResult Error() { diff --git a/WhoAtX/Controllers/UserController.cs b/WhoAtX/Controllers/UserController.cs new file mode 100644 index 0000000..8029501 --- /dev/null +++ b/WhoAtX/Controllers/UserController.cs @@ -0,0 +1,39 @@ +using Microsoft.AspNetCore.Mvc; +using WhoAtX.Models; + +namespace WhoAtX.Controllers +{ + public class UserController : Controller + { + // TODO(#8): Get data from database rather than hard-coding it + private UserProfileViewModel GetUserProfile() + { + // Sample user profile data + var userProfile = new UserProfileViewModel + { + Name = "John Doe", + Pronouns = "He/Him", + NamePronunciationPath = "/audio/john_doe_pronunciation.mp3", + // NamePronunciationPath = null, + // Add more user profile data here + AreasOfKnowledge = "Web Development", + Projects = "Project X", + Team = "Development Team", + WorkingHours = "9:00 AM - 5:00 PM", + TimeZone = "UTC-05:00", + // Add more professional details here + }; + + return userProfile; + } + + public IActionResult Profile() + { + // Retrieve user profile data + var userProfile = GetUserProfile(); + + // Pass the user profile data to the view + return View(userProfile); + } + } +} diff --git a/WhoAtX/Models/UserProfileViewModel.cs b/WhoAtX/Models/UserProfileViewModel.cs new file mode 100644 index 0000000..b5a5fd1 --- /dev/null +++ b/WhoAtX/Models/UserProfileViewModel.cs @@ -0,0 +1,18 @@ +namespace WhoAtX.Models; + +public class UserProfileViewModel +{ + public string Name { get; set; } + public string Pronouns { get; set; } + public string NamePronunciationPath { get; set; } + + // Add more personal details here + + public string AreasOfKnowledge { get; set; } + public string Projects { get; set; } + public string Team { get; set; } + public string WorkingHours { get; set; } + public string TimeZone { get; set; } + + // Add more professional details here +} diff --git a/WhoAtX/Views/Home/Privacy.cshtml b/WhoAtX/Views/Home/Privacy.cshtml deleted file mode 100644 index 2479fb7..0000000 --- a/WhoAtX/Views/Home/Privacy.cshtml +++ /dev/null @@ -1,6 +0,0 @@ -@{ - ViewData["Title"] = "Privacy Policy"; -} -

@ViewData["Title"]

- -

Use this page to detail your site's privacy policy.

diff --git a/WhoAtX/Views/Shared/_Layout.cshtml b/WhoAtX/Views/Shared/_Layout.cshtml index b09677a..afa6713 100644 --- a/WhoAtX/Views/Shared/_Layout.cshtml +++ b/WhoAtX/Views/Shared/_Layout.cshtml @@ -23,7 +23,7 @@ Home diff --git a/WhoAtX/Views/User/Profile.cshtml b/WhoAtX/Views/User/Profile.cshtml new file mode 100644 index 0000000..046aa9a --- /dev/null +++ b/WhoAtX/Views/User/Profile.cshtml @@ -0,0 +1,61 @@ +@model UserProfileViewModel + +@{ + ViewData["Title"] = "User Profile"; +} + +
+

User Profile

+ +
+
+

Personal Information

+
+
Name:
+
@Model.Name
+ +
Pronouns:
+
@Model.Pronouns
+ +
Name Pronunciation:
+
+ @if (!string.IsNullOrEmpty(Model.NamePronunciationPath)) + { + + } + else + { + No pronunciation available + } +
+ + +
+
+ +
+

Professional Information

+
+
Areas of Knowledge:
+
@Model.AreasOfKnowledge
+ +
Projects:
+
@Model.Projects
+ +
Team:
+
@Model.Team
+ +
Working Hours:
+
@Model.WorkingHours
+ +
Time Zone:
+
@Model.TimeZone
+ + +
+
+
+
\ No newline at end of file