-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhomepage.html
207 lines (195 loc) · 7.96 KB
/
homepage.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dashboard</title>
<link rel="stylesheet" href="styles/homestyle.css">
<style>
/* Add some styles for the suggestion dropdown */
.suggestions {
position: absolute;
border: 1px solid #ccc;
background-color: white;
max-height: 200px;
overflow-y: auto;
width: 100%;
z-index: 1000;
}
.suggestions ul {
list-style-type: none;
padding: 0;
margin: 0;
}
.suggestions li {
padding: 10px;
cursor: pointer;
}
.suggestions li:hover {
background-color: #f0f0f0;
}
</style>
</head>
<body>
<header class="navbar">
<div class="container">
<a href="#" class="logo">JoB BoARD</a>
<nav>
<input type="text" placeholder="What service are you looking for today?" class="search-bar" id="searchBar">
<div class="suggestions" id="suggestions"></div>
<ul class="nav-links">
<li><a href="footers/careers.html">JoB Select</a></li>
<li><a href="top/messages.html">Messages</a></li>
<li><a href="top/orders.html">Orders</a></li>
<li><a href="g_maps.html" class="user-profile">Maps</a></li>
<li><a href="JoBBOARD.html" class="user-profile">Log Out</a></li>
</ul>
</nav>
</div>
</header>
<nav class="sub-nav">
<ul>
<li><a href="adds/graphics.html">Graphics & Design</a></li>
<li><a href="top/tech.html">Programming & Tech</a></li>
<li><a href="top/home.html">Home Keeping</a></li>
<li><a href="top/video.html">Video & Animation</a></li>
<li><a href="top/driver.html">Driver</a></li>
<li><a href="top/music.html">Music & Audio</a></li>
<li><a href="top/acc.html">Accountant</a></li>
<li><a href="top/teacher.html">Teacher</a></li>
<li><a href="top/data.html">Data Analysis</a></li>
<li><a href="top/ai.html">AI Services</a></li>
</ul>
</nav>
<section class="welcome-banner">
<div class="container">
<h1>Welcome back, <span>New User</span> <span>👋</span></h1>
<div class="recommendations">
<div class="recommendation-card">
<h3>Search For Jobs</h3>
<p>Create a brief and get custom offers.</p>
<a href="footers/careers.html">Search for Job</a>
</div>
<div class="recommendation-card">
<h3>Post a Job</h3>
<p>Tell us a bit about your job offer</p>
<a href="footers/postjobs.html">Post Job</a>
</div>
</div>
</div>
</section>
<section class="browsing-history">
<div class="container">
<h2>Based on your browsing history</h2>
<div class="history-grid">
<div class="history-item">
<img src="images/house.png" alt="History Item 1">
<p>House Keeping <span>50000/mth</span></p>
</div>
<div class="history-item">
<img src="images/garage.png" alt="History Item 2">
<p>Garage <span>100000/mth</span></p>
</div>
<div class="history-item">
<img src="images/nanny.png" alt="History Item 3">
<p>Nanny <span>70000/mth</span></p>
</div>
<div class="history-item">
<img src="images/driver.png" alt="History Item 4">
<p>Driver <span>30000/day</span></p>
</div>
</div>
</div>
</section>
<footer>
<div class="container">
<div class="footer-nav">
<div>
<h3>Categories</h3>
<ul>
<li><a href="adds/graphics.html">Graphics & Design</a></li>
<li><a href="adds/digital.html">Digital Marketing</a></li>
<li><a href="adds/writing.html">Writing & Translation</a></li>
</ul>
</div>
<div>
<h3>About</h3>
<ul>
<li><a href="footers/careers.html">Careers</a></li>
<li><a href="footers/pressnews.html">Press & News</a></li>
<li><a href="footers/partnerships.html">Partnerships</a></li>
</ul>
</div>
<div>
<h3>Support</h3>
<ul>
<li><a href="footers/helpsupport.html">Help & Support</a></li>
<li><a href="footers/trustsafe.html">Trust & Safety</a></li>
<li><a href="footers/postjobs.html">Post a Job</a></li>
</ul>
</div>
<div>
<h3>Community</h3>
<ul>
<li><a href="footers/customerstories.html">Customer Success Stories</a></li>
<li><a href="footers/commhub.html">Community Hub</a></li>
<li><a href="footers/forum.html">Forum</a></li>
</ul>
</div>
</div>
<p>© JoB BoARD International Ltd. 2024</p>
</div>
</footer>
<script src="sessiontimeout.js"></script>
<script>
// Retrieve the username from localStorage and display it
const username = sessionStorage.getItem('username');
if (username) {
document.getElementById('username').textContent = username;
} else {
// Redirect to login page if username is not found
window.location.href = 'login.html';
}
// Job suggestions logic
const searchBar = document.getElementById('searchBar');
const suggestionsContainer = document.getElementById('suggestions');
const jobSuggestions = [
'Graphics Designer',
'Web Developer',
'Housekeeper',
'Video Editor',
'Driver',
'Music Producer',
'Accountant',
'Teacher',
'Data Analyst',
'AI Specialist'
];
searchBar.addEventListener('input', () => {
const query = searchBar.value.toLowerCase();
const filteredSuggestions = jobSuggestions.filter(job => job.toLowerCase().includes(query));
// Clear previous suggestions
suggestionsContainer.innerHTML = '';
if (filteredSuggestions.length > 0 && query.length > 0) {
const ul = document.createElement('ul');
filteredSuggestions.forEach(job => {
const li = document.createElement('li');
li.textContent = job;
li.addEventListener('click', () => {
searchBar.value = job;
suggestionsContainer.innerHTML = '';
});
ul.appendChild(li);
});
suggestionsContainer.appendChild(ul);
}
});
// Close suggestions when clicking outside
document.addEventListener('click', (e) => {
if (e.target !== searchBar) {
suggestionsContainer.innerHTML = '';
}
});
</script>
</body>
</html>