Add prefetch to links
This commit is contained in:
@@ -15,8 +15,8 @@
|
|||||||
<a href="/" class="text-2xl font-bold">BP Tracker</a>
|
<a href="/" class="text-2xl font-bold">BP Tracker</a>
|
||||||
<div>
|
<div>
|
||||||
{% if current_user.is_authenticated %}
|
{% if current_user.is_authenticated %}
|
||||||
<a href="{{ url_for('main.dashboard') }}" class="px-4 py-2 hover:underline">Dashboard</a>
|
<a rel="prefetch" 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('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>
|
<a href="{{ url_for('auth.logout') }}" class="px-4 py-2 bg-red-500 rounded hover:bg-red-600">Logout</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{{ url_for('auth.login') }}" class="px-4 py-2 hover:underline">Login</a>
|
<a href="{{ url_for('auth.login') }}" class="px-4 py-2 hover:underline">Login</a>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<!-- Header Section with "Add New Reading" Button -->
|
<!-- Header Section with "Add New Reading" Button -->
|
||||||
<div class="flex justify-between items-center">
|
<div class="flex justify-between items-center">
|
||||||
<h1 class="text-2xl font-bold text-gray-800">Dashboard</h1>
|
<h1 class="text-2xl font-bold text-gray-800">Dashboard</h1>
|
||||||
<a href="{{ url_for('main.add_reading') }}"
|
<a rel="prefetch" href="{{ url_for('main.add_reading') }}"
|
||||||
class="bg-blue-600 text-white px-4 py-2 rounded shadow hover:bg-blue-700">
|
class="bg-blue-600 text-white px-4 py-2 rounded shadow hover:bg-blue-700">
|
||||||
+ Add New Reading
|
+ Add New Reading
|
||||||
</a>
|
</a>
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
<td class="p-2">{{ reading.diastolic }}</td>
|
<td class="p-2">{{ reading.diastolic }}</td>
|
||||||
<td class="p-2">{{ reading.heart_rate }}</td>
|
<td class="p-2">{{ reading.heart_rate }}</td>
|
||||||
<td class="p-2">
|
<td class="p-2">
|
||||||
<a href="{{ url_for('main.edit_reading', reading_id=reading.id) }}"
|
<a rel="prefetch" href="{{ url_for('main.edit_reading', reading_id=reading.id) }}"
|
||||||
class="text-blue-600 hover:underline">Edit</a>
|
class="text-blue-600 hover:underline">Edit</a>
|
||||||
<form method="POST" action="{{ url_for('main.delete_reading', reading_id=reading.id) }}"
|
<form method="POST" action="{{ url_for('main.delete_reading', reading_id=reading.id) }}"
|
||||||
class="inline">
|
class="inline">
|
||||||
|
|||||||
Reference in New Issue
Block a user