mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 13:31:08 -05:00
Adjust header layout to move search button and enlarge user and theme icons
Modify the enhanced_header.html template to reposition the search button to the left, increase the size of the user icon and theme toggle buttons, and adjust the padding on the search input. Replit-Commit-Author: Agent Replit-Commit-Session-Id: d72060d9-0700-4897-8f16-fcb1d36ca106 Replit-Commit-Checkpoint-Type: full_checkpoint
This commit is contained in:
@@ -140,7 +140,7 @@ Includes: Browse menu, advanced search, theme toggle, user dropdown, mobile menu
|
|||||||
<input
|
<input
|
||||||
type="search"
|
type="search"
|
||||||
placeholder="Search parks, rides..."
|
placeholder="Search parks, rides..."
|
||||||
class="w-full min-w-0 pl-10 pr-14 h-10 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
|
class="w-full min-w-0 pl-10 pr-3 h-10 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
|
||||||
x-model="query"
|
x-model="query"
|
||||||
@input.debounce.300ms="search()"
|
@input.debounce.300ms="search()"
|
||||||
hx-get="{% url 'search:search' %}"
|
hx-get="{% url 'search:search' %}"
|
||||||
@@ -149,7 +149,6 @@ Includes: Browse menu, advanced search, theme toggle, user dropdown, mobile menu
|
|||||||
hx-include="this"
|
hx-include="this"
|
||||||
name="q"
|
name="q"
|
||||||
/>
|
/>
|
||||||
<c-button variant="default" size="default" class="absolute right-2 top-1/2 transform -translate-y-1/2">Search</c-button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Search Results Dropdown -->
|
<!-- Search Results Dropdown -->
|
||||||
@@ -167,11 +166,19 @@ Includes: Browse menu, advanced search, theme toggle, user dropdown, mobile menu
|
|||||||
|
|
||||||
<!-- Desktop Right Side -->
|
<!-- Desktop Right Side -->
|
||||||
<div class="hidden md:flex items-center gap-4 shrink-0">
|
<div class="hidden md:flex items-center gap-4 shrink-0">
|
||||||
|
<!-- Search Button -->
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground hover:bg-primary/90 h-10 px-4"
|
||||||
|
>
|
||||||
|
Search
|
||||||
|
</button>
|
||||||
|
|
||||||
<!-- Theme Toggle -->
|
<!-- Theme Toggle -->
|
||||||
<button
|
<button
|
||||||
x-data="themeToggle"
|
x-data="themeToggle"
|
||||||
@click="toggleTheme()"
|
@click="toggleTheme()"
|
||||||
class="inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-10 w-10"
|
class="inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-12 w-12"
|
||||||
>
|
>
|
||||||
<i class="fas fa-sun h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"></i>
|
<i class="fas fa-sun h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"></i>
|
||||||
<i class="fas fa-moon absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"></i>
|
<i class="fas fa-moon absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"></i>
|
||||||
@@ -182,22 +189,22 @@ Includes: Browse menu, advanced search, theme toggle, user dropdown, mobile menu
|
|||||||
<div class="relative" x-data="{ open: false }" @click.outside="open = false">
|
<div class="relative" x-data="{ open: false }" @click.outside="open = false">
|
||||||
<button
|
<button
|
||||||
@click="open = !open"
|
@click="open = !open"
|
||||||
class="inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-10 w-10"
|
class="inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-12 w-12"
|
||||||
>
|
>
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
{% if user.profile.avatar %}
|
{% if user.profile.avatar %}
|
||||||
<img
|
<img
|
||||||
src="{{ user.profile.avatar.url }}"
|
src="{{ user.profile.avatar.url }}"
|
||||||
alt="{{ user.get_full_name|default:user.username }}"
|
alt="{{ user.get_full_name|default:user.username }}"
|
||||||
class="h-6 w-6 rounded-full object-cover"
|
class="h-8 w-8 rounded-full object-cover"
|
||||||
/>
|
/>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="h-6 w-6 rounded-full bg-primary flex items-center justify-center text-primary-foreground text-xs font-medium">
|
<div class="h-8 w-8 rounded-full bg-primary flex items-center justify-center text-primary-foreground text-sm font-medium">
|
||||||
{{ user.get_full_name.0|default:user.username.0|upper }}
|
{{ user.get_full_name.0|default:user.username.0|upper }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<i class="fas fa-user h-5 w-5"></i>
|
<i class="fas fa-user h-6 w-6"></i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user