211 lines
14 KiB
Plaintext
211 lines
14 KiB
Plaintext
<!-- Sidebar Inquiry Modal -->
|
|
<aside id="inquiry-modal" class="overscroll-none overflow-y-auto fixed inset-0 w-screen z-50 justify-center hidden bg-black bg-opacity-50" aria-labelledby="inquiry-modal-title" role="dialog" aria-modal="true">
|
|
<div class="relative w-full h-full max-w-lg ml-auto bg-white shadow-xl flex flex-col lg:max-w-xl">
|
|
<!-- Modal Header with Close Button -->
|
|
<div class="sticky top-0 bg-white z-10 px-4 sm:px-6 py-4 border-b border-gray-200">
|
|
<div class="flex items-center justify-between">
|
|
<h2 class="text-lg font-medium text-gray-900 font-heading" id="inquiry-modal-title">
|
|
Inquire this Listing
|
|
</h2>
|
|
<button type="button" onclick="toggleNavbar('inquiry-modal'); if (typeof toggleOverlay === 'function') toggleOverlay('collapse-overlay');" class="bg-white rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-300">
|
|
<span class="sr-only">Close</span>
|
|
<svg class="h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<!-- Modal Body -->
|
|
<div class="flex-1 overflow-y-auto p-4 sm:p-6">
|
|
<!-- Static Info: Title, Address Snippet, Posted Ago -->
|
|
<div class="mb-4">
|
|
<h2 class="text-xl font-semibold text-gray-800 mb-1 font-heading">Cozy coworking space in the heart of the south</h2>
|
|
<p class="text-sm text-gray-600 mb-1">Incub8 space, Centennial Road, Brgy. Batong Dalig, Kawit, Cavite</p>
|
|
<p class="text-sm text-gray-500">Posted 5 hrs ago</p>
|
|
</div>
|
|
|
|
<!-- Action Buttons -->
|
|
<div class="flex justify-between items-center gap-2 mb-4 flex-wrap">
|
|
<div class="flex gap-2"> <!-- Group for left-aligned icons -->
|
|
<div class="w-10 h-10 bg-green-900 rounded-full flex items-center justify-center hover:border-green-300 border-2 border-transparent cursor-pointer" title="Copy Link">
|
|
<img src="assets/svg/icon_link.svg" class="w-5 h-5" alt="Link">
|
|
</div>
|
|
</div>
|
|
<div class="flex gap-2"> <!-- Group for right-aligned icons -->
|
|
<div class="w-10 h-10 bg-green-900 rounded-full flex items-center justify-center hover:border-green-300 border-2 border-transparent cursor-pointer" title="Report Listing">
|
|
<img src="assets/svg/icon_report.svg" class="w-5 h-5" alt="Report">
|
|
</div>
|
|
<div class="w-10 h-10 bg-green-900 rounded-full flex items-center justify-center hover:border-green-300 border-2 border-transparent cursor-pointer" title="Add to Favorites">
|
|
<img src="assets/svg/icon_like.svg" class="w-5 h-5" alt="Like">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Tab Navigation -->
|
|
<div class="border-b border-gray-200 mb-4">
|
|
<nav class="-mb-px flex space-x-4" aria-label="Tabs">
|
|
<button onclick="switchInquiryTab('details')" id="tab-details" class="inquiry-tab-button whitespace-nowrap py-3 px-2 border-b-2 font-medium text-sm text-green-900 border-green-900 inline-flex items-center" aria-current="page">
|
|
<img src="assets/svg/icon_action.svg" class="w-4 h-4" alt="Details">
|
|
<span class="ml-2">Details</span>
|
|
</button>
|
|
<button onclick="switchInquiryTab('directions')" id="tab-directions" class="inquiry-tab-button whitespace-nowrap py-3 px-2 border-b-2 font-medium text-sm text-gray-500 hover:text-gray-700 hover:border-gray-300 border-transparent inline-flex items-center">
|
|
<img src="assets/svg/icon_directions.svg" class="w-4 h-4" alt="Directions">
|
|
<span class="ml-2">Location</span>
|
|
</button>
|
|
<button onclick="switchInquiryTab('inquire')" id="tab-inquire" class="inquiry-tab-button whitespace-nowrap py-3 px-2 border-b-2 font-medium text-sm text-gray-500 hover:text-gray-700 hover:border-gray-300 border-transparent inline-flex items-center">
|
|
<img src="assets/svg/icon_call.svg" class="w-4 h-4" alt="Inquire">
|
|
<span class="ml-2">Inquire</span>
|
|
</button>
|
|
</nav>
|
|
</div>
|
|
|
|
<!-- Tab Content Panels -->
|
|
<div id="details-tab-content" class="inquiry-tab-content space-y-4">
|
|
<!-- Listing Photo -->
|
|
<img src="assets/img/SAMPLE3.png" alt="Listing Photo" class="h-56 w-full object-cover rounded-base mb-4">
|
|
|
|
<!-- Description -->
|
|
<div>
|
|
<h3 class="text-md font-semibold text-gray-800 mb-1 font-heading">Description</h3>
|
|
<p class="text-sm text-gray-600">
|
|
A vibrant and fully-equipped coworking space designed for productivity and collaboration. Enjoy high-speed internet, comfortable workstations, meeting rooms, and a supportive community. Perfect for freelancers, startups, and remote teams.
|
|
</p>
|
|
</div>
|
|
|
|
<!-- Space Type -->
|
|
<div>
|
|
<h3 class="text-md font-semibold text-gray-800 mb-1 font-heading">Space Type</h3>
|
|
<p class="text-sm text-gray-600">Coworking Desk</p>
|
|
</div>
|
|
|
|
<!-- Pricing -->
|
|
<div>
|
|
<h3 class="text-md font-semibold text-gray-800 mb-1 font-heading">Pricing</h3>
|
|
<p class="text-sm text-gray-600">₱1,200 / Daily</p>
|
|
</div>
|
|
|
|
<!-- Availability Date Range -->
|
|
<div>
|
|
<h3 class="text-md font-semibold text-gray-800 mb-1 font-heading">Availability Dates</h3>
|
|
<div class="grid grid-cols-1 sm:grid-cols-2 gap-x-3 gap-y-1 text-sm text-gray-600">
|
|
<div>
|
|
<span class="font-medium text-gray-700">From:</span> 2025-06-01
|
|
</div>
|
|
<div>
|
|
<span class="font-medium text-gray-700">Until:</span> 2025-12-31
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Weekly Availability -->
|
|
<div>
|
|
<h3 class="text-md font-semibold text-gray-800 mb-1 font-heading">Weekly Hours</h3>
|
|
<ul class="text-sm text-gray-600 list-disc pl-5 space-y-1">
|
|
<li>Monday: 9:00 AM - 6:00 PM</li>
|
|
<li>Wednesday: 9:00 AM - 6:00 PM</li>
|
|
<li>Friday: 9:00 AM - 5:00 PM</li>
|
|
<li>Saturday: 10:00 AM - 4:00 PM (By appointment)</li>
|
|
<li><span class="font-medium">Tuesday, Thursday, Sunday:</span> Closed</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="directions-tab-content" class="inquiry-tab-content hidden space-y-4">
|
|
<h3 class="text-md font-semibold text-gray-800 mb-1 font-heading">Location for Cozy coworking space</h3>
|
|
<p class="text-sm text-gray-600 mb-3">Incub8 space, Centennial Road, Brgy. Batong Dalig, Kawit, Cavite</p>
|
|
|
|
<div id="mapbox-map-container-inquiry" class="h-64 sm:h-80 w-full bg-gray-200 rounded-base mb-4 border border-gray-300 flex items-center justify-center text-gray-500 p-4 text-center">
|
|
Map will load here. Ensure Mapbox GL JS is initialized and targets this container.
|
|
</div>
|
|
<a href="https://www.google.com/maps/dir/?api=1&destination=Incub8+space,+Centennial+Road,+Brgy.+Batong+Dalig,+Kawit,+Cavite" target="_blank" rel="noopener noreferrer" class="w-full bg-green-900 text-gray-100 font-semibold py-2 px-4 rounded-lg inline-flex items-center justify-center border-2 border-transparent hover:border-green-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-300 font-heading">
|
|
Get Directions
|
|
</a>
|
|
<p class="text-sm mt-2 text-gray-600 font-thin text-center">
|
|
Opens Google Maps in a new tab.
|
|
</p>
|
|
</div>
|
|
|
|
<div id="inquire-tab-content" class="inquiry-tab-content hidden space-y-3">
|
|
<form class="space-y-3">
|
|
<div>
|
|
<label for="inquiry-full-name" class="block text-sm font-medium text-gray-700 mb-1 font-heading">Full Name</label>
|
|
<input type="text" id="inquiry-full-name" placeholder="Full Name" class="w-full px-3 py-2 border border-gray-300 rounded-sm focus:outline-none focus:border-green-900 text-sm" required>
|
|
<p class="text-sm text-red-500 mt-1 hidden">Invalid Name</p>
|
|
</div>
|
|
<div class="flex gap-3">
|
|
<div class="w-1/2">
|
|
<label for="inquiry-contact-num" class="block text-sm font-medium text-gray-700 mb-1 font-heading">Contact #</label>
|
|
<input type="tel" id="inquiry-contact-num" placeholder="Contact #" class="w-full px-3 py-2 border border-gray-300 rounded-sm focus:outline-none focus:border-green-900 text-sm" required>
|
|
<p class="text-sm text-red-500 mt-1 hidden">Invalid Phone Number</p>
|
|
</div>
|
|
<div class="w-1/2">
|
|
<label for="inquiry-email" class="block text-sm font-medium text-gray-700 mb-1 font-heading">Email Address</label>
|
|
<input type="email" id="inquiry-email" placeholder="Email Address" class="w-full px-3 py-2 border border-gray-300 rounded-sm focus:outline-none focus:border-green-900 text-sm" required>
|
|
<p class="text-sm text-red-500 mt-1 hidden">Invalid Email Address</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<label for="inquiry-message" class="block text-sm font-medium text-gray-700 mb-1 font-heading">Optional Message</label>
|
|
<textarea id="inquiry-message" rows="3" placeholder="Optional Message" class="w-full px-3 py-2 border border-gray-300 rounded-sm focus:outline-none focus:border-green-900 text-sm"></textarea>
|
|
<p class="text-sm text-red-500 mt-1 hidden">Invalid Message</p>
|
|
</div>
|
|
<div class="pt-2">
|
|
<button type="submit" class="w-full bg-green-900 text-gray-100 font-semibold py-2 px-4 rounded-base inline-flex items-center justify-center border-2 border-transparent hover:border-green-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-300 font-heading">
|
|
<img src="assets/svg/icon_spinner.svg" class="h-4 animate-spin mr-2 hidden" alt="Loading"> Send Inquiry
|
|
</button>
|
|
<p class="text-sm mt-2 text-gray-600 font-thin text-center">
|
|
By submitting, you agree to the <b>Terms and Conditions</b>
|
|
</p>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div> <!-- Closes Modal Body -->
|
|
|
|
<script type="text/javascript">
|
|
function switchInquiryTab(tabId) {
|
|
const tabContents = document.querySelectorAll('.inquiry-tab-content');
|
|
tabContents.forEach(content => {
|
|
content.classList.add('hidden');
|
|
});
|
|
|
|
const tabButtons = document.querySelectorAll('.inquiry-tab-button');
|
|
tabButtons.forEach(button => {
|
|
button.classList.remove('text-green-900', 'border-green-300');
|
|
button.classList.add('text-gray-500', 'hover:text-gray-700', 'hover:border-gray-300', 'border-transparent');
|
|
button.removeAttribute('aria-current');
|
|
});
|
|
|
|
document.getElementById(tabId + '-tab-content').classList.remove('hidden');
|
|
const activeButton = document.getElementById('tab-' + tabId);
|
|
activeButton.classList.add('text-green-900', 'border-green-300');
|
|
activeButton.classList.remove('text-gray-500', 'hover:text-gray-700', 'hover:border-gray-300', 'border-transparent');
|
|
activeButton.setAttribute('aria-current', 'page');
|
|
|
|
// Update modal title based on tab - optional
|
|
// if (tabId === 'location') {
|
|
// document.getElementById('inquiry-modal-title').textContent = 'Location & Directions';
|
|
// } else if (tabId === 'inquire') {
|
|
// document.getElementById('inquiry-modal-title').textContent = 'Send Inquiry';
|
|
// } else {
|
|
// document.getElementById('inquiry-modal-title').textContent = 'Listing Details';
|
|
// }
|
|
|
|
// Placeholder for Mapbox initialization if the location tab is active
|
|
if (tabId === 'directions') {
|
|
// e.g., if (typeof mapboxgl !== 'undefined' && !mapInstanceInquiry) {
|
|
// mapInstanceInquiry = new mapboxgl.Map({ container: 'mapbox-map-container-inquiry', style: 'YOUR_MAPBOX_STYLE_URL', center: [lng, lat], zoom: 15 });
|
|
// new mapboxgl.Marker().setLngLat([lng, lat]).addTo(mapInstanceInquiry);
|
|
// }
|
|
}
|
|
}
|
|
|
|
// Set initial tab
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
switchInquiryTab('details');
|
|
});
|
|
</script>
|
|
</div> <!-- Closing div for "flex-1 overflow-y-auto p-4 sm:p-6" -->
|
|
</div> <!-- Closing div for "relative w-full h-full max-w-lg ml-auto..." -->
|
|
</aside>
|
|
<!-- End Sidebar Inquiry Modal -->
|