![image](https://private-user-images.githubusercontent.com/25815584/336635335-9abb7240-50b8-4757-a07b-e551d19708cc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMyMDkxOTAsIm5iZiI6MTcyMzIwODg5MCwicGF0aCI6Ii8yNTgxNTU4NC8zMzY2MzUzMzUtOWFiYjcyNDAtNTBiOC00NzU3LWEwN2ItZTU1MWQxOTcwOGNjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA5VDEzMDgxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZmOTFhNzE2YjFlY2FiZjk0MjVmMGVmZjE0NGUyOGE5ZDYwOGVhMzA0NTU4MzU4ODNkZDBiNTQzMTFhZGJlNzgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.JdWZegngxliEK7-N7txTMp5M7kOBH1QZDmJMANjRp5E)
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.