forked from anthonyl8/nest-finder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrowsepage.html
117 lines (112 loc) · 5.44 KB
/
browsepage.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
<!DOCTYPE html>
<html>
<head>
<title>House</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Abhaya+Libre:wght@400;500;600;700;800&family=Jersey+25&family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">
<link rel= "stylesheet" href="style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Jersey+25&family=Michroma&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" integrity="sha512-Evv84Mr4kqVGRNSgIGL/F/aIDqQb7xQ2vcrdIwxfjThSH8CSR7PBEakCr51Ck+w+/U6swU2Im1vVX0SVk9ABhg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body>
<header class="navbar">
<div class="navbar-logo">
<a href="homepage.html"><img src="icons/NestFinder.png" alt="NestFinder Logo"></a>
</div>
<div class="navbar-icons">
<img src="icons/Bell.png" alt="Notification" class="navbar-icon">
<img src="icons/user-icon.png" alt="User Profile" class="navbar-icon">
</div>
</header>
<div class="image-container">
<img src = "images/apartment-view.png" class="apartment-view">
<div class="nest-finder-overlaid">Browse NestFinder</div>
</div>
<h1 class="search-prompt">Search for an offer</h1>
<p class="sub-title">Choose from the most advantageous offers</p>
<div class="search">
<input type="text" placeholder="Search or enter key words" class="search-bar">
<a href="resultspage.html"><button class="search-button">Search</button></a>
</div>
<p class="sub-title">Filter settings</p>
<div class="filter-section">
<div class="dropdown">
<button id = "dropdown1" class="dropbtn" placeholder="Type"> --Number of Bedrooms-- <strong>v</strong></button>
<div class="dropdown-content">
<a href="#" data-value = ">1 bedroom">At least 1 bedroom</a>
<a href="#" data-value = ">2 bedrooms">At least 2 bedrooms</a>
<a href="#" data-value = ">3 bedrooms">At least 3 bedrooms</a>
</div>
</div>
<div class="dropdown">
<button id = "dropdown2" class="dropbtn" placeholder="Room Budget"> --Total Room Budget-- <strong>v</strong></button>
<div class="dropdown-content">
<a href="#" data-value = "<$2000">Less than $2000</a>
<a href="#" data-value = "<$2500">Less than $2500</a>
<a href="#" data-value = "<$3000">Less than $3000</a>
</div>
</div>
<div class="dropdown">
<button id = "dropdown3" class="dropbtn" placeholder="Distance from UBC"> --Distance from UBC-- <strong>v</strong></button>
<div class="dropdown-content">
<a href="#" data-value = "<0.5 km">Within 0.5 km</a>
<a href="#" data-value = "<1 km">Within 1 km</a>
<a href="#" data-value = "<1.5 km">Within 1.5 km</a>
<a href="#" data-value = "<2 km">Within 2 km</a>
<a href="#" data-value = "<2.5 km">Within 2.5 km</a>
</div>
</div>
</div>
<footer class="footer">
<div class="footer-content">
<div class="footer-text">
<h1>NestFinder</h1>
<p>Follow us to stay updated on upcoming events and changes!</p>
</div>
<div class="footer-icons">
<a href="https://portal.nwplus.io" target="_blank"><img src="icons/linkedin-footer.png" alt="LinkedIn Icon" class="social-footer"></a>
<a href="https://portal.nwplus.io" target="_blank"><img src="icons/facebook-footer.png" alt="Facebook Icon" class="social-footer"></a>
<a href="https://portal.nwplus.io" target="_blank"><img src="icons/tiktok-footer.png" alt="TikTok Icon" class="social-footer"></a>
<a href="https://portal.nwplus.io" target="_blank"><img src="icons/instagram-footer.png" alt="Instagram Icon" class="social-footer"></a>
</div>
</div>
</footer>
<script>
/*
function ddfunc(i) {
dd = document.getElementById(i)
dd.classList.toggle("show");
dd.textContent = dd.classList.dataset.value;
}
*/
document.querySelectorAll('.dropbtn').forEach(button => {
button.addEventListener('click', function() {
this.nextElementSibling.classList.toggle('show');
});
});
document.querySelectorAll('.dropdown-content a').forEach(item => {
item.addEventListener('click', function(e) {
e.preventDefault();
const dropdownButton = this.closest('.dropdown').querySelector('.dropbtn');
dropdownButton.textContent = this.dataset.value;
this.parentElement.classList.remove('show');
});
});
window.onclick = function(event) {
if (!event.target.matches('.dropbtn')) {
var dropdowns = document.getElementsByClassName("dropdown-content");
var i;
for (i = 0; i < dropdowns.length; i++) {
var openDropdown = dropdowns[i];
if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show');
}
}
}
}
</script>
</body>
</html>