-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbudget.html
157 lines (129 loc) · 5.83 KB
/
budget.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
<!-- FindMyBorough V1. Frontend Coded by Alex Choi-->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="generator" content="Hugo 0.84.0">
<title>FindMyBorough! - Enter Budget</title>
<link rel="canonical" href="https://getbootstrap.com/docs/5.0/examples/navbar-fixed/">
<!-- Favicon -->
<link rel="icon" type="image/x-icon" href="img/icon.ico">
<!-- Bootstrap core CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<!-- Custom styles for this template -->
<link href="style.css" rel="stylesheet">
</head>
<body>
<body>
<nav class="navbar navbar-expand-md navbar-light fixed-top" id="navbar">
<div class="container-fluid">
<a class="navbar-brand" href="index.html"><img class="logo-main" src="img/logo.png" /></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarCollapse">
<ul class="navbar-nav justify-content-end">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="index.html"><img class="nav-icon" src="img/home.png" /></a>
</li>
<li class="nav-item">
<a class="nav-link" href="budget.html"><img class="nav-icon" src="img/search.png" /></a>
</li>
<li class="nav-item">
<a class="nav-link" href="community.html" tabindex="-1" aria-disabled="true"><img class="nav-icon" src="img/community.png" /></a>
</li>
</ul>
</div>
</div>
</nav>
<center>
<main>
<div class="position-relative overflow-hidden text-center banner-sub">
<div class="col-md-5 mx-auto my-5">
<h1 class="display-16 fw-normal">Enter your budget</h1>
</div>
<div class="product-device shadow-sm d-none d-md-block"></div>
<div class="product-device product-device-2 shadow-sm d-none d-md-block"></div>
</div>
<div class="position-relative overflow-hidden p-3 p-md-5 text-center bg-light" id="jumbotron-inputs">
<div class="col-md-5 p-lg-5 mx-auto my-5">
<!-- INPUT GOES HERE -->
<form>
<div class="input-group mb-3 budget-input">
<div class="input-group-prepend">
<span class="input-group-text">£</span>
</div>
<input aria-required="true" required="required" id="budget" type="number" class="form-control" aria-label="Amount (to the nearest dollar)" required />
<div class="input-group-append">
<span class="input-group-text">per month (for the whole property)</span>
</div>
</div>
<div class="form-floating">
<select aria-required="true" class="form-select" id="floatingSelect" aria-label="Floating label select example" required>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
<option value="4">Four or more bedrooms</option>
</select>
<label for="floatingSelect" class="selectorLabel">Number of bedrooms</label>
</div>
<!-- Next button -->
<button type="button" type="submit" class="btn next-button" onClick="saveBudget()">Next</button>
<!-- Next button end -->
</form>
<!-- END INPUT -->
</div>
<div class="product-device shadow-sm d-none d-md-block"></div>
<div class="product-device product-device-2 shadow-sm d-none d-md-block"></div>
</div>
</main>
</center>
<footer class="container py-5">
<div class="row">
<div class="col-12 col-md">
<img src="img/logo.png" class="footer-logo"/>
<small class="d-block mb-3 text-muted">© 2022</small>
</div>
<div class="col-6 col-md">
<h5>Info</h5>
<ul class="list-unstyled text-small">
<li><a class="link-secondary" href="budget.html">Find your borough</a></li>
<li><a class="link-secondary" href="advertise.html">Advertise with us</a></li>
<li><a class="link-secondary" href="team.html">Team</a></li>
</ul>
</div>
<div class="col-6 col-md">
<h5>Resources</h5>
<ul class="list-unstyled text-small">
<li><a class="link-secondary" href="attributions.html">Attributions</a></li>
</ul>
</div>
</div>
</footer>
<script src="../assets/dist/js/bootstrap.bundle.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<!-- Set the budget to a variable locally in the browser -->
<script type="text/javascript">
function saveBudget() {
// set the variable to the id budget from the above input
var budget=document.getElementById("budget").value;
sessionStorage.setItem("budget", budget);
console.log(budget);
// set the variable to the id bedrooms from the above input
var bedrooms=document.getElementById("floatingSelect").value;
sessionStorage.setItem("bedrooms", bedrooms);
console.log(bedrooms);
if(budget<300) {
alert('Budget is too low, please enter a higher budget')
}
// redirect
else {
window.location.href = "rank-points.html";
}
}
</script>
</body>
</html>