diff --git a/scraper/static/InfoButtonAlert.js b/scraper/static/InfoButtonAlert.js new file mode 100644 index 0000000..c78d50f --- /dev/null +++ b/scraper/static/InfoButtonAlert.js @@ -0,0 +1,10 @@ +document.getElementById('infoBtn').addEventListener('click', function () { + // Show the Bootstrap alert + var alertElement = document.getElementById('infoAlert'); + // Set the display property to 'block' to make the alert visible + alertElement.style.display = 'block'; + + document.getElementById('closeAlertBtn').addEventListener('click', function() { + alertElement.style.display = 'none'; + }); +}); \ No newline at end of file diff --git a/scraper/static/clearLocalStorage.js b/scraper/static/clearLocalStorage.js index 4333c3b..3407cbf 100644 --- a/scraper/static/clearLocalStorage.js +++ b/scraper/static/clearLocalStorage.js @@ -4,7 +4,7 @@ document.getElementById('clearResultsBtn').addEventListener('click', function() } // Show the Bootstrap alert - var alertElement = document.getElementById('myAlert'); + var alertElement = document.getElementById('clearAlert'); // Set the display property to 'block' to make the alert visible alertElement.style.display = 'block'; diff --git a/scraper/static/rowResult.js b/scraper/static/rowResult.js index 5b95245..ee5d3c3 100644 --- a/scraper/static/rowResult.js +++ b/scraper/static/rowResult.js @@ -6,10 +6,10 @@ for (var i = localStorage.length - 1; i >= 0; i--) { // Create a row for the item and add it to the table var row = document.createElement("tr"); row.innerHTML = ` - - ${ data.title } - $${ data.price } - + + ${ data.title } + $${ data.price } +
`; diff --git a/scraper/static/styles.css b/scraper/static/styles.css index e6951db..e1a2c2b 100644 --- a/scraper/static/styles.css +++ b/scraper/static/styles.css @@ -21,7 +21,7 @@ color: #dc3545; } -.clickable-row { +.clickable { cursor: pointer; } diff --git a/scraper/templates/scraper/index-result-table.html b/scraper/templates/scraper/index-result-table.html index e7ccb25..04e8f26 100644 --- a/scraper/templates/scraper/index-result-table.html +++ b/scraper/templates/scraper/index-result-table.html @@ -16,7 +16,7 @@
- + diff --git a/scraper/templates/scraper/index.html b/scraper/templates/scraper/index.html index a2a5e1e..e0a7c1d 100644 --- a/scraper/templates/scraper/index.html +++ b/scraper/templates/scraper/index.html @@ -3,7 +3,7 @@ {% load static %} {% block content %} -
Item Price