swarupe7 / MedPlant

MedPlant: Open-source project using HTML, CSS, and Bootstrap to create awareness about medicinal plants. Beginner-friendly for contributions
https://swarupe7.github.io/MedPlant/home.html
MIT License
15 stars 34 forks source link

Dynamically Create Plant Cards with JavaScript and Fetch HTML About Content for Plant Descriptions #54

Closed piyushbarve98 closed 12 months ago

piyushbarve98 commented 12 months ago

Description: This pull request introduces dynamic card creation functionality using JavaScript, enhancing the user interface by eliminating static card content and introducing dynamic elements. Additionally, the content of the card descriptions has been improved by fetching information from the "about" section of HTML files.

Changes Made:

Dynamic Card Creation: Utilized JavaScript to dynamically generate cards. Eliminated static card content for a more interactive and flexible user interface.

Improved Card Descriptions: Replaced generic text in card descriptions with content dynamically fetched from the "about" section of the respective HTML files. This enhancement ensures that the card descriptions are more accurate, relevant, and reflective of the content within each HTML file.

Benefits:

Improved Information: Fetching descriptions from the "about" section ensures that the card descriptions are always up-to-date and accurately represent the content of the associated HTML files.

Maintainability: The dynamic approach simplifies maintenance, making it easier to add new plant cards with just adding another function call example-> createCard('Babool', 'img/babool.jpeg');

Scalability: The project can be scaled up very easily now by adding this changes. New features can easily added if we want such as search, filter, pagination , form to add cards dynamically etc.

Screenshots:

Before: image

After: image

swarupe7 commented 12 months ago

thank you @piyushbarve98