-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.html
42 lines (41 loc) · 1.8 KB
/
search.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bsale Test - Search</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<link rel="stylesheet" href="./src/style.css">
</head>
<body>
<header>
<div class="container_header">
<button class="btn__bar" onclick="onSidebar()" type="submit"><i class="fa fa-bars" aria-hidden="true"></i></button>
<div id="sidebar"></div>
<a class="container__logo" href="./index.html"><div class="logo">Bsale Test</div></a>
<div class="container__categories">
<div class="title_category">categorias</div>
<div id="categories"></div>
</div>
<div class="container__search">
<form action="" method="get">
<input type="search" placeholder="buscar ..." name="product" id="product">
<button onclick="return onBtnClick(event)"><i class="fa fa-search" aria-hidden="true"></i></button>
</form>
<script>
onBtnClick = (e) => {
e.preventDefault()
let p = document.getElementById('product')
window.location.href = `./search.html?product=${p.value}`
}
</script>
</div>
<i class="fa fa-shopping-cart" aria-hidden="true"></i>
</div>
</header>
<div id="search_products"></div>
<script src="./src/search.js"></script>
</body>
</html>