How rino237gk/penghitung-kalori works
This is a small browser-based calorie calculator. A visitor enters age, weight, height, gender, and activity level; the form handler validates the values, estimates daily calories, and displays the rounded result. A separate interaction toggles dark mode and persists the preference in browser storage. The source excerpt shows these behaviors and references the page’s DOM elements; the HTML and CSS themselves were not provided, so their detailed structure and styling cannot be verified.
Main entry points: script.js Theme control · index.html Calculator page · styles.css Theme styles
Components 7
Calorie calculation
- Calculator page
index.html - Form handler
script.js - Result display
index.html
Theme and display
- Theme control
script.js - Theme styles
styles.css - Local storage
Other components
- Visitor
Connections 6
- Visitor → Calculator page: enters values
- Calculator page → Form handler: submits to
script.js - Form handler → Result display: updates result
script.js - Visitor → Theme control: toggles theme
script.js - Theme control → Local storage: reads and writes
script.js - Theme control → Theme styles: toggles classes
script.js