Potion/internal/templates/pages/profile.templ
Hayden Hargreaves a1f8fe60db (UI/STYLE): Created a simple UI for the profile page.
Backend requirements are needed now! That will be the next PR.
2025-06-24 22:25:21 -07:00

39 lines
1.3 KiB
Plaintext

package templates
import "github.com/haydenhargreaves/Potion/internal/templates/components"
templ userDetailsSection(name, email, url string) {
<section class="w-full flex flex-col justify-center my-8 py-4 border-b border-gray-300">
<div class="w-full p-4 md:p-8 flex items-center gap-x-8">
<img class="w-24 md:w-32 border-2 border-blue-500 rounded-full shadow-blue-500 shadow select-none" src={ url }/>
<div class="">
<h1 class="text-md md:text-2xl font-semibold">{ name }</h1>
<p class="text-xs md:text-sm">{ email }</p>
</div>
</div>
</section>
}
templ logoutSection() {
<section class="w-full flex flex-col justify-center items-center py-8 border-t border-gray-300">
<button
class="border border-red-500 text-red-500 w-9/10 md:w-1/3 py-2 rounded-lg hover:cursor-pointer hover:bg-red-100 duration-300"
>
Logout
</button>
</section>
}
templ ProfilePage() {
@components.Navbar(" profile")
<div class="w-full h-screen flex justify-center">
<div
class="mx-2 md:mx-0 w-full md:w-1/2 md:pt-14 border-l border-r border-gray-300 bg-white flex flex-col justify-between"
>
@userDetailsSection("Hayden Hargreaves", "hhargreaves2006@gmail.com",
"https://lh3.googleusercontent.com/a/ACg8ocLeT6ltjQIkiBy1MgMJDbQxtBfMVfn8sP4e1t7d0bCJeHFdpcea=s96-c")
@logoutSection()
</div>
</div>
}