WaterTrack is a single-file static web app with no build system, no bundler, and no dependencies to install. Every customisation is made by directly editingDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/mr-sunset/watertracker/llms.txt
Use this file to discover all available pages before exploring further.
style.css for visual changes or index.html (and occasionally script.js) for structural and behavioural changes. There is nothing to recompile — just save the file and refresh your browser.
CSS custom properties
Three CSS custom properties declared in:root control the entire color scheme. Changing these values re-skins every interactive element — chips, borders, sliders, and buttons — without touching anything else.
style.css
--accent and --gradient are the two most impactful variables. --accent is used for quick-chip backgrounds, the logged-drinks card border, drink entry rows, the settings panel border, and the slider track. --gradient drives the Log button background. --warning controls the Reset button and should be left red to communicate destructive intent.
Example: green water theme
Dark mode
WaterTrack ships with a@media (prefers-color-scheme: dark) block at the bottom of style.css. When the OS is in dark mode, the following overrides activate automatically:
bodybackground switches torgb(20, 20, 20)with white text.- The
headerbackground switches fromvar(--background-dark)tovar(--gradient), giving it a colourful bar instead of a plain black one. - Header text (
h1,p) switches to black to stay readable against the gradient. - The
#amount-slidertrack background switches to#94daff(a flat colour rather than the default gradient). - The
#logged-drinks h1heading colour switches to white so it remains legible on the dark background. - The settings panel background switches to
rgb(20, 20, 20)with white text, and itsh1heading colour switches to white. - The settings icon stroke switches from
var(--accent)to black.
@media block and merge them into the base selectors (body, header, #settings-panel, etc.).
Quick-chip amounts
The five quick-log chips are plain<button class="quick-chip"> elements in index.html. Their visible text is the only source of truth for the amount they log — script.js reads each button’s textContent and parses it with parseInt(chip.textContent, 10).
index.html
<button class="quick-chip"> elements freely. The CSS automatically rounds the corners of the first and last child, so the pill shape adjusts to however many buttons are present. The oz suffix displayed on each chip is injected by the CSS pseudo-element .quick-chip::after { content: ' oz'; } — the raw number in the HTML is all that needs to change.
Slider range
The custom-amount range input is defined inindex.html with explicit min, max, step, and value attributes:
index.html
min— lowest selectable value (currently2oz).max— highest selectable value (currently80oz).step— increment between positions (currently2oz).value— the slider’s default position on page load and after each log (currently8oz).
value default, also update the two lines in script.js that reset the slider back to 8 after each Log button press. For example, to change the default to 12:
script.js
Removing the confetti dependency
WaterTrack loads a confetti animation library from the jsDelivr CDN. It is the only external network dependency in the project. To remove it, delete the<script> tag from index.html:
celebrate() calls from the two click handlers in script.js — one inside the logButton click listener and one inside the quickChips.forEach callback. The celebrate() function itself guards against confetti being undefined (if (typeof confetti === 'function')), so omitting the script tag will not cause errors — but removing the dead calls keeps the code clean.