feat(templates): enrichUI with Tailwind styling and messaging component improvements
- Add custom border, background, and spacing utilities to base template - Enhance message notification styling and layout - Update delete modal button appearance and behavior - Refine comment card component with Tailwind classes and responsive behavior - Adjust sidebar responsiveness for mobile view
This commit is contained in:
50 files changed
+839
-861
No files matched your search
@@ -1,33 +1,20 @@
|
||||
<nav class="bg-white border-b border-gray-200 fixed top-0 left-0 right-0 z-30 h-16">
|
||||
<div class="px-4 h-full flex items-center justify-between">
|
||||
<div class="flex items-center gap-3">
|
||||
<button @click="sidebarOpen = !sidebarOpen" class="lg:hidden btn btn-ghost btn-sm btn-square">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/></svg>
|
||||
</button>
|
||||
<a href="{% url 'home' %}" class="text-xl font-bold text-blue-600">ProMan</a>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="hidden sm:flex items-center gap-1 mr-4 text-sm text-gray-500">
|
||||
<span class="w-2 h-2 rounded-full bg-green-400"></span>
|
||||
{{ user.get_role_display }}
|
||||
</div>
|
||||
<div class="dropdown dropdown-end">
|
||||
<div tabindex="0" role="button" class="flex items-center gap-2 btn btn-ghost btn-sm">
|
||||
<div class="w-8 h-8 rounded-full bg-blue-600 flex items-center justify-center text-white text-sm font-medium">
|
||||
{{ user.first_name|first|default:user.username|first|upper }}
|
||||
</div>
|
||||
<span class="hidden sm:inline text-sm font-medium">{{ user.get_full_name|default:user.username }}</span>
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/></svg>
|
||||
</div>
|
||||
<ul tabindex="0" class="dropdown-content menu p-2 shadow-lg bg-white rounded-xl w-48 mt-2 border">
|
||||
<li><a href="{% url 'profile' %}" class="flex items-center gap-2"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/></svg>Profile</a></li>
|
||||
{% if user.is_admin %}
|
||||
<li><a href="{% url 'user_list' %}" class="flex items-center gap-2"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197m13.5-9a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z"/></svg>Manage Users</a></li>
|
||||
{% endif %}
|
||||
<div class="divider my-1"></div>
|
||||
<li><a href="{% url 'logout' %}" class="flex items-center gap-2 text-red-600"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"/></svg>Logout</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<header class="fixed top-0 left-0 right-0 h-16 bg-white/80 backdrop-blur-md border-b border-subtle z-30 flex items-center justify-between px-4 sm:px-6">
|
||||
<div class="flex items-center gap-4">
|
||||
<button @click="sidebarOpen = !sidebarOpen" class="lg:hidden p-2 text-secondary hover:text-primary rounded-lg hover:bg-hover transition-colors" aria-label="Toggle sidebar">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/></svg>
|
||||
</button>
|
||||
<a href="/" class="flex items-center gap-2 text-primary font-bold text-lg no-underline">
|
||||
<svg class="w-7 h-7 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 17V7m0 10a2 2 0 01-2 2H5a2 2 0 01-2-2V7a2 2 0 012-2h2a2 2 0 012 2m0 10a2 2 0 002 2h2a2 2 0 002-2M9 7a2 2 0 012-2h2a2 2 0 012 2m0 10V7"/></svg>
|
||||
ProMan
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="flex items-center gap-3">
|
||||
<span class="hidden sm:inline text-sm text-tertiary">{{ user.get_full_name|default:user.username }}</span>
|
||||
<div class="w-8 h-8 rounded-full bg-blue-100 text-blue-700 flex items-center justify-center text-sm font-semibold">
|
||||
{{ user.get_initials }}
|
||||
</div>
|
||||
<a href="{% url 'logout' %}" class="p-2 text-tertiary hover:text-secondary rounded-lg hover:bg-hover transition-colors" title="Log out">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"/></svg>
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
Reference in new issue
Block a user