AcaMate_Web/Program/Views/Academy/Common/TopNavAcademy.razor
SEAN-59 c04152dac8 [] TopNav 관련 로직 추가 및 변경
1. 모바일에서 화면에 제대로 그려지지 않는 오류 수정
2. 화살표 그림 icon으로 직접 이미지 추가
3. 드롭다운 활성화시 뒷 배경 누르면 드롭다운 사라지는 기능 추가
2025-06-24 17:55:26 +09:00

49 lines
2.5 KiB
Plaintext

<div class="flex items-center justify-between whitespace-nowrap border-b border-solid border-b-[#f0f2f5] h-[72px] w-full bg-white px-4">
<div id="AcademyDrop" class="relative flex items-center gap-4 text-[#111418] flex-1">
<button class="flex items-center gap-2 hover:text-blue-600" @onclick="ToggleAcademyDropdown">
<h2 class="hidden md:block text-text-title text-lg font-bold leading-tight tracking-[-0.015em]">AcaMate</h2>
<img src="Resources/Images/Icon/Down.png" alt="아래"
class="w-6 h-6 object-cover transition-transform duration-200 @(isAcademyDropdownOpen ? "rotate-180" : "")" />
</button>
@if (isAcademyDropdownOpen)
{
<div class="absolute top-full left-0 mt-2 w-64 bg-white rounded-lg shadow-lg py-2 z-50">
<div class="px-4 py-2 border-b border-gray-200">
<h3 class="font-semibold text-gray-900">학원 정보</h3>
</div>
<div class="max-h-60 overflow-y-auto">
@foreach (var academy in academyItems)
{
<a href="/am/@academy.bid" class="block px-4 py-2 text-text-title hover:bg-gray-100">
@academy.name
</a>
}
</div>
</div>
}
</div>
@if (isAcademyDropdownOpen)
{
<div @onclick="OnClickOutside" class="fixed inset-0 z-40" style="background: transparent;"></div>
}
<div class="hidden md:flex flex-1 justify-end gap-8">
<div class="flex flex-1 justify-end gap-8">
<div class="flex items-center gap-6">
<img src="Resources/Images/Icon/Notification_SET.png" alt="알림" class="w-6 h-6 object-cover" />
<img src="Resources/Images/Icon/Setting.png" alt="설정" class="w-6 h-6 object-cover"/>
<img src="Resources/Images/Icon/Link.png" alt="바로가기" class="w-6 h-6 object-cover"/>
<img src="Resources/Images/Icon/Logout.png" alt="로그아웃" class="w-6 h-6 object-cover"/>
@* <div class="w-10 h-10 rounded-full bg-gray-200 overflow-hidden"> *@
@* <img src="Resources/Images/Icon/Logout.png" alt="로그아웃" class="w-full h-full object-cover"/> *@
@* <a class="text-text-title font-medium leading-normal hover:text-blue-600" href="/about">About</a> *@
@* </div> *@
</div>
</div>
</div>
</div>