Update website to use new reusable components for common elements

Refactor HTML templates to incorporate Django Cotton components for buttons, forms, and other UI elements.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: eff39de1-3afa-446d-a965-acaf61837fc7
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/d6d61dac-164d-45dd-929f-7dcdfd771b64/eff39de1-3afa-446d-a965-acaf61837fc7/55dLPZG
This commit is contained in:
pac7
2025-09-21 13:34:51 +00:00
committed by pacnpal
parent 26ff320806
commit 0cf6805c18
10 changed files with 688 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ Includes: Browse menu, advanced search, theme toggle, user dropdown, mobile menu
{% endcomment %}
{% load static %}
{% load cotton %}
<header class="sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
<div class="flex h-14 items-center justify-between px-4 max-w-full">
@@ -149,7 +150,7 @@ Includes: Browse menu, advanced search, theme toggle, user dropdown, mobile menu
hx-include="this"
name="q"
/>
{% include 'components/ui/button.html' with variant='default' size='sm' text='Search' class='absolute right-1 top-1/2 transform -translate-y-1/2' %}
<c-ui.button variant="default" size="sm" text="Search" button_classes="absolute right-1 top-1/2 transform -translate-y-1/2" />
</div>
<!-- Search Results Dropdown -->
@@ -315,7 +316,7 @@ Includes: Browse menu, advanced search, theme toggle, user dropdown, mobile menu
hx-swap="beforeend"
class="cursor-pointer"
>
{% include 'components/ui/button.html' with variant='outline' size='sm' text='Login' %}
<c-ui.button variant="outline" size="sm" text="Login" />
</div>
<div
hx-get="{% url 'account_signup' %}"
@@ -323,7 +324,7 @@ Includes: Browse menu, advanced search, theme toggle, user dropdown, mobile menu
hx-swap="beforeend"
class="cursor-pointer"
>
{% include 'components/ui/button.html' with variant='default' size='sm' text='Join' %}
<c-ui.button variant="default" size="sm" text="Join" />
</div>
</div>
{% endif %}
@@ -440,7 +441,7 @@ Includes: Browse menu, advanced search, theme toggle, user dropdown, mobile menu
hx-include="this"
name="q"
/>
{% include 'components/ui/button.html' with variant='default' size='sm' text='Search' class='absolute right-1 top-1/2 transform -translate-y-1/2' %}
<c-ui.button variant="default" size="sm" text="Search" button_classes="absolute right-1 top-1/2 transform -translate-y-1/2" />
</div>
<div id="mobile-search-results" class="mt-2"></div>
</div>