Add prefetch to links

This commit is contained in:
Peter Stockings
2024-12-24 01:12:27 +11:00
parent 4df28eaf2f
commit 7c3499d07a
2 changed files with 4 additions and 4 deletions

View File

@@ -15,8 +15,8 @@
<a href="/" class="text-2xl font-bold">BP Tracker</a>
<div>
{% if current_user.is_authenticated %}
<a href="{{ url_for('main.dashboard') }}" class="px-4 py-2 hover:underline">Dashboard</a>
<a href="{{ url_for('user.profile') }}" class="px-4 py-2 hover:underline">Profile</a>
<a rel="prefetch" href="{{ url_for('main.dashboard') }}" class="px-4 py-2 hover:underline">Dashboard</a>
<a rel="prefetch" href="{{ url_for('user.profile') }}" class="px-4 py-2 hover:underline">Profile</a>
<a href="{{ url_for('auth.logout') }}" class="px-4 py-2 bg-red-500 rounded hover:bg-red-600">Logout</a>
{% else %}
<a href="{{ url_for('auth.login') }}" class="px-4 py-2 hover:underline">Login</a>