From 43f2a74254683e8d475885b75710b268ca63c4b8 Mon Sep 17 00:00:00 2001 From: jjuarez26base Date: Thu, 19 Mar 2026 10:53:07 -0500 Subject: [PATCH] Made getting a specific users profile page through search bar easier, now simply requires /profile/{username} Setup navbar links in profile.html to be more adaptive. In templates.html, removed links that go to itself. Changed nav-bar button CSS, so navbar buttons are aligned with links. --- .../controller/ProfileController.java | 2 +- src/main/resources/static/css/default.css | 1 - src/main/resources/static/css/landing.css | 2 +- src/main/resources/static/css/nav.css | 8 ++++-- src/main/resources/static/css/templates.css | 2 +- src/main/resources/templates/profile.html | 25 +++++++++++++------ src/main/resources/templates/templates.html | 7 +----- 7 files changed, 28 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/basecamp/HyprLink/controller/ProfileController.java b/src/main/java/com/basecamp/HyprLink/controller/ProfileController.java index b82ae60..85b4612 100644 --- a/src/main/java/com/basecamp/HyprLink/controller/ProfileController.java +++ b/src/main/java/com/basecamp/HyprLink/controller/ProfileController.java @@ -36,7 +36,7 @@ public String getProfileById(@PathVariable Long id, Model model) { @GetMapping("/profile") public String searchProfile(Principal principal, Model model) { return processUserInfoByUsername(principal.getName(), principal, model); } - @GetMapping("/profile/username/{userName}") + @GetMapping("/profile/{userName}") public String getProfileByUsername(@PathVariable String userName, Principal principal, Model model) { return processUserInfoByUsername(userName, principal, model); } diff --git a/src/main/resources/static/css/default.css b/src/main/resources/static/css/default.css index 6d5584d..bfd1f96 100644 --- a/src/main/resources/static/css/default.css +++ b/src/main/resources/static/css/default.css @@ -74,7 +74,6 @@ body { .nav-right button { border: none; background: none; - padding: 0 0 3px 0; } .nav-right button:hover { color: #3b82f6; diff --git a/src/main/resources/static/css/landing.css b/src/main/resources/static/css/landing.css index f46a2ab..3fa8a00 100644 --- a/src/main/resources/static/css/landing.css +++ b/src/main/resources/static/css/landing.css @@ -98,7 +98,7 @@ body { .nav-center button, .nav-right button { border: none; background: none; - padding: 0 0 3px 0; + padding: 0; } .nav-center button:hover, .nav-right button:hover { color: #3b82f6; diff --git a/src/main/resources/static/css/nav.css b/src/main/resources/static/css/nav.css index 18fa7a1..e6a73ac 100644 --- a/src/main/resources/static/css/nav.css +++ b/src/main/resources/static/css/nav.css @@ -54,10 +54,14 @@ align-items: center; } -.nav-center a, .nav-center button { +.nav-center a { font-size: 1.2rem; } +.nav-center button { + font-size: 1rem; +} + .nav button:hover { color: #3b82f6; } @@ -87,7 +91,7 @@ .nav-center button, .nav-right button { border: none; background: none; - padding: 0 0 3px 0; + padding: 0; } .nav-center button:hover, .nav-right button:hover { color: #3b82f6; diff --git a/src/main/resources/static/css/templates.css b/src/main/resources/static/css/templates.css index 7d859e1..1f5bba3 100644 --- a/src/main/resources/static/css/templates.css +++ b/src/main/resources/static/css/templates.css @@ -98,7 +98,7 @@ body { .nav-center button, .nav-right button { border: none; background: none; - padding: 0 0 3px 0; + padding: 0; } .nav-center button:hover, .nav-right button:hover { color: #3b82f6; diff --git a/src/main/resources/templates/profile.html b/src/main/resources/templates/profile.html index a9a5b44..0341926 100644 --- a/src/main/resources/templates/profile.html +++ b/src/main/resources/templates/profile.html @@ -17,19 +17,30 @@ -