-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cb99bf2
commit f7c4eea
Showing
6 changed files
with
42 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -254,6 +254,6 @@ <h4 class="h4-flyer">VISITA NUESTRO CANAL DE YOUTUBE</h4> | |
</footer> | ||
|
||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script> | ||
<script src="main.js"></script> | ||
<script src="./script/main.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,6 +156,6 @@ <h2 class="item-title">TUS ARTICULOS FAVORITOS</h2> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script> | ||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/toastify-js"></script> | ||
<script src="../script/perfil.js"></script> | ||
<script src="../main.js"></script> | ||
<script src="../script/main.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ | |
|
||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script> | ||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/toastify-js"></script> | ||
<script src="../main.js"></script> | ||
<script src="../script/result.js"></script> | ||
<script src="../script/main.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,6 +127,6 @@ <h1 class="h1-shop">TIENDA</h1> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script> | ||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/toastify-js"></script> | ||
<script src="../script/tienda.js"></script> | ||
<script src="../main.js"></script> | ||
<script src="../script/main.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
// accediendo a el local storage | ||
|
||
window.onload = function(){ | ||
// verificando que tema tiene en el local storage | ||
tema = localStorage.getItem("tema") | ||
console.log(tema) | ||
header.style.backgroundColor = tema | ||
} | ||
|
||
// trayendo la barra de busqueda con el id | ||
const search_bar = document.getElementById("busqueda") | ||
const products_url_main = "../products.json" | ||
let show_product | ||
|
||
fetch(products_url_main) | ||
.then(response => response.json()) | ||
.then(data=>{ | ||
search_bar.addEventListener("keydown",(event)=>{ | ||
if (event.key === "Enter"){ | ||
console.log("entro") | ||
const result = search_bar.value.toLowerCase() | ||
console.log(result) | ||
let show_product = data.filter(product=>product.name.toLowerCase().includes(result.toLowerCase())) | ||
show_product.forEach((product=>{ | ||
console.log(product) | ||
|
||
})) | ||
show_product_str = JSON.stringify(show_product) | ||
localStorage.setItem('search', show_product_str) | ||
window.location.href = "../pages/result.html" | ||
} | ||
}) | ||
}) | ||
.catch(error => console.log("Error con la carga de data en filtro de busqueda")) | ||
|
||
|