fix: a href remains clickable when active

This commit is contained in:
nate 2026-03-19 16:21:23 +04:00
parent 30468e378d
commit f37d3e7f48
1 changed files with 2 additions and 10 deletions

View File

@ -1,16 +1,8 @@
<nav class="border-b border-border-subtle bg-[#0a0a0a]/70 backdrop-blur-md px-8 py-4 flex items-center justify-between sticky top-0 z-40"> <nav class="border-b border-border-subtle bg-[#0a0a0a]/70 backdrop-blur-md px-8 py-4 flex items-center justify-between sticky top-0 z-40">
<a href="/dashboard/home" class="text-xl font-bold tracking-tight group">Ping<span class="text-blue-400 transition-all group-hover:drop-shadow-[0_0_8px_rgba(59,130,246,0.4)]">QL</span></a> <a href="/dashboard/home" class="text-xl font-bold tracking-tight group">Ping<span class="text-blue-400 transition-all group-hover:drop-shadow-[0_0_8px_rgba(59,130,246,0.4)]">QL</span></a>
<div class="flex items-center gap-5 text-sm text-gray-500"> <div class="flex items-center gap-5 text-sm text-gray-500">
<% if (it.nav === 'monitors') { %> <a href="/dashboard/home" class="<%= it.nav === 'monitors' ? 'text-gray-200 relative after:absolute after:bottom-[-18px] after:left-0 after:right-0 after:h-[2px] after:bg-blue-500 after:rounded-full' : 'hover:text-gray-300' %> transition-colors">Monitors</a>
<span class="text-gray-200 relative after:absolute after:bottom-[-18px] after:left-0 after:right-0 after:h-[2px] after:bg-blue-500 after:rounded-full">Monitors</span> <a href="/dashboard/settings" class="<%= it.nav === 'settings' ? 'text-gray-200 relative after:absolute after:bottom-[-18px] after:left-0 after:right-0 after:h-[2px] after:bg-blue-500 after:rounded-full' : 'hover:text-gray-300' %> transition-colors">Settings</a>
<% } else { %>
<a href="/dashboard/home" class="hover:text-gray-300 transition-colors">Monitors</a>
<% } %>
<% if (it.nav === 'settings') { %>
<span class="text-gray-200 relative after:absolute after:bottom-[-18px] after:left-0 after:right-0 after:h-[2px] after:bg-blue-500 after:rounded-full">Settings</span>
<% } else { %>
<a href="/dashboard/settings" class="hover:text-gray-300 transition-colors">Settings</a>
<% } %>
<a href="/account/logout" class="hover:text-gray-300 transition-colors">Logout</a> <a href="/account/logout" class="hover:text-gray-300 transition-colors">Logout</a>
</div> </div>
</nav> </nav>