undefined / tenants.html
markngr's picture
implement the above prompt to all the needed pages, some still have duplicate buttons and show only a single line of data instead of a 10 entry data that I had told you. Go through each page individually and fix all the issues stated above and any other issue you will find
3fa0c93 verified
Raw History Blame Contribute Delete
39.9 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tenants - RoostRuler</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<style>
.tenant-card:hover {
transform: translateY(-3px);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
</style>
</head>
<body class="bg-gray-50 font-sans antialiased">
<!-- Top Navigation -->
<header class="bg-white shadow-sm sticky top-0 z-50">
<div class="container mx-auto px-4">
<div class="flex justify-between items-center py-3">
<div class="flex items-center space-x-2">
<button class="md:hidden p-2 rounded-md hover:bg-gray-100" id="menuToggle">
<i data-feather="menu" class="w-5 h-5"></i>
</button>
<a href="index.html" class="flex items-center space-x-2">
<i data-feather="home" class="text-primary w-6 h-6"></i>
<span class="text-xl font-bold text-primary">RoostRuler</span>
</a>
</div>
<nav class="hidden md:flex space-x-8">
<a href="index.html" class="text-dark hover:text-primary transition">Dashboard</a>
<a href="properties.html" class="text-dark hover:text-primary transition">Properties</a>
<a href="tenants.html" class="text-primary font-medium">Tenants</a>
<a href="payments.html" class="text-dark hover:text-primary transition">Payments</a>
<a href="reports.html" class="text-dark hover:text-primary transition">Reports</a>
</nav>
<div class="flex items-center space-x-4">
<div class="relative">
<i data-feather="bell" class="w-5 h-5 text-dark"></i>
<span class="absolute -top-1 -right-1 bg-accent text-xs text-white rounded-full w-4 h-4 flex items-center justify-center">3</span>
</div>
<div class="flex items-center space-x-2">
<a href="owner-profile.html">
<img src="http://static.photos/people/200x200/42" alt="User" class="w-8 h-8 rounded-full object-cover">
</a>
<span class="hidden md:inline text-sm font-medium">John Doe</span>
</div>
</div>
</div>
</div>
</header>
<!-- Mobile Sidebar -->
<div class="fixed inset-0 bg-black bg-opacity-50 z-40 hidden" id="mobileSidebarBackdrop"></div>
<div class="fixed inset-y-0 left-0 transform -translate-x-full w-64 bg-white shadow-lg z-50 transition duration-300 ease-in-out" id="mobileSidebar">
<div class="flex flex-col h-full p-4">
<div class="flex justify-between items-center mb-8">
<div class="flex items-center space-x-2">
<i data-feather="home" class="text-primary w-6 h-6"></i>
<span class="text-xl font-bold text-primary">RoostRuler</span>
</div>
<button id="closeSidebar">
<i data-feather="x" class="w-5 h-5"></i>
</button>
</div>
<nav class="flex-1 space-y-2">
<a href="index.html" class="block px-4 py-2 rounded bg-primary bg-opacity-10 text-primary flex items-center">
<i data-feather="home" class="w-5 h-5 mr-2"></i> Home
</a>
<a href="dashboard.html" class="block px-4 py-2 rounded hover:bg-gray-100">Dashboard</a>
<a href="properties.html" class="block px-4 py-2 rounded hover:bg-gray-100">Properties</a>
<a href="tenants.html" class="block px-4 py-2 rounded bg-primary bg-opacity-10 text-primary">Tenants</a>
<a href="payments.html" class="block px-4 py-2 rounded hover:bg-gray-100">Payments</a>
<a href="reports.html" class="block px-4 py-2 rounded hover:bg-gray-100">Reports</a>
</nav>
<div class="mt-auto pt-4 border-t border-gray-200">
<div class="flex items-center space-x-2">
<img src="http://static.photos/people/200x200/42" alt="User" class="w-8 h-8 rounded-full object-cover">
<span class="text-sm font-medium">John Doe</span>
</div>
</div>
</div>
</div>
<main class="container mx-auto px-4 py-8">
<!-- Tenant Management Header -->
<div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-8">
<div>
<h1 class="text-2xl font-bold text-dark">Tenant Management</h1>
<p class="text-gray-600 mt-1">Manage all your tenants and their information</p>
</div>
<div class="mt-4 md:mt-0 flex space-x-3">
<button class="bg-primary hover:bg-opacity-90 text-white py-2 px-4 rounded-md transition flex items-center">
<i data-feather="plus" class="w-4 h-4 mr-2"></i>
Add Tenant
</button>
<button class="bg-white border border-gray-200 hover:bg-gray-50 text-dark py-2 px-4 rounded-md transition flex items-center">
<i data-feather="download" class="w-4 h-4 mr-2"></i>
Export
</button>
</div>
</div>
<!-- Filters -->
<div class="bg-white rounded-lg shadow p-4 mb-6">
<div class="flex flex-wrap items-center gap-3">
<div class="relative flex-grow">
<i data-feather="search" class="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"></i>
<input type="text" placeholder="Search tenants..." class="pl-10 pr-4 py-2 w-full border border-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent">
</div>
<select class="border border-gray-200 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent">
<option>All Properties</option>
<option>Downtown Loft</option>
<option>Lakeside Villa</option>
<option>Urban Office</option>
</select>
<select class="border border-gray-200 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent">
<option>All Status</option>
<option>Current</option>
<option>Past</option>
<option>Prospective</option>
</select>
<button class="bg-primary hover:bg-opacity-90 text-white py-2 px-4 rounded-md transition">
Apply Filters
</button>
</div>
</div>
<!-- Tenant List -->
<div class="bg-white rounded-lg shadow overflow-hidden">
<div class="px-6 py-4 border-b border-gray-100 flex justify-between items-center">
<h2 class="text-lg font-semibold text-dark">18 Tenants</h2>
<div class="flex items-center space-x-2">
<button class="p-2 rounded-md hover:bg-gray-100">
<i data-feather="list" class="w-4 h-4 text-primary"></i>
</button>
<button class="p-2 rounded-md hover:bg-gray-100">
<i data-feather="grid" class="w-4 h-4 text-gray-400"></i>
</button>
</div>
</div>
<!-- Table View -->
<div class="overflow-x-auto">
<div class="flex justify-between items-center mb-4">
<div class="flex items-center space-x-2">
<label class="text-sm text-gray-500">Show</label>
<select id="rowsPerPage" class="border border-gray-200 rounded-md px-2 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-primary">
<option value="10">10</option>
<option value="25">25</option>
<option value="50">50</option>
<option value="100">100</option>
</select>
<span class="text-sm text-gray-500">entries</span>
</div>
<div class="flex space-x-2">
<button id="listViewBtn" class="p-2 rounded-md hover:bg-gray-100 text-primary">
<i data-feather="list" class="w-4 h-4"></i>
</button>
<button id="gridViewBtn" class="p-2 rounded-md hover:bg-gray-100 text-gray-400">
<i data-feather="grid" class="w-4 h-4"></i>
</button>
</div>
</div>
<table id="tenantsTable" class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Tenant</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Property</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Lease Dates</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Balance</th>
<th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<!-- First 10 rows will be shown by default -->
<!-- Tenant 1 -->
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap">
<a href="property-details.html" class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full object-cover" src="http://static.photos/people/200x200/100" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-dark">Sarah Johnson</div>
<div class="text-sm text-gray-500">sarah@example.com</div>
</div>
</a>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Downtown Loft</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Jun 1, 2022 - May 31, 2024</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Current</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-dark">$0.00</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<a href="#" class="text-primary hover:text-opacity-80 mr-3">Profile</a>
<a href="#" class="text-red-600 hover:text-opacity-80">Remove</a>
</td>
</tr>
<!-- Tenant 2 -->
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap">
<a href="property-details.html" class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full object-cover" src="http://static.photos/people/200x200/101" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-dark">Michael Brown</div>
<div class="text-sm text-gray-500">michael@example.com</div>
</div>
</a>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Lakeside Villa</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Mar 15, 2023 - Mar 14, 2024</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Current</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-dark">$0.00</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<a href="#" class="text-primary hover:text-opacity-80 mr-3">Profile</a>
<a href="#" class="text-red-600 hover:text-opacity-80">Remove</a>
</td>
</tr>
<!-- Tenant 3 -->
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap">
<a href="property-details.html" class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full object-cover" src="http://static.photos/people/200x200/102" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-dark">Emily Davis</div>
<div class="text-sm text-gray-500">emily@example.com</div>
</div>
</a>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Garden View</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Apr 1, 2022 - Mar 31, 2023</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">Past</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-dark">$0.00</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<a href="#" class="text-primary hover:text-opacity-80 mr-3">Profile</a>
<a href="#" class="text-red-600 hover:text-opacity-80">Remove</a>
</td>
</tr>
<!-- Tenant 4 -->
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap">
<a href="property-details.html" class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full object-cover" src="http://static.photos/people/200x200/103" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-dark">David Wilson</div>
<div class="text-sm text-gray-500">david@example.com</div>
</div>
</a>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Mountain View</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Jan 1, 2023 - Dec 31, 2023</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Current</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-dark">$0.00</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<a href="#" class="text-primary hover:text-opacity-80 mr-3">Profile</a>
<a href="#" class="text-red-600 hover:text-opacity-80">Remove</a>
</td>
</tr>
<!-- Tenant 5 -->
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap">
<a href="property-details.html" class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full object-cover" src="http://static.photos/people/200x200/104" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-dark">Olivia Martinez</div>
<div class="text-sm text-gray-500">olivia@example.com</div>
</div>
</a>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Sunny Terrace</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Feb 1, 2023 - Jan 31, 2024</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Current</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-dark">$0.00</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<a href="#" class="text-primary hover:text-opacity-80 mr-3">Profile</a>
<a href="#" class="text-red-600 hover:text-opacity-80">Remove</a>
</td>
</tr>
<!-- Tenant 6 -->
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap">
<a href="property-details.html" class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full object-cover" src="http://static.photos/people/200x200/105" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-dark">Robert Taylor</div>
<div class="text-sm text-gray-500">robert@example.com</div>
</div>
</a>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Hillside Cottage</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">May 1, 2022 - Apr 30, 2023</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">Prospective</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-dark">$0.00</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<a href="#" class="text-primary hover:text-opacity-80 mr-3">Profile</a>
<a href="#" class="text-red-600 hover:text-opacity-80">Remove</a>
</td>
</tr>
<!-- Tenant 7 -->
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap">
<a href="property-details.html" class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full object-cover" src="http://static.photos/people/200x200/106" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-dark">Sophia Anderson</div>
<div class="text-sm text-gray-500">sophia@example.com</div>
</div>
</a>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">City Center</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Jun 1, 2023 - May 31, 2024</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Current</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-dark">$0.00</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<a href="#" class="text-primary hover:text-opacity-80 mr-3">Profile</a>
<a href="#" class="text-red-600 hover:text-opacity-80">Remove</a>
</td>
</tr>
<!-- Tenant 8 -->
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap">
<a href="property-details.html" class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full object-cover" src="http://static.photos/people/200x200/107" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-dark">James Thomas</div>
<div class="text-sm text-gray-500">james@example.com</div>
</div>
</a>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Park Avenue</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Jul 1, 2022 - Jun 30, 2023</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Current</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-dark">$0.00</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<a href="#" class="text-primary hover:text-opacity-80 mr-3">Profile</a>
<a href="#" class="text-red-600 hover:text-opacity-80">Remove</a>
</td>
</tr>
<!-- Tenant 9 -->
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap">
<a href="property-details.html" class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full object-cover" src="http://static.photos/people/200x200/108" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-dark">Emma White</div>
<div class="text-sm text-gray-500">emma@example.com</div>
</div>
</a>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Ocean View</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Aug 1, 2022 - Jul 31, 2023</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Current</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-dark">$0.00</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<a href="#" class="text-primary hover:text-opacity-80 mr-3">Profile</a>
<a href="#" class="text-red-600 hover:text-opacity-80">Remove</a>
</td>
</tr>
<!-- Tenant 10 -->
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap">
<a href="property-details.html" class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full object-cover" src="http://static.photos/people/200x200/109" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-dark">William Clark</div>
<div class="text-sm text-gray-500">william@example.com</div>
</div>
</a>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Forest Retreat</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Sep 1, 2022 - Aug 31, 2023</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Current</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-dark">$0.00</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<a href="#" class="text-primary hover:text-opacity-80 mr-3">Profile</a>
<a href="#" class="text-red-600 hover:text-opacity-80">Remove</a>
</td>
</tr>
<!-- 9 more rows... -->
</tbody>
</table>
<div class="flex justify-between items-center mt-4">
<div class="text-sm text-gray-500" id="showingInfo">
Showing 1 to 10 of 18 entries
</div>
<nav class="flex space-x-2">
<button id="prevBtn" disabled class="px-3 py-1 rounded border bg-gray-100 text-gray-400 cursor-not-allowed">
Previous
</button>
<button id="nextBtn" class="px-3 py-1 rounded border bg-white hover:bg-gray-50">
Next
</button>
</nav>
</div>
</div>
</tbody>
</table>
</div>
<!-- Pagination -->
<div class="px-6 py-4 border-t border-gray-100 flex items-center justify-between">
<div class="flex-1 flex justify-between sm:hidden">
<a href="#" class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"> Previous </a>
<a href="#" class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"> Next </a>
</div>
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
<div>
<p class="text-sm text-gray-700">Showing <span class="font-medium">1</span> to <span class="font-medium">10</span> of <span class="font-medium">18</span> results</p>
</div>
<div>
<nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
<span class="sr-only">Previous</span>
<i data-feather="chevron-left" class="w-4 h-4"></i>
</a>
<a href="#" aria-current="page" class="z-10 bg-primary border-primary text-white relative inline-flex items-center px-4 py-2 border text-sm font-medium"> 1 </a>
<a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium"> 2 </a>
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
<span class="sr-only">Next</span>
<i data-feather="chevron-right" class="w-4 h-4"></i>
</a>
</nav>
</div>
</div>
</div>
</div>
</main>
<footer class="bg-dark text-white py-8">
<div class="container mx-auto px-4">
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
<div>
<h3 class="text-lg font-semibold mb-4">RoostRuler</h3>
<p class="text-secondary text-sm">Property mastery made easy.</p>
</div>
<div>
<h4 class="font-medium mb-4">Quick Links</h4>
<ul class="space-y-2 text-sm text-secondary">
<li><a href="index.html" class="hover:text-white transition">Dashboard</a></li>
<li><a href="properties.html" class="hover:text-white transition">Properties</a></li>
<li><a href="tenants.html" class="hover:text-white transition">Tenants</a></li>
<li><a href="payments.html" class="hover:text-white transition">Payments</a></li>
</ul>
</div>
<div>
<h4 class="font-medium mb-4">Resources</h4>
<ul class="space-y-2 text-sm text-secondary">
<li><a href="#" class="hover:text-white transition">Documentation</a></li>
<li><a href="#" class="hover:text-white transition">Support</a></li>
<li><a href="#" class="hover:text-white transition">API</a></li>
</ul>
</div>
<div>
<h4 class="font-medium mb-4">Get in Touch</h4>
<ul class="space-y-2 text-sm text-secondary">
<li class="flex items-center">
<i data-feather="mail" class="w-4 h-4 mr-2"></i>
<span>support@roostruler.com</span>
</li>
<li class="flex items-center">
<i data-feather="phone" class="w-4 h-4 mr-2"></i>
<span>+1 (555) 987-6543</span>
</li>
</ul>
</div>
</div>
<div class="border-t border-gray-700 mt-8 pt-6 flex flex-col md:flex-row justify-between items-center">
<p class="text-secondary text-sm mb-4 md:mb-0">© 2023 RoostRuler. All rights reserved.</p>
<div class="flex space-x-4">
<a href="#" class="text-secondary hover:text-white transition">
<i data-feather="facebook" class="w-5 h-5"></i>
</a>
<a href="#" class="text-secondary hover:text-white transition">
<i data-feather="twitter" class="w-5 h-5"></i>
</a>
<a href="#" class="text-secondary hover:text-white transition">
<i data-feather="linkedin" class="w-5 h-5"></i>
</a>
</div>
</div>
</div>
</footer>
<script>
feather.replace();
// Mobile menu toggle
document.addEventListener('DOMContentLoaded', function() {
const menuToggle = document.getElementById('menuToggle');
const closeSidebar = document.getElementById('closeSidebar');
const mobileSidebar = document.getElementById('mobileSidebar');
const backdrop = document.getElementById('mobileSidebarBackdrop');
menuToggle.addEventListener('click', function() {
mobileSidebar.classList.remove('-translate-x-full');
backdrop.classList.remove('hidden');
document.body.classList.add('overflow-hidden');
});
closeSidebar.addEventListener('click', function() {
mobileSidebar.classList.add('-translate-x-full');
backdrop.classList.add('hidden');
document.body.classList.remove('overflow-hidden');
});
backdrop.addEventListener('click', function() {
mobileSidebar.classList.add('-translate-x-full');
backdrop.classList.add('hidden');
document.body.classList.remove('overflow-hidden');
});
});
// Pagination functionality
document.addEventListener('DOMContentLoaded', function() {
const rowsPerPage = document.getElementById('rowsPerPage');
const table = document.getElementById('tenantsTable');
const showingInfo = document.getElementById('showingInfo');
const prevBtn = document.getElementById('prevBtn');
const nextBtn = document.getElementById('nextBtn');
const listViewBtn = document.getElementById('listViewBtn');
const gridViewBtn = document.getElementById('gridViewBtn');
let currentPage = 1;
let rowsPerPageValue = parseInt(rowsPerPage.value);
function updateTable() {
const rows = table.querySelectorAll('tbody tr');
const totalRows = rows.length;
const totalPages = Math.ceil(totalRows / rowsPerPageValue);
rows.forEach((row, index) => {
if (index >= (currentPage - 1) * rowsPerPageValue && index < currentPage * rowsPerPageValue) {
row.style.display = '';
} else {
row.style.display = 'none';
}
});
showingInfo.textContent = `Showing ${((currentPage - 1) * rowsPerPageValue) + 1} to ${Math.min(currentPage * rowsPerPageValue, totalRows)} of ${totalRows} entries`;
prevBtn.disabled = currentPage === 1;
nextBtn.disabled = currentPage === totalPages;
}
// View toggle buttons
listViewBtn.addEventListener('click', function() {
this.classList.add('text-primary');
gridViewBtn.classList.remove('text-primary');
gridViewBtn.classList.add('text-gray-400');
// Implement grid view toggle logic here
});
gridViewBtn.addEventListener('click', function() {
this.classList.add('text-primary');
listViewBtn.classList.remove('text-primary');
listViewBtn.classList.add('text-gray-400');
// Implement list view toggle logic here
});
// Rows per page change
rowsPerPage.addEventListener('change', function() {
rowsPerPageValue = parseInt(this.value);
currentPage = 1;
updateTable();
});
// Pagination buttons
prevBtn.addEventListener('click', function() {
if (currentPage > 1) {
currentPage--;
updateTable();
}
});
nextBtn.addEventListener('click', function() {
const rows = table.querySelectorAll('tbody tr');
const totalRows = rows.length;
const totalPages = Math.ceil(totalRows / rowsPerPageValue);
if (currentPage < totalPages) {
currentPage++;
updateTable();
}
});
// Initialize
updateTable();
});
</script>
</body>
</html>