Skip to content

Commit

Permalink
Merge pull request #1557 from csathnere/top-Offer
Browse files Browse the repository at this point in the history
top Offer updated
  • Loading branch information
arghadipmanna101 authored Aug 8, 2024
2 parents d8ddab4 + da36032 commit ec9e0a2
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions Top Offers-/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@

<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="theme-color" content="#2874F0" id="themeColor">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="../img/flipkart_favicon.ico">
<title>Flipkart | Top Offers</title>
<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
</head>

<body>
<header id="header-TO"></header>
<div class="containter-fluid bg-white">
<div class="containter-fluid p-3 mt-1" style="border-bottom: 1px solid #e4e7eb; background: #196dd0;">
<h1 class="text-white">Top Offers</h1>
</div>
<div class="container-fluid">
<img src="../Top Offers-/xyz1.jpg" alt="" class="img-fluid" width="100%">
<img src="../Top Offers-/xyz2.jpg" alt="" class="img-fluid" width="100%">
<img src="../Top Offers-/xyz3.jpg" alt="" class="img-fluid" width="100%">
<img src="../Top Offers-/xyz4.jpg" alt="" class="img-fluid" width="100%">
<img src="../img/fashion-.webp" alt="fashion" class="img-fluid" width="100%">
<img src="../img/electronics.webp" alt="fashion" class="img-fluid" width="100%">
<img src="../img/home.webp" alt="fashion" class="img-fluid" width="100%">
<img src="../img/ferniture1.webp" alt="fashion" class="img-fluid" width="100%">
<img src="../img/smartPhone.webp" alt="fashion" class="img-fluid" width="100%">
<img src="../img/grooming.webp" alt="fashion" class="img-fluid" width="100%">
</div>
</div>
<footer id="footer-TO" style="background-color: #292d33;"> </footer>
<!-- javaScript -->
<script src="../js/bootstrap.bundle.min.js"></script>
<script>
// for header and footer
document.addEventListener('DOMContentLoaded', () => {
const components = [
{ id: 'footer-TO', url: '../footer/footer.html' },
{ id: 'header-TO', url: '../header/header.html' },
];

components.forEach(component => {
fetch(component.url)
.then(response => response.text())
.then(data => {
document.getElementById(component.id).innerHTML = data;
})
.catch(error => console.error(`Error loading ${component.url}:`, error));
});
});

// header search bar search function
setTimeout(() => {
const inputField_h = document.getElementById('inputField_h');
const fetchButton_h = document.getElementById('fetchButton_h');

function fetchValue_h() {
const value = inputField_h.value;
window.location.href = `../search/?query=${value}`;
}

fetchButton_h.addEventListener('click', fetchValue_h);

inputField_h.addEventListener('keydown', (event) => {
if (event.key === 'Enter') {
fetchValue_h();
}
});


}, 500);

//end

</script>
</body>

</html>

0 comments on commit ec9e0a2

Please sign in to comment.