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
@@ -3,27 +3,27 @@
|
||||
{% block content_inner %}
|
||||
<div class="flex items-center justify-between mb-6">
|
||||
<div>
|
||||
<h1 class="text-2xl font-bold text-gray-900">Projects</h1>
|
||||
<p class="text-gray-500 mt-1">Manage and track all your projects.</p>
|
||||
<h1 class="text-2xl font-bold text-primary">Projects</h1>
|
||||
<p class="text-tertiary mt-1">Manage and track all your projects.</p>
|
||||
</div>
|
||||
<a href="{% url 'project_create' %}" class="btn bg-blue-600 text-white hover:bg-blue-700 border-0">
|
||||
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/></svg>
|
||||
<a href="{% url 'project_create' %}" class="px-3 py-1.5 rounded-lg text-sm font-medium bg-blue-600 text-white hover:bg-blue-700 transition-colors">
|
||||
<svg class="w-4 h-4 mr-1 inline" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/></svg>
|
||||
New Project
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 lg:grid-cols-4 gap-4 mb-6">
|
||||
{% for s in status_counts %}
|
||||
<div class="bg-white rounded-xl p-4 shadow-sm border border-gray-100">
|
||||
<p class="text-sm text-gray-500">{{ s.status|title }}</p>
|
||||
<p class="text-2xl font-bold text-gray-900">{{ s.count }}</p>
|
||||
<div class="stat-card">
|
||||
<p class="text-sm text-tertiary">{{ s.status|title }}</p>
|
||||
<p class="text-2xl font-bold text-primary">{{ s.count }}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="grid gap-4">
|
||||
{% for project in projects %}
|
||||
<div class="bg-white rounded-2xl shadow-sm border border-gray-100 hover:shadow-md transition-shadow">
|
||||
<div class="card-surface hover:border-blue-300 transition-colors">
|
||||
<div class="p-5">
|
||||
<div class="flex items-start justify-between">
|
||||
<div class="flex items-start gap-4">
|
||||
@@ -31,30 +31,30 @@
|
||||
{{ project.name|first|upper }}
|
||||
</div>
|
||||
<div>
|
||||
<a href="{% url 'project_detail' project.pk %}" class="text-lg font-semibold text-gray-900 hover:text-blue-600 transition-colors">{{ project.name }}</a>
|
||||
<a href="{% url 'project_detail' project.pk %}" class="text-lg font-semibold text-primary hover:text-blue-600 transition-colors">{{ project.name }}</a>
|
||||
<div class="flex items-center gap-3 mt-1">
|
||||
<span class="text-xs px-2.5 py-1 rounded-full font-medium {% if project.status == 'active' %}bg-green-100 text-green-700{% elif project.status == 'planning' %}bg-blue-100 text-blue-700{% elif project.status == 'review' %}bg-amber-100 text-amber-700{% else %}bg-gray-100 text-gray-700{% endif %}">
|
||||
<span class="text-xs px-2 py-1 rounded-full font-medium border {% if project.status == 'active' %}bg-green-50 text-green-700 border-green-200{% elif project.status == 'planning' %}bg-blue-50 text-blue-700 border-blue-200{% elif project.status == 'review' %}bg-amber-50 text-amber-700 border-amber-200{% else %}bg-gray-50 text-gray-700 border-gray-200{% endif %}">
|
||||
{{ project.get_status_display }}
|
||||
</span>
|
||||
<span class="text-xs text-gray-500">Client: {{ project.client.username }}</span>
|
||||
<span class="text-xs text-tertiary">Client: {{ project.client.username }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<a href="{% url 'project_detail' project.pk %}" class="btn btn-sm btn-ghost">View</a>
|
||||
<a href="{% url 'project_detail' project.pk %}" class="px-3 py-1.5 rounded-lg text-sm font-medium text-secondary hover:bg-hover border border-soft transition-colors">View</a>
|
||||
{% if user.is_admin %}
|
||||
<a href="{% url 'project_edit' project.pk %}" class="btn btn-sm btn-ghost">Edit</a>
|
||||
<label for="delete-project-{{ project.pk }}" class="btn btn-sm bg-red-50 text-red-600 hover:bg-red-100 border-0">Delete</label>
|
||||
<a href="{% url 'project_edit' project.pk %}" class="px-3 py-1.5 rounded-lg text-sm font-medium text-secondary hover:bg-hover border border-soft transition-colors">Edit</a>
|
||||
<label for="delete-project-{{ project.pk }}" class="px-3 py-1.5 rounded-lg text-sm font-medium bg-red-50 text-red-700 hover:bg-red-100 border border-red-200 transition-colors cursor-pointer">Delete</label>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% empty %}
|
||||
<div class="bg-white rounded-2xl shadow-sm border border-gray-100 p-12 text-center">
|
||||
<svg class="w-12 h-12 text-gray-300 mx-auto mb-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"/></svg>
|
||||
<p class="text-gray-500">No projects yet.</p>
|
||||
<a href="{% url 'project_create' %}" class="btn bg-blue-600 text-white hover:bg-blue-700 border-0 mt-3">Create your first project</a>
|
||||
<div class="card-surface p-12 text-center">
|
||||
<svg class="w-12 h-12 text-muted mx-auto mb-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"/></svg>
|
||||
<p class="text-tertiary">No projects yet.</p>
|
||||
<a href="{% url 'project_create' %}" class="inline-block mt-3 px-3 py-1.5 rounded-lg text-sm font-medium bg-blue-600 text-white hover:bg-blue-700 transition-colors">Create your first project</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user