Initial Commit

This commit is contained in:
2026-06-11 15:05:08 +08:00
commit ea8e41e688
21 changed files with 2317 additions and 0 deletions
+61
View File
@@ -0,0 +1,61 @@
{% macro property_card(prop) %}
<div class="bg-white rounded-xl shadow-md overflow-hidden card-hover">
<a href="/properties/{{ prop.id }}" class="block">
<div class="relative h-52 bg-gray-200">
{% if prop.primary_image %}
<img src="/static/{{ prop.primary_image.image_path }}"
alt="{{ prop.title }}"
class="w-full h-full object-cover">
{% else %}
<div class="flex items-center justify-center h-full text-gray-400">
<svg class="w-12 h-12" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"
d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-4 0a1 1 0 01-1-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 01-1 1h-2z"/>
</svg>
</div>
{% endif %}
{% if prop.is_featured %}
<span class="absolute top-3 left-3 bg-warm text-primary text-xs font-bold px-2.5 py-1 rounded-full">
Featured
</span>
{% endif %}
{% if prop.status == 'sold' %}
<span class="absolute top-3 right-3 bg-red-600 text-white text-xs font-bold px-2.5 py-1 rounded-full">
Sold
</span>
{% elif prop.status == 'pending' %}
<span class="absolute top-3 right-3 bg-yellow-500 text-white text-xs font-bold px-2.5 py-1 rounded-full">
Pending
</span>
{% endif %}
</div>
</a>
<div class="p-5">
<div class="flex items-center justify-between mb-2">
<span class="text-2xl font-bold text-primary">${{ "{:,}".format(prop.price) }}</span>
</div>
<h3 class="text-lg font-semibold text-gray-800 mb-1 truncate">
<a href="/properties/{{ prop.id }}" class="hover:text-accent transition">{{ prop.title }}</a>
</h3>
<p class="text-sm text-gray-500 mb-3 flex items-center">
<svg class="w-4 h-4 mr-1 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"/>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z"/>
</svg>
{{ prop.city }}, {{ prop.state }}
</p>
<div class="flex items-center justify-between text-sm text-gray-600 border-t pt-3 whitespace-nowrap">
<span>{{ prop.bedrooms }} bd</span>
<span>{{ prop.bathrooms }} ba</span>
<span>{{ "{:,}".format(prop.area_sqft) }} sqft</span>
</div>
</div>
</div>
{% endmacro %}