|
Download task_040/instruction.md from Lego-X/UXInteract: direct link, hf CLI and curl.
- Browser
- Download file 1.13 kB
-
https://huggingface.co/datasets/Lego-X/UXInteract/resolve/main/task_040/instruction.md
- Command line
-
hf download hf://datasets/Lego-X/UXInteract/task_040/instruction.md
-
curl -L -o instruction.md https://huggingface.co/datasets/Lego-X/UXInteract/resolve/main/task_040/instruction.md
1.13 kB
| # Add a one-click theme switch to the discussion page | |
| Extend the supplied `index.html` with a prominent button that switches the whole page between light and dark modes. Keep it usable offline. | |
| ## Interface | |
| Mark the button with `data-testid="theme-toggle"`. Preserve the supplied contents and `data-testid` values `question-list`, `question-detail` and `comment-area`. Either theme may be initial; no CSS class, theme attribute or storage key is prescribed. | |
| ## Acceptance Checklist | |
| - One click switches both the body and all three regions in the same direction. The dark background is less luminous than the light background in each. A brief transition is allowed if it settles within five seconds. | |
| - Each effective background changes by at least 32 on the weighted RGB scale `0.2126R + 0.7152G + 0.0722B`, using 0–255 channel values. Transparent regions may inherit their parent backgrounds. | |
| - Repeated clicks alternate between the same two visual states; ten toggles restore the initial state. A refresh preserves the selected theme between clicks. | |
| - Toggling and refreshing do not alter page text or cause browser errors. | |