refactor: Use Jekyll collection and include for listings

This commit is contained in:
Kerby Martino authored and Kerby Martino (aider) committed 2025-05-10 03:54:53 +08:00
1 parent 76f30933ad
commit 024b276db6
5 files changed
+321 -670

No files matched your search

+58
View File
@@ -0,0 +1,58 @@
<div class="pb-3 lg:pb-0 xl:pb-1 rounded-sm hover:shadow-xl bg-gray-200">
<div class="relative h-60 sm:h-65 md:h-60 lg:h-58 xl:h-63 xxl:h-64">
<a href="{{ listing.url }}">
<div class="flex justify-center absolute w-34 h-10 md:h-8 m-4 py-2 text-sm md:w-24.7 md:text-xs bg-indigo-700 text-white tracking-tighter">
<p>{{ listing.price }}</p>
<img alt=""
class="flex absolute top-0 right-0 h-10 md:h-8 p-2 pt-3 -mr-10 md:-mr-7 bg-green-300 text-xs"
src="{{ listing.message_icon }}">
</div>
<img alt=""
class="absolute h-10 w-10 p-2 md:h-8 md:w-8 md:p-1.3 right-0 bottom-0 bg-indigo-900"
onclick="toggleNavbar('collapse-tool-tip')"
src="{{ listing.options_icon }}">
<div class="z-10 absolute right-0 bottom-0 bg-indigo-900 hidden rounded-lg -mb-18 font-sans" id="collapse-tool-tip">
<a class="flex px-4 py-2" href="#">
<p class="flex text-sm xl:text-md text-gray-700 hover:text-gray-400 hover:font-semibold">
<img alt="" class="mr-2 mt-1" onclick="toggleMap('example-collapse-direction')" src="{{ listing.directions_icon }}">
Directions
</p>
</a>
<a class="flex px-4 py-2" href="#">
<p class="flex text-sm xl:text-md text-gray-700 hover:text-gray-400 hover:font-semibold">
<img alt="" class="mr-2 mt-1" src="{{ listing.link_icon }}">
Copy link
</p>
</a>
<a class="flex px-4 py-2">
<p class="flex text-sm xl:text-md text-gray-700 hover:text-gray-400 hover:font-semibold"
onclick="toggleSidebar('report-form-modal');toggleOverlay('example-collapse-overlay')">
<img alt="" class="mr-2 mt-1" src="{{ listing.report_icon }}">
Report this
</p>
</a>
</div>
<img alt="" class="h-full w-full object-cover cursor-pointer" onclick="toggleSidebar('inquiry-modal');toggleOverlay('collapse-overlay')" src="{{ listing.image }}">
</a>
</div>
<div class="relative flex px-3 mt-2 lg:px-2 lg:mt-3 xl:mt-1 xl:px-4 xxl:px-3">
<a href="{{ listing.url }}">
<p class="sm:w-10/12 md:w-auto lg:w-11/12 font-bold text-lg tracking-wider md:tracking-normal xl:tracking-wide xxl:tracking-tighter leading-7 lg:leading-6 xl:leading-7 break-words">
{{ listing.title }}
</p>
</a>
<img alt="" class="ml-6 mr-2 sm:-mt-4 lg:ml-0 lg:mr-0 xl:mt-0 cursor-pointer"
onclick="toggleClick('toggle-click')" src="{{ listing.heart_icon }}">
<img alt=""
class="absolute right-0 mr-5 mt-4 sm:mr-5 sm:mt-2 md:mt-1 lg:mr-3 xl:mt-3 xxl:mt-3 cursor-pointer hidden"
id="toggle-click" onclick="toggleClick('toggle-click')" src="{{ listing.heart_full_icon }}">
</div>
<div class="flex justify-between pl-3 lg:pt-2 lg:px-2 xl:px-4 xl:pt-0 xxl:px-3">
<p class="sm:w-5/12 md:w-auto xl:w-9/12 xxl:w-10/12 flex text-xs text-gray-600 capitalize font-sans">
{{ listing.address }}
</p>
<p class="pr-2 ml-6 md:ml-2 lg:pr-0 flex-none text-xs text-gray-600 tracking-wide font-sans">
{{ listing.timestamp }}
</p>
</div>
</div>