chore: Add styles for table and search functionality #42
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request primarily focuses on enhancing the code structure and improving the functionality of the web application. The changes can be categorized into two main themes: JavaScript enhancements and HTML adjustments.
JavaScript code extraction:
src/main/resources/static/js/styles.js
: The inline styles fromindex.html
have been moved to a new JavaScript file. This not only improves the readability of the HTML file but also allows for better management and reuse of the styles. [1] [2]src/main/resources/static/js/upload_csv.js
: The JavaScript code handling CSV file uploads, which was previously embedded inindex.html
, has been moved to a separate JS file. This improves the modularity of the code and makes it easier to maintain. [1] [2]Search feature enhancement:
src/main/resources/static/js/search.js
: A new JavaScript file was added to handle the search feature. It prevents the default form submission, sends an asynchronous request to the server, and updates the search results dynamically on the page. This improves the user experience by not requiring a page reload for each search.src/main/resources/templates/index.html
: The HTML form for the search feature has been updated to work with the new JavaScript code. The results are now displayed in a newsearchResults
div, which gets updated dynamically.