feat(theme): analytics.flisk.si has no dark mode, unlike the other flisk.si sites

Open Beginner friendly
#30 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
css, javascript
Domain
frontend

Research direction

Start by running the reproduction command (curl -s https://analytics.flisk.si/ | grep -ci 'prefers-color-scheme') and locating where the Worker serves the home page HTML and its CSS, since both the color-scheme declaration and the palette live there. Add a test asserting color-scheme: light dark, then move the fixed colours into variables and add a prefers-color-scheme: dark block, borrowing the palette from a sibling flisk.si site. Done when both new tests and the existing suite pass and contrast stays at 4.5:1 in both themes.

Written by the indexing model from the issue text.

Description

agents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests

Problem

https://analytics.flisk.si/ has no dark colour scheme: its CSS has no prefers-color-scheme rule and the page sets no color-scheme. grow, host, chat, readme, tools and inference all adapt to the visitor's system theme. A visitor with a dark system theme gets a bright page here, and native controls such as form fields and scrollbars stay light.

Reproduce: curl -s https://analytics.flisk.si/ | grep -ci 'prefers-color-scheme' prints 0.

Root Cause Analysis

The page was built with one light palette in fixed colours. There are no colour variables that a dark rule could override, and no color-scheme declaration for the browser.

TDD Fix Plan

  1. RED: Add a test that the home page declares color-scheme: light dark (meta tag or CSS).
    GREEN: Add the declaration.
  2. RED: Add a test that the CSS has a prefers-color-scheme: dark block that overrides the background and text colours.
    GREEN: Move the page colours into variables and add the dark block, reusing the palette of the sibling sites.

REFACTOR: Share the palette with the other flisk.si sites.

Acceptance Criteria

  • The page switches to dark colours under a dark system theme
  • Text keeps at least 4.5:1 contrast in both themes
  • All new tests pass
  • Existing tests still pass
Dominant language
JavaScript
Stars
0
Forks
2
Avg merge
1h 33m
Merged PRs (30d)
7

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from flisk-sh/analytics

All issues in flisk-sh/analytics

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.