Make dashboard, person, settings page htmx driven

This commit is contained in:
Peter Stockings
2022-11-23 22:36:45 +11:00
parent 1181937b6d
commit 41bfce9513
9 changed files with 170 additions and 154 deletions

View File

@@ -75,8 +75,8 @@
<div class="flex-1 flex flex-col pt-5 pb-4 overflow-y-auto">
<div class="flex-1 px-3 bg-white divide-y space-y-1">
<div class="space-y-2 pt-2">
<a href="{{ url_for('dashboard') }}"
class="text-base text-gray-900 font-normal rounded-lg flex items-center p-2 hover:bg-gray-100 group {{ is_selected_page(url_for('dashboard')) }}">
<a hx-get="{{ url_for('dashboard') }}" hx-push-url="true" hx-target="#container"
class="text-base text-gray-900 font-normal rounded-lg flex items-center p-2 hover:bg-gray-100 group cursor-pointer {{ is_selected_page(url_for('dashboard')) }}">
<svg class="w-6 h-6 text-gray-500 group-hover:text-gray-900 transition duration-75"
fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path d="M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"></path>
@@ -92,8 +92,8 @@
</ul>
<div class="space-y-2 pt-2">
<a href="{{ url_for('settings') }}"
class="text-base text-gray-900 font-normal rounded-lg hover:bg-gray-100 group transition duration-75 flex items-center p-2 {{ is_selected_page(url_for('settings')) }}">
<a hx-get="{{ url_for('settings') }}" hx-push-url="true" hx-target="#container"
class="text-base text-gray-900 font-normal rounded-lg hover:bg-gray-100 group transition duration-75 flex items-center p-2 cursor-pointer {{ is_selected_page(url_for('settings')) }}">
<svg class="w-6 h-6 text-gray-500 group-hover:text-gray-900 transition duration-75"
fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
data-darkreader-inline-fill="" style="--darkreader-inline-fill:currentColor;">
@@ -110,7 +110,7 @@
</aside>
<div class="h-full w-full bg-gray-50 relative overflow-y-auto lg:ml-64">
<main>
<div class="pt-6 px-4">
<div class="pt-6 px-4" id="container">
{% block content %}
{% endblock %}
</div>