This is a chessboard which records which squares you clicked. You can play with it here.
git clone
this repo- Install
pnpm
on your machine pnpm i
pnpm dev
- App should be live in
localhost:3000
pnpm test
to run the automated tests
- Create a page with a chessboard and a sidebar.
- On desktop devices the sidebar should be positioned to the right of the chessboard.
- On mobile devices the sidebar should be positioned below the chessboard.
- The chessboard should resize responsively to consume available space.
- Clicking a chessboard square should highlight the square.
- Keep track of which squares are clicked and the order in which they're clicked.
- Display the information collected from step 6 in the sidebar.
- This app is fully responsive (mobile, tablet, desktop). The chessboard will grow to consume the available space.
- As a bonus I added a feature where user can change the theme of the board. I implemented this feature using CSS variables.
- I added a Vitest component test to ensure that the main functions are working well. See this test file.
- Create reusable TS enum and type for
type Theme = 'Green' | 'Brown' | 'Purple'
. - Improve the ThemeSelect component to use a better dropdown component.
- Use vue-i18n instead of hardcoding texts.
- Add test for the "theme switching" feature.