This web application allows users to convert temperatures between Celsius and Fahrenheit. It provides two main conversion functions and a user-friendly interface.
-
Celsius to Fahrenheit Conversion
- Input a temperature in Celsius and convert it to Fahrenheit.
-
Fahrenheit to Celsius Conversion
- Input a temperature in Fahrenheit and convert it to Celsius.
-
Dynamic Unit Switching
- Toggle between Celsius and Fahrenheit units for conversion.
-
Clear Data
- Clear input and result data with the click of a button.
-
Error Handling
- Display error messages in a modal when necessary.
- Enter a temperature value in the input field.
- Choose the desired conversion type (Celsius to Fahrenheit or Fahrenheit to Celsius).
- Click the "Convert!" button to see the result.
- Use the "Change" button to switch between Celsius and Fahrenheit units.
- Clear input and result data by clicking the "Clear" button.
The project is structured into three main files:
-
index.html
- Contains the HTML structure of the web page, including input fields, buttons, and modals.
-
style.css
- Defines the styling for the web page, ensuring a clean and responsive design.
-
script.js
- Implements the logic for temperature conversion, user input handling, and modal functionality.
If you would like to contribute to this project, feel free to submit pull requests or open issues. Contributions are welcome!
This project is licensed under the MIT License, so feel free to use it and modify it according to your needs.
Mobin Valadi
Feel free to reach out if you have any questions or suggestions!