@@ -230,7 +230,7 @@ <h2 class="text-3xl font-bold">Recent Hackathons</h2>
230230 </ div >
231231 < div class ="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6 ">
232232 {% for hackathon in recent_hackathons %}
233- < div class ="bg-white rounded-xl shadow-lg overflow-hidden hover:shadow-xl transition-shadow duration-300 border border-gray-200 ">
233+ < div class ="bg-white rounded-xl shadow-lg overflow-hidden hover:shadow-xl transition-shadow duration-300 border border-gray-200 flex flex-col ">
234234 {% if hackathon.banner_image %}
235235 < div class ="h-48 bg-cover bg-center "
236236 style ="background-image: url('{{ hackathon.banner_image.url }}') "> </ div >
@@ -239,7 +239,7 @@ <h2 class="text-3xl font-bold">Recent Hackathons</h2>
239239 < i class ="fas fa-code text-white text-5xl "> </ i >
240240 </ div >
241241 {% endif %}
242- < div class ="p-6 ">
242+ < div class ="p-6 flex flex-col flex-grow ">
243243 < div class ="flex justify-between items-start mb-2 ">
244244 < h3 class ="text-xl font-bold text-gray-900 "> {{ hackathon.name }}</ h3 >
245245 < span class ="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium {{ hackathon.status_badge_class }} ">
@@ -250,16 +250,18 @@ <h3 class="text-xl font-bold text-gray-900">{{ hackathon.name }}</h3>
250250 Organized by < a href ="{% url 'organization_detail' slug=hackathon.organization.slug %} "
251251 class ="text-[#e74c3c] hover:underline "> {{ hackathon.organization.name }}</ a >
252252 </ p >
253- < p class ="text-gray-700 mb-4 line-clamp-3 "> {{ hackathon.description|truncatechars:150 }}</ p >
253+ < p class ="text-gray-700 mb-4 line-clamp-3 flex-grow "> {{ hackathon.description|truncatechars:150 }}</ p >
254254 < div class ="flex items-center text-sm text-gray-500 mb-4 ">
255255 < i class ="far fa-calendar mr-2 "> </ i >
256256 < span > {{ hackathon.start_time|date:"M d, Y" }} - {{ hackathon.end_time|date:"M d, Y" }}</ span >
257257 </ div >
258- < a href ="{% url 'hackathon_detail' slug=hackathon.slug %} "
259- class ="inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-[#e74c3c] hover:bg-red-700 transition-colors w-full ">
260- View Details
261- < i class ="fas fa-arrow-right ml-2 "> </ i >
262- </ a >
258+ < div class ="mt-auto ">
259+ < a href ="{% url 'hackathon_detail' slug=hackathon.slug %} "
260+ class ="inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-[#e74c3c] hover:bg-red-700 transition-colors w-full ">
261+ View Details
262+ < i class ="fas fa-arrow-right ml-2 "> </ i >
263+ </ a >
264+ </ div >
263265 </ div >
264266 </ div >
265267 {% endfor %}
@@ -856,7 +858,7 @@ <h2 class="text-3xl font-bold text-center mb-12">Latest Blog Posts</h2>
856858 < div class ="grid grid-cols-1 md:grid-cols-2 gap-8 mb-12 ">
857859 {% if latest_blog_posts %}
858860 {% for post in latest_blog_posts %}
859- < div class ="bg-white rounded-lg shadow-lg border-2 border-[#e74c3c] overflow-hidden ">
861+ < div class ="bg-white rounded-lg shadow-lg border-2 border-[#e74c3c] overflow-hidden flex flex-col h-full ">
860862 {% if post.image %}
861863 < div class ="w-full h-48 overflow-hidden ">
862864 < img src ="{{ post.image.url }} "
@@ -866,7 +868,7 @@ <h2 class="text-3xl font-bold text-center mb-12">Latest Blog Posts</h2>
866868 class ="w-full h-full object-cover ">
867869 </ div >
868870 {% endif %}
869- < div class ="p-6 ">
871+ < div class ="p-6 flex flex-col flex-grow ">
870872 < h3 class ="text-xl font-semibold mb-2 "> {{ post.title }}</ h3 >
871873 < div class ="flex items-center gap-4 text-sm text-gray-500 mb-4 ">
872874 < span class ="flex items-center gap-1 ">
@@ -878,9 +880,14 @@ <h3 class="text-xl font-semibold mb-2">{{ post.title }}</h3>
878880 {{ post.created_at|timesince }} ago
879881 </ span >
880882 </ div >
881- < p class ="text-gray-700 mb-4 "> {{ post.content|truncatewords:30 }}</ p >
882- < a href ="{% url 'post_detail' slug=post.slug %} "
883- class ="text-[#e74c3c] hover:text-[#c0392b] font-medium "> Read more</ a >
883+ < p class ="text-gray-700 mb-4 flex-grow "> {{ post.content|truncatewords:30 }}</ p >
884+ < div class ="mt-auto ">
885+ < a href ="{% url 'post_detail' slug=post.slug %} "
886+ class ="inline-flex items-center text-[#e74c3c] hover:text-[#c0392b] font-medium transition-colors duration-200 ">
887+ Read more
888+ < i class ="fas fa-arrow-right ml-2 "> </ i >
889+ </ a >
890+ </ div >
884891 </ div >
885892 </ div >
886893 {% endfor %}
0 commit comments