markngr commited on
Commit
ff9f230
·
verified ·
1 Parent(s): f8e2fe7

Add a home button on the dashboard page. Also make the sections total properties, occupied, vacant and monthly revenue smaller, put them in small box sections next to each other. Make those boxes clickable , with each taking to a page with the details of the section clicked. Add any necessary pages from clickable buttons from the buttons within the page and website and populate with the necessary and needed details. Also, in mobile view. Remove the texts in the header and place the necessary icons such as home and account and add the associating and necessary pages and add details based on the requirements.

Browse files
Files changed (4) hide show
  1. components/navbar.js +91 -0
  2. dashboard.html +34 -31
  3. payments-details.html +93 -0
  4. properties.html +5 -7
components/navbar.js ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomNavbar extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ header {
7
+ background-color: white;
8
+ box-shadow: 0 1px 3px rgba(0,0,0,0.1);
9
+ position: sticky;
10
+ top: 0;
11
+ z-index: 50;
12
+ }
13
+ .container {
14
+ max-width: 100%;
15
+ margin: 0 auto;
16
+ padding: 0 1rem;
17
+ }
18
+ .flex {
19
+ display: flex;
20
+ justify-content: space-between;
21
+ align-items: center;
22
+ padding: 0.75rem 0;
23
+ }
24
+ .mobile-nav {
25
+ display: flex;
26
+ gap: 1rem;
27
+ }
28
+ .desktop-nav {
29
+ display: none;
30
+ }
31
+ @media (min-width: 768px) {
32
+ .mobile-nav {
33
+ display: none;
34
+ }
35
+ .desktop-nav {
36
+ display: flex;
37
+ gap: 2rem;
38
+ }
39
+ }
40
+ a {
41
+ color: #2A3D4F;
42
+ text-decoration: none;
43
+ font-weight: 500;
44
+ transition: color 0.3s;
45
+ }
46
+ a:hover {
47
+ color: #4C6B8A;
48
+ }
49
+ .active {
50
+ color: #4C6B8A;
51
+ font-weight: 600;
52
+ }
53
+ </style>
54
+ <header>
55
+ <div class="container">
56
+ <div class="flex">
57
+ <a href="index.html" class="flex items-center gap-2">
58
+ <i data-feather="home" class="text-primary w-6 h-6"></i>
59
+ <span class="hidden md:inline text-xl font-bold text-primary">EstateEase</span>
60
+ </a>
61
+
62
+ <div class="mobile-nav">
63
+ <a href="index.html"><i data-feather="home"></i></a>
64
+ <a href="properties.html"><i data-feather="layers"></i></a>
65
+ <a href="payments.html"><i data-feather="dollar-sign"></i></a>
66
+ <a href="account.html"><i data-feather="user"></i></a>
67
+ </div>
68
+
69
+ <nav class="desktop-nav">
70
+ <a href="index.html">Dashboard</a>
71
+ <a href="properties.html">Properties</a>
72
+ <a href="tenants.html">Tenants</a>
73
+ <a href="payments.html">Payments</a>
74
+ <a href="reports.html">Reports</a>
75
+ </nav>
76
+
77
+ <account-dropdown>
78
+ <div slot="trigger" class="flex items-center space-x-2 cursor-pointer">
79
+ <img src="http://static.photos/people/200x200/42" alt="User" class="w-8 h-8 rounded-full object-cover">
80
+ <span class="hidden md:inline text-sm font-medium">John Doe</span>
81
+ <i data-feather="chevron-down" class="hidden md:block w-4 h-4"></i>
82
+ </div>
83
+ </account-dropdown>
84
+ </div>
85
+ </div>
86
+ </header>
87
+ `;
88
+ }
89
+ }
90
+
91
+ customElements.define('custom-navbar', CustomNavbar);
dashboard.html CHANGED
@@ -31,13 +31,18 @@
31
  <custom-navbar></custom-navbar>
32
 
33
  <main class="container mx-auto px-4 py-8">
34
- <!-- Dashboard Header -->
35
- <div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-8">
 
 
 
 
36
  <div>
37
  <h1 class="text-2xl font-bold text-dark">Property Dashboard</h1>
38
  <p class="text-gray-600 mt-1">Overview of your property portfolio</p>
39
  </div>
40
- <div class="mt-4 md:mt-0 flex space-x-3">
 
41
  <button class="bg-white border border-gray-200 hover:bg-gray-50 text-dark py-2 px-4 rounded-md transition flex items-center">
42
  <i data-feather="download" class="w-4 h-4 mr-2"></i>
43
  Export
@@ -48,59 +53,57 @@
48
  </button>
49
  </div>
50
  </div>
51
-
52
  <!-- Stats Overview -->
53
- <div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-8">
54
- <div class="stat-card bg-white rounded-lg shadow p-6 transition">
55
  <div class="flex items-center justify-between">
56
  <div>
57
- <p class="text-gray-500 text-sm">Total Properties</p>
58
- <h3 class="text-2xl font-bold text-dark">24</h3>
59
  </div>
60
- <div class="bg-primary bg-opacity-10 p-3 rounded-full">
61
- <i data-feather="home" class="text-primary w-5 h-5"></i>
62
  </div>
63
  </div>
64
- </div>
65
 
66
- <div class="stat-card bg-white rounded-lg shadow p-6 transition">
67
  <div class="flex items-center justify-between">
68
  <div>
69
- <p class="text-gray-500 text-sm">Monthly Revenue</p>
70
- <h3 class="text-2xl font-bold text-dark">$24,500</h3>
71
  </div>
72
- <div class="bg-green-100 p-3 rounded-full">
73
- <i data-feather="dollar-sign" class="text-green-600 w-5 h-5"></i>
74
  </div>
75
  </div>
76
- </div>
77
 
78
- <div class="stat-card bg-white rounded-lg shadow p-6 transition">
79
  <div class="flex items-center justify-between">
80
  <div>
81
- <p class="text-gray-500 text-sm">Bank Balance</p>
82
- <h3 class="text-2xl font-bold text-dark">$58,750</h3>
83
  </div>
84
- <div class="bg-blue-100 p-3 rounded-full">
85
- <i data-feather="credit-card" class="text-blue-600 w-5 h-5"></i>
86
  </div>
87
  </div>
88
- </div>
89
 
90
- <div class="stat-card bg-white rounded-lg shadow p-6 transition">
91
  <div class="flex items-center justify-between">
92
  <div>
93
- <p class="text-gray-500 text-sm">Maintenance Issues</p>
94
- <h3 class="text-2xl font-bold text-dark">5</h3>
95
  </div>
96
- <div class="bg-yellow-100 p-3 rounded-full">
97
- <i data-feather="tool" class="text-yellow-600 w-5 h-5"></i>
98
  </div>
99
  </div>
100
- </div>
101
  </div>
102
-
103
- <!-- Property Status -->
104
  <div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
105
  <!-- Property List -->
106
  <div class="lg:col-span-2">
 
31
  <custom-navbar></custom-navbar>
32
 
33
  <main class="container mx-auto px-4 py-8">
34
+ <!-- Dashboard Header -->
35
+ <div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-8">
36
+ <div class="flex items-center">
37
+ <a href="index.html" class="mr-4 p-2 rounded-md hover:bg-gray-100">
38
+ <i data-feather="home" class="text-primary w-5 h-5"></i>
39
+ </a>
40
  <div>
41
  <h1 class="text-2xl font-bold text-dark">Property Dashboard</h1>
42
  <p class="text-gray-600 mt-1">Overview of your property portfolio</p>
43
  </div>
44
+ </div>
45
+ <div class="mt-4 md:mt-0 flex space-x-3">
46
  <button class="bg-white border border-gray-200 hover:bg-gray-50 text-dark py-2 px-4 rounded-md transition flex items-center">
47
  <i data-feather="download" class="w-4 h-4 mr-2"></i>
48
  Export
 
53
  </button>
54
  </div>
55
  </div>
 
56
  <!-- Stats Overview -->
57
+ <div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-8">
58
+ <a href="properties.html" class="stat-card bg-white rounded-lg shadow p-4 transition hover:shadow-md">
59
  <div class="flex items-center justify-between">
60
  <div>
61
+ <p class="text-gray-500 text-xs md:text-sm">Total Properties</p>
62
+ <h3 class="text-lg md:text-xl font-bold text-dark">24</h3>
63
  </div>
64
+ <div class="bg-primary bg-opacity-10 p-2 rounded-full">
65
+ <i data-feather="home" class="text-primary w-4 h-4"></i>
66
  </div>
67
  </div>
68
+ </a>
69
 
70
+ <a href="properties.html?filter=occupied" class="stat-card bg-white rounded-lg shadow p-4 transition hover:shadow-md">
71
  <div class="flex items-center justify-between">
72
  <div>
73
+ <p class="text-gray-500 text-xs md:text-sm">Occupied</p>
74
+ <h3 class="text-lg md:text-xl font-bold text-dark">18</h3>
75
  </div>
76
+ <div class="bg-green-100 p-2 rounded-full">
77
+ <i data-feather="check-circle" class="text-green-600 w-4 h-4"></i>
78
  </div>
79
  </div>
80
+ </a>
81
 
82
+ <a href="properties.html?filter=vacant" class="stat-card bg-white rounded-lg shadow p-4 transition hover:shadow-md">
83
  <div class="flex items-center justify-between">
84
  <div>
85
+ <p class="text-gray-500 text-xs md:text-sm">Vacant</p>
86
+ <h3 class="text-lg md:text-xl font-bold text-dark">6</h3>
87
  </div>
88
+ <div class="bg-yellow-100 p-2 rounded-full">
89
+ <i data-feather="alert-circle" class="text-yellow-600 w-4 h-4"></i>
90
  </div>
91
  </div>
92
+ </a>
93
 
94
+ <a href="payments.html" class="stat-card bg-white rounded-lg shadow p-4 transition hover:shadow-md">
95
  <div class="flex items-center justify-between">
96
  <div>
97
+ <p class="text-gray-500 text-xs md:text-sm">Monthly Revenue</p>
98
+ <h3 class="text-lg md:text-xl font-bold text-dark">$24,500</h3>
99
  </div>
100
+ <div class="bg-blue-100 p-2 rounded-full">
101
+ <i data-feather="dollar-sign" class="text-blue-600 w-4 h-4"></i>
102
  </div>
103
  </div>
104
+ </a>
105
  </div>
106
+ <!-- Property Status -->
 
107
  <div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
108
  <!-- Property List -->
109
  <div class="lg:col-span-2">
payments-details.html ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Payment Details - EstateEase</title>
7
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <script src="https://unpkg.com/feather-icons"></script>
11
+ <style>
12
+ .payment-card:hover {
13
+ transform: translateY(-3px);
14
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
15
+ }
16
+ .payment-status-paid {
17
+ border-left: 4px solid #38a169;
18
+ }
19
+ .payment-status-pending {
20
+ border-left: 4px solid #ecc94b;
21
+ }
22
+ .payment-status-overdue {
23
+ border-left: 4px solid #e53e3e;
24
+ }
25
+ </style>
26
+ </head>
27
+ <body class="bg-gray-50 font-sans antialiased">
28
+ <custom-navbar></custom-navbar>
29
+
30
+ <main class="container mx-auto px-4 py-8">
31
+ <div class="flex items-center mb-6">
32
+ <a href="dashboard.html" class="mr-4 p-2 rounded-md hover:bg-gray-100">
33
+ <i data-feather="arrow-left" class="text-primary w-5 h-5"></i>
34
+ </a>
35
+ <h1 class="text-2xl font-bold text-dark">Monthly Revenue Details</h1>
36
+ </div>
37
+
38
+ <div class="bg-white rounded-lg shadow overflow-hidden mb-8">
39
+ <div class="px-6 py-4 border-b border-gray-100">
40
+ <h2 class="text-lg font-semibold text-dark">$24,500 Revenue Breakdown</h2>
41
+ </div>
42
+ <div class="p-6">
43
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
44
+ <div class="bg-blue-50 rounded-lg p-4">
45
+ <p class="text-blue-500 text-sm">Total Received</p>
46
+ <h3 class="text-xl font-bold text-dark">$24,500</h3>
47
+ </div>
48
+ <div class="bg-green-50 rounded-lg p-4">
49
+ <p class="text-green-500 text-sm">On-Time Payments</p>
50
+ <h3 class="text-xl font-bold text-dark">$22,300</h3>
51
+ </div>
52
+ <div class="bg-yellow-50 rounded-lg p-4">
53
+ <p class="text-yellow-500 text-sm">Late Payments</p>
54
+ <h3 class="text-xl font-bold text-dark">$2,200</h3>
55
+ </div>
56
+ </div>
57
+
58
+ <div class="overflow-x-auto">
59
+ <table class="min-w-full divide-y divide-gray-200">
60
+ <thead class="bg-gray-50">
61
+ <tr>
62
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Property</th>
63
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Tenant</th>
64
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Amount</th>
65
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Status</th>
66
+ <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Date</th>
67
+ </tr>
68
+ </thead>
69
+ <tbody class="bg-white divide-y divide-gray-200">
70
+ <tr class="hover:bg-gray-50">
71
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-dark">Downtown Loft</td>
72
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Sarah Johnson</td>
73
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$2,500</td>
74
+ <td class="px-6 py-4 whitespace-nowrap">
75
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Paid</span>
76
+ </td>
77
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">May 1, 2023</td>
78
+ </tr>
79
+ <!-- More payment rows... -->
80
+ </tbody>
81
+ </table>
82
+ </div>
83
+ </div>
84
+ </div>
85
+ </main>
86
+
87
+ <custom-footer></custom-footer>
88
+
89
+ <script>
90
+ feather.replace();
91
+ </script>
92
+ </body>
93
+ </html>
properties.html CHANGED
@@ -87,15 +87,13 @@
87
  <i data-feather="search" class="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"></i>
88
  <input type="text" placeholder="Search properties..." 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">
89
  </div>
90
-
91
  <select class="border border-gray-200 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent">
92
- <option>All Status</option>
93
- <option>Occupied</option>
94
- <option>Vacant</option>
95
- <option>Under Maintenance</option>
96
  </select>
97
-
98
- <select class="border border-gray-200 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent">
99
  <option>All Types</option>
100
  <option>Apartment</option>
101
  <option>House</option>
 
87
  <i data-feather="search" class="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"></i>
88
  <input type="text" placeholder="Search properties..." 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">
89
  </div>
 
90
  <select class="border border-gray-200 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent">
91
+ <option value="">All Status</option>
92
+ <option value="occupied" ${new URLSearchParams(window.location.search).get('filter') === 'occupied' ? 'selected' : ''}>Occupied</option>
93
+ <option value="vacant" ${new URLSearchParams(window.location.search).get('filter') === 'vacant' ? 'selected' : ''}>Vacant</option>
94
+ <option value="maintenance" ${new URLSearchParams(window.location.search).get('filter') === 'maintenance' ? 'selected' : ''}>Under Maintenance</option>
95
  </select>
96
+ <select class="border border-gray-200 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent">
 
97
  <option>All Types</option>
98
  <option>Apartment</option>
99
  <option>House</option>