id
stringclasses 20
values | date
timestamp[s]date 2025-05-12 00:00:00
2025-05-12 00:00:00
| level
stringclasses 4
values | description
stringlengths 28
5.03k
|
---|---|---|---|
task-1 | 2025-05-12T00:00:00 | easy | add divs(class 'header', 'footer', 'content') with arbitrary text in '.root' element. '.root' occupies total viewport and children elements together occupy total '.root' space. header (border-box) is always fixed at the top of '.root'; footer (border-box) is always fixed at the bottom of '.root'; content (border-box) occupies the remaining '.root' space. USE unocss tailwind 4 syntax, grid only, NO flex, float and position, NO js. |
task-2 | 2025-05-12T00:00:00 | easy | add divs(class 'leftbar', 'rightbar') with arbitrary text in '.root' element. leftbar (border-box) is fixed at the left of '.root'; rightbar (border-box) is fixed at the right of '.root'; content occupies the remaining '.root' space. USE tailwind grid only. |
task-3 | 2025-05-12T00:00:00 | easy | clear header content. add menu(class 'menu') with 3 items(arbitrary text) at the right side of header. USE tailwind grid only too. |
task-4 | 2025-05-12T00:00:00 | easy | add logo(class 'logo') with arbitrary background color at the left side of header. USE tailwind grid only. |
task-5 | 2025-05-12T00:00:00 | easy | leftbar width is the smaller of 200px and 20vw. rightbar width is the bigger of 200px and 20vw. leftbar should disappear when page width is equal to or less than 799px. USE tailwind grid only. |
task-6 | 2025-05-12T00:00:00 | easy | when page width is equal to or less than 399px, menu items should have evenly spaced distribution in the whole header space and logo should disappear. USE tailwind grid only. |
task-7 | 2025-05-12T00:00:00 | easy | when page width is less than 400px, content and rightbar should occupy full page width and rightbar should be at the bottom of content. USE tailwind grid only. |
task-8 | 2025-05-12T00:00:00 | easy | when page width is less than 400px, each menu item should occupy full page width. USE tailwind grid only. |
task-9 | 2025-05-12T00:00:00 | challenging | separate leftbar whole space into 20 rows and 2 columns. fill each cell with text 'this is a very long text sample to test word wrap'. USE tailwind grid only. |
task-10 | 2025-05-12T00:00:00 | challenging | separate rightbar whole space into 10 rows and 2 columns; fill 40 items in the rightbar whole space. fill each item with text 'this-is-a-very-long-text-sample-to-test-overflow'. USE tailwind grid only. |
task-11 | 2025-05-12T00:00:00 | challenging | when page width is less than 400px, display the first 3 rows in rightbar. |
task-12 | 2025-05-12T00:00:00 | challenging | show 12 cards (class 'card') in content with 3 per row, 100px minimum height each and vertical scrolling enabled. |
task-13 | 2025-05-12T00:00:00 | challenging | when page width is less than 1000px, display 2 cards per row in content. |
task-14 | 2025-05-12T00:00:00 | challenging | when page width is less than 600px, display 1 card per row in content. |
task-15 | 2025-05-12T00:00:00 | challenging | each card has a image(class 'card-image'), title and price; title's minimum height is 1.5rem and no wrap, text is 'Long Product Title That Goes Here'; price's minimum height is 1rem; image uses the remaining space. USE tailwind grid only. |
task-16 | 2025-05-12T00:00:00 | challenging | only change card css property to reverse the order of the last 2 cards. |
task-17 | 2025-05-12T00:00:00 | challenging | add a logo(class 'footer-logo') and info (class 'footer-info') in the footer. footer-info should never wrap and should show ellipsis when space is insufficient. |
task-18 | 2025-05-12T00:00:00 | challenging | add left-drag and right-drag with absolute positions at the left and right sides of the content; left-drag and right-drag are not visible by default and become visible when mouse hovers over content. |
task-19 | 2025-05-12T00:00:00 | challenging | gen js, drag right-drag and left-drag to adjust content width. |
task-20 | 2025-05-12T00:00:00 | challenging | when page width is less than 400px, move right-drag to the bottom of content and drag right-drag to adjust content height. |
task-1 | 2025-05-12T00:00:00 | easy | Setup project with vite. Here are the requirements:
- Add dev and build to npm scripts.
- Set dev server port to environment variable `process.env.PROJECT_PORT`.
- Generate sourceMap after bundling.
- Set output directory to `dist`.
- Update public path to "./". After bundling, the `src` attribute of <script /> should start with "./" instead of starting with "/"
- Expose the service to other people in LAN.
|
task-2 | 2025-05-12T00:00:00 | easy | Add path alias `@` for `src`.
Besides this:
Add `import alias from '@/alias'` in `src/index.js`.
Display `alias` value in `src/index.js`.
|
task-3 | 2025-05-12T00:00:00 | easy | Setup global constants replacement for __VERSION__.
__VERSION__ should be replaced with "v1.0.0" during bundling.
Besides this:
- Add `import './version'` in `src/index.js`.
|
task-4 | 2025-05-12T00:00:00 | easy | I want to write a Single Page Applications, but when visiting the route path, dev server response with 404, help me make it fallback to `index.html`.
|
task-5 | 2025-05-12T00:00:00 | easy | My targeting browsers support `?.` (Optional Chaining Operator), so I want to keep this syntax as is after bundling.
Try to address it.
|
task-6 | 2025-05-12T00:00:00 | easy | I want to proxy every request prefixed with `/postman/` to `https://postman-echo.com` in dev server.
For example, request to `/postman/get` will be forwarded to `https://postman-echo.com/get`.
Try to address it.
|
task-7 | 2025-05-12T00:00:00 | easy | Add `import bird from './images/bird.png'` in `src/index.js`.
Update `src/index.js` to display the png image in <img /> element with id `bird`.
Add `import svg from './images/TablerAntennaBars5.svg'` in `src/index.js`.
Update `src/index.js` to display the svg image in <img /> element with id `svg`.
Update bundler configuration if necessary.
|
task-8 | 2025-05-12T00:00:00 | moderate | Add `import './index.css'` in `src/index.js`.
Display text `hello css` in div with CSS class `.css` in `src/index.js`.
Add `import './index.less'` in `src/index.js`.
Display text `hello less` in div with CSS class `.less` in `src/index.js`.
Add `import lessStyles from './index.module.less'` in `src/index.js`.
Display text `hello less modules` in div with CSS class referencing to variable`lessStyles.lessModules` in `src/index.js`.
Also help me update other files in this project to ensure `dev` and `build` commands won't throw errors after doing that.
|
task-9 | 2025-05-12T00:00:00 | moderate | Add `import ts from './index.ts'` in `src/index.js`.
Display `ts()` return value in `src/index.js`.
Also help me update other files in this project to ensure `dev` and `build` commands won't throw errors after doing that.
|
task-10 | 2025-05-12T00:00:00 | moderate | Add `import VueComponent from './component.vue';` in `src/index.js`.
Mount VueComponent in `src/index.js`.
Add `import ReactComponent from './component.jsx'` in `src/index.js`.
Mount ReactComponent in `src/index.js`.
DO NOT use jsx syntax.
Also help me update other files in this project to ensure `dev` and `build` commands won't throw errors after doing that.
|
task-11 | 2025-05-12T00:00:00 | challenging | I want to do something with sourcemap files in output directory.
## Requirements
- Move all sourcemap files into `<project_root>/sourcemaps` after build.
- Add `//# sourceMappingURL=https://internal.com/sourcemaps/<sourcemap_path>` at the end of original js file.
## Examples
Assume we have following files in dist directory before moving:
- dist/assets/index.js
- dist/assets/index.js.map
After moving, the files should be:
- dist/assets/index.js
- sourcemaps/assets/index.js.map
And the `dist/assets/index.js` should contain the following content at its end:
//# sourceMappingURL=https://internal.com/sourcemaps/assets/index.js.map
|
task-12 | 2025-05-12T00:00:00 | challenging | Update the bundler configuration to remove all `console.log` call expression after running build command.
DONOT use terser or other compressor tool, implement it on your own locally.
|
task-13 | 2025-05-12T00:00:00 | challenging | During bundling, extract all license information into `dist/vendor-licenses.txt` from all npm packages imported directly or transitively in source file.
|
task-14 | 2025-05-12T00:00:00 | challenging | Implement dynamical generation of in-memory virtual modules as a vite plugin.
For example:
src/files/a.ts
```js
export default 'a'
```
src/files/b.ts
```js
export default 'b'
```
src/index.js
```js
import files from '~files'
files.a.default // should be 'a'
files.b.default // should be 'b'
```
You can hardcode `src/files` and `~files` as a builtin rule when implementing this.
Besides this
- Add `import files from '~files'` in `src/index.js`
- Display JSON stringified files(without any whitespaces) in `src/index.js`
|
task-15 | 2025-05-12T00:00:00 | moderate | I have some mock data in `<project_root>/mock.json`, setup dev server to return them as mock data.
|
task-16 | 2025-05-12T00:00:00 | challenging | Implement an image compression plugin for bundler, only for build command
|
task-17 | 2025-05-12T00:00:00 | moderate | I want to import markdown files directly, and get rendered html by importing them.
For example:
```js
import md from './hello.md'
```
The `md` variable is expected to be a html string rendered by its markdown content.
Implement this in a local vite plugin.
Besides this:
- Add `import md from './hello.md'` in `src/index.js`.
- Display `md` inside a div in `src/index.js`.
|
task-18 | 2025-05-12T00:00:00 | moderate | Supporting importing frontmatter from markdown files.
For example:
hello.md
```md
---
author: hello
tags:
- foo
- bar
---
## Markdown Heading
```
index.js
```js
import md, { frontmatter } from './hello.md'
frontmatter.author // should be "hello"
frontmatter.tags // should be ["foo", "bar"]
```
Besides this
- Update `import md from './hello.md'` to `import md, { frontmatter } from './hello.md'` in `src/index.js`.
- Display `frontmatter.author` in div element in `src/index.js`
|
task-19 | 2025-05-12T00:00:00 | challenging | Add new feature for markdown vite plugin.
When markdown content includes images, the images should be recognized as dependency of markdown file.
Image url in rendered html string should reference to the image in output directory.
|
task-20 | 2025-05-12T00:00:00 | challenging | Add `language` option for markdown vite plugin
For example:
```js
import md from './hello.md'
```
If langauge is 'en', `./hello.md` will resolved to `./hello.en.md` if it exists.
If langauge is 'zh', `./hello.md` will resolved to `./hello.zh.md` if it exists.
If both `./hello.en.md` and `./hello.zh.md` are not found, fallback to its original path `./hello.md`
Besides this, set language="zh" as default value.
|
task-1 | 2025-05-12T00:00:00 | easy | 1) Create components/Header.vue that displays 'Hello Blog' at the top of the page with appealing background color. 2) Create components/Main.vue where content is aligned at the top left and fills the remaining space. 3) Develop components/Blog.vue that accepts 'title' and 'detail' as props. Display mock blog data in Main.vue using this Blog component with the mock data: { title: 'Morning', detail: 'Morning My Friends' }. 4) Render Header.vue And Main.vue in App.vue 4) The classname of title in Blog.vue is 'blog-title', the width of blog-title is 'fit-content', fontSize is 24px |
task-2 | 2025-05-12T00:00:00 | easy | 1) Create a appealing BlogList component that accepts an array of blogs as props and displays the titles in div elements with the className 'list-item'. 2) In Main.vue, mock the blog data and display it using BlogList with this data: [{title: 'Morning', detail: 'Morning My Friends'}, {title: 'Travel', detail: 'I love traveling!'}]. 3) Position BlogList on the left side of Main.vue with a width of 300px; each blog item should have a height of 40px and a border-box layout, 4) Only One Blog.vue occupies the remaining space of Main.vue. The content of Blog.vue should be from first item of the mock data. |
task-3 | 2025-05-12T00:00:00 | easy | 1) Make blog items in BlogList selectable. When an item in BlogList is selected, highlight it with appealing style and display its content in the Blog Component. 2) Set 'Morning' as the default selected blog. 3) Beautify the List without changing the size of List Item |
task-4 | 2025-05-12T00:00:00 | easy | 1) Create a BlogForm component as a appealing Modal with the title 'Create Blog'. 2) Add an 'Add Blog' appealing blue button in the right of Header.vue to toggle the BlogForm's visibility. 3) Place a close button (.close-btn) with 'x' in the top right of BlogForm to hide it. 4) Place the BlogForm component in App.vue. |
task-5 | 2025-05-12T00:00:00 | easy | 1) Add .visible-count in the top-left of BlogForm showing '0' initially. 2) Increment .visible-count by 1 each time BlogForm becomes visible. |
task-6 | 2025-05-12T00:00:00 | moderate | 1) Add appealing Form with label in BlogForm to input title and detail; BlogForm can be submitted by button (.submit-btn); 2) When submitted, append this Blog to BlogList, and set this Blog as selected. Keep Previous MockData. |
task-7 | 2025-05-12T00:00:00 | moderate | 1) Create context/BlogContext.ts to manage related context (blog list and selected blog) with Provide/Inject API 2) When submit a new BlogForm, check title duplication. Constraint: The duplication check code should be written in BlogForm; 3) Add a span(.blog-list-len) near 'Hello Blog' in Header.vue to show the length of blogs |
task-8 | 2025-05-12T00:00:00 | moderate | 1) Add 'Delete' appealing red button (.delete-btn) in top&right of Blog.vue. When clicked, delete selected Blog and select the first blog. 2) The logic of Delete is encapsulated in a composable composables/useDelete.ts. |
task-9 | 2025-05-12T00:00:00 | moderate | 1) Add 'Edit' appealing blue button (.edit-btn) in top&right of Blog.vue. When clicked, toggle BlogForm to edit the content of selected Blog. The Title of BlogForm is 'Edit Form' in this case. When submitted, update selected Blog. 2) The logic of Edit is encapsulated in a composable composables/useEdit.ts; |
task-10 | 2025-05-12T00:00:00 | moderate | 1) Add a Search.vue(width: 200px, border-box) component above BlogList.vue in Main.vue. 2) Include an input field with the placeholder 'Search Blogs'. The keywords in the input field are used to filter blogs. |
task-11 | 2025-05-12T00:00:00 | chanllenging | 1) Add a button with the text 'Random Blogs' in Header to append 100,000 blogs to BlogList at one time. Each blog should have a title formatted in regex 'RandomBlog-[\d]{12}', digits in title is random. 2) Ensure the page will not stuck when 100000 blogs appended. 3) Constraint: DO NOT USE any third-party packages, ONLY Vue APIs can be used to optimize the performance. |
task-12 | 2025-05-12T00:00:00 | challenging | 1) Add appealing Comments.vue with the title 'Comments' at the bottom of Blog.vue. 2) Include a TextArea with the placeholder 'Enter Your Comment' and a submit button (.comment-btn) to submit the comment. 3) Only display comments related to the selected blog, showing them in cards with the className '.comment-item', placed above the TextArea. 4) Create store/comment.ts implement CommentStore without Inject/Provide API、Pinia etc., and connect CommentStore to UI. 5) Preserve comments when a blog is edited, and clear them when a blog is deleted. 6) Constraint: DO NOT USE any third-party packages; ONLY utilize Vue APIs. |
task-13 | 2025-05-12T00:00:00 | challenging | 1) Create components/Tooltip.vue that displays a tooltip (.tooltip) at the bottom of the child component when hovered over. 2) Implement this tooltip on the 'Add Blog' button to show 'Write a New Blog For everyone' when hovered. 3) The Tooltip should be appended to document.body. 4) Constraint: DO NOT use any third-party packages; ONLY Vue APIs are allowed. |
task-14 | 2025-05-12T00:00:00 | challenging | 1) Enable Markdown text input for blog details. Preview the Markdown in Blog.vue. 2) Develop a composable/utils to reuse Markdown-related logic. 3) Prevent XSS attacks. 4) Constraint: DO NOT use any third-party packages; ONLY Vue APIs are permitted. |
task-15 | 2025-05-12T00:00:00 | challenging | 1) Create utils/toast.ts to display a one-line message (fontSize: 12px) in a appealing green box at the top of the page for 2000ms. 2) Display a toast with 'New Comment Created Successfully!' when a new comment is submitted, and 'New Blog Created Successfully!' when a new blog is submitted. 3) If a toast is already visible when another is triggered, remove the old toast before showing the new one. 4) Constraint: DO NOT use any third-party packages; ONLY Vue APIs are permitted. |
task-16 | 2025-05-12T00:00:00 | challenging | 1) When the title of Blog is longer than 300px, show '...' to hide longer text. 2) Title can be hovered to show full content in Tooltip when Title is longer than 300px. DO NOT show tooltip when Title is less than 300px 3) Make sure EVERY title displayed in the page follow the rules, create reusable component. 4) Constraint: DO NOT use any third-party packages; ONLY Vue APIs are permitted. |
task-17 | 2025-05-12T00:00:00 | challenging | 1) Add appealing button in Header with text 'Fast Comment'. 2) When clicked, focus Textarea in Comments.vue and type 'Charming Blog!' DO NOT submit this comment. 3) Constraint: DO NOT use any third-party packages; ONLY Vue APIs are permitted. DO NOT use BOM API. DO NOT use DOM query API. |
task-18 | 2025-05-12T00:00:00 | challenging | 1) Add pages/Game.vue with text 'Hello Game'. 2) Add router to control the Route Logic: When browser location is '/', routed to App. When browser location is '/game', routed to Game. 3) Add a appealing button with text '🎮' in App's Header.vue to jump to Game page, and user can go back to App when browser page go Back. 4) Constraint: DO NOT use any third-party packages; ONLY Vue APIs are permitted; DO NOT use Vue Router. |
task-19 | 2025-05-12T00:00:00 | challenging | 1) Write a Gomoku chess game 2) chess board is 15*15, there is black chess and white chess, black chess first 3) Add the className for important element: white chess(.chess-white), black chess(.chess-black), position chess can be clicked to drop follow regex: .chess-pos-\d{1,2}-d\{1,2}. 4) show 'White's Turn' and 'Black'Turn' to shw current player 5) show 'White Wins!' and 'Black Wins!' when player wins, toast BIG 'Congratulations!' with style: 50px fontSize 6) keep 'Hello Game' 7) Beautify this game 8) Constraint: DO NOT use any third-party packages; ONLY Vue APIs are permitted. |
task-20 | 2025-05-12T00:00:00 | challenging | 1) When gamer wins, add a button with Text 'Post Game Records', when clicked, post a new blog to record the history of this game. Return to blog page and show this blog 2) The Blog Content Example: '# White is Winner!
```game
White(1,5);
Black(14,11);
White(11,4);
```' 3) Title of Blog follow Game-[Date]-[Time] 4) Constraint: DO NOT use any third-party packages; ONLY Vue APIs are permitted. |
task-1 | 2025-05-12T00:00:00 | easy | Setup project with webpack. Here are the requirements:
- Add dev and build to npm scripts.
- Set dev server port to environment variable `process.env.PROJECT_PORT`.
- Generate sourceMap after bundling(If webpack generates sourceMap by default, then you don't need to do anything here).
- Set output directory to `dist` for build command.
- Use index.html as html template
|
task-2 | 2025-05-12T00:00:00 | easy | Add path alias `@` for `src`.
Besides this:
Add `import alias from '@/alias'` in `src/index.js`.
Display `alias` value in `src/index.js`.
|
task-3 | 2025-05-12T00:00:00 | easy | Setup global constants replacement for process.env.__VERSION__ via bundler capability.
process.env.__VERSION__ should be replaced with "v1.0.0" during bundling.
Besides this:
- Add `import './version'` in `src/index.js`.
|
task-4 | 2025-05-12T00:00:00 | easy | I want to write a Single Page Application.
When visiting non-existent page, dev server should fallback to `index.html`.
If it's already the default behavior in webpack, do nothing.
|
task-5 | 2025-05-12T00:00:00 | easy | My targeting browsers support `?.` (Optional Chaining Operator), so I want to keep this syntax as is after bundling.
Try to address it.
|
task-6 | 2025-05-12T00:00:00 | easy | I want to proxy every request prefixed with `/postman/` to `https://postman-echo.com` in dev server.
For example, request to `/postman/get` will be forwarded to `https://postman-echo.com/get`.
Try to address it.
|
task-7 | 2025-05-12T00:00:00 | easy | Add `import bird from './images/bird.png'` in `src/index.js`.
Update `src/index.js` to display the png image in <img /> element with id `bird`.
Add `import svg from './images/TablerAntennaBars5.svg'` in `src/index.js`.
Update `src/index.js` to display the svg image in <img /> element with id `svg`.
Update bundler configuration if necessary.
|
task-8 | 2025-05-12T00:00:00 | moderate | Add `import './index.css'` in `src/index.js`.
Display text `hello css` in div with CSS class `.css` in `src/index.js`.
Add `import './index.less'` in `src/index.js`.
Display text `hello less` in div with CSS class `.less` in `src/index.js`.
Add `import lessStyles from './index.module.less'` in `src/index.js`.
Display text `hello less modules` in div with CSS class referencing to variable`lessStyles.lessModules` in `src/index.js`.
Also help me update other files in this project to ensure `dev` and `build` commands won't throw errors after doing that.
|
task-9 | 2025-05-12T00:00:00 | moderate | Add `import ts from './index.ts'` in `src/index.js`.
Display `ts()` return value in `src/index.js`.
Also help me update other files in this project to ensure `dev` and `build` commands won't throw errors after doing that.
|
task-10 | 2025-05-12T00:00:00 | moderate | Add `import VueComponent from './component.vue';` in `src/index.js`.
Mount VueComponent in `src/index.js`.
Add `import ReactComponent from './component.jsx'` in `src/index.js`.
Mount ReactComponent in `src/index.js`.
DO NOT use jsx syntax.
Also help me update other files in this project to ensure `dev` and `build` commands won't throw errors after doing that.
|
task-11 | 2025-05-12T00:00:00 | challenging | I want to do something with sourcemap files in output directory.
Implement this as a local webpack plugin.
## Requirements
- Move all sourcemap files into `<project_root>/sourcemaps` after build.
- Add `//# sourceMappingURL=https://internal.com/sourcemaps/<sourcemap_path>` at the end of original js file.
## Examples
Assume we have following files in dist directory before moving:
- dist/assets/index.js
- dist/assets/index.js.map
- dist/assets/index.css
- dist/assets/index.css.map
After moving, the files should be:
- dist/assets/index.js
- dist/assets/index.css
- sourcemaps/assets/index.js.map
- sourcemaps/assets/index.css.map
And the `dist/assets/index.js` should contain the following content at its end(Using JS comment):
//# sourceMappingURL=https://internal.com/sourcemaps/assets/index.js.map
And the `dist/assets/index.css` should contain the following content at its end(Using CSS comment):
/*# sourceMappingURL=https://internal.com/sourcemaps/assets/index.css.map */
|
task-12 | 2025-05-12T00:00:00 | challenging | Update the bundler configuration to remove all `console.log` call expression after running build command.
DONOT use terser or other compressor tool, implement it on your own locally.
|
task-13 | 2025-05-12T00:00:00 | challenging | During bundling, extract all license information into `dist/vendor-licenses.txt` from all npm packages imported directly or transitively in source file.
|
task-14 | 2025-05-12T00:00:00 | challenging | Implement dynamical generation of in-memory virtual modules via bundler capability.
For example:
src/files/a.ts
```js
export default 'a'
```
src/files/b.ts
```js
export default 'b'
```
src/index.js
```js
import files from '~files'
files.a.default // should be 'a'
files.b.default // should be 'b'
```
You can hardcode `src/files` and `~files` as a builtin rule when implementing this.
Besides this
- Add `import files from '~files'` in `src/index.js`
- Display JSON stringified files(without any whitespaces) in div element in `src/index.js`
|
task-15 | 2025-05-12T00:00:00 | moderate | I have some mock data in `<project_root>/mock.json`, setup dev server to return them as mock data.
|
task-16 | 2025-05-12T00:00:00 | challenging | Implement an image compression plugin for bundler, only for build command
|
task-17 | 2025-05-12T00:00:00 | moderate | I want to import markdown files directly, and get rendered html by importing them.
For example:
```js
import md from './hello.md'
```
The `md` variable is expected to be a html string rendered by its markdown content.
Implement this functionality via bundler capability.
Besides this:
- Add `import md from './hello.md'` in `src/index.js`.
- Display `md` inside a div in `src/index.js`.
|
task-18 | 2025-05-12T00:00:00 | moderate | Supporting importing frontmatter from markdown files.
For example:
hello.md
```md
---
author: hello
tags:
- foo
- bar
---
## Markdown Heading
```
index.js
```js
import md, { frontmatter } from './hello.md'
frontmatter.author // should be "hello"
frontmatter.tags // should be ["foo", "bar"]
```
Besides this
- Update `import md from './hello.md'` to `import md, { frontmatter } from './hello.md'` in `src/index.js`.
- Display `frontmatter.author` in div element in `src/index.js`
|
task-19 | 2025-05-12T00:00:00 | challenging | Add image resolving for markdown files.
When markdown content includes images, the images should be recognized as dependency of markdown file.
Image url in rendered html string should reference to the image in output directory.
|
task-20 | 2025-05-12T00:00:00 | challenging | I want to implement the following functionality with bundler.
For example:
```js
import md from './hello.md'
```
If langauge is 'en', `./hello.md` will resolved to `./hello.en.md` if it exists.
If langauge is 'zh', `./hello.md` will resolved to `./hello.zh.md` if it exists.
If both `./hello.en.md` and `./hello.zh.md` are not found, fallback to its original path `./hello.md`
Besides this, use language="zh" as default value when resolving file.
|
task-1 | 2025-05-12T00:00:00 | easy | 1) Create components/Header.tsx that displays 'Hello Blog' at the top of the page with appealing background color.
2) Create components/Main.tsx where content is aligned at the top left and fills the remaining space.
3) Develop components/Blog.tsx that accepts 'title' and 'detail' as props. Display mock blog data in Main.tsx using this Blog component with the mock data: { title: 'Morning', detail: 'Morning My Friends' }.
3) Render Header.tsx And Main.tsx in App.tsx
4) The classname of title in Blog.tsx is 'blog-title', the width of blog-title is 'fit-content', fontSize is 24px
|
task-2 | 2025-05-12T00:00:00 | easy | 1) Create a appealing BlogList component that accepts an array of blogs as props and displays the titles in div elements with the className 'list-item'.
2) Create stores/blog.ts, use Zustand to create a store with blog data, initialState is:
```
{ blogs: [{title: 'Morning', detail: 'Morning My Friends'}, {title: 'Travel', detail: 'I love traveling!'}] }
```
2) In Main.tsx, render BlogList with the data from the store (by using blog to access the blog data)
3) Position BlogList on the left side of Main.tsx with a width of 300px; each blog item should have a height of 40px and a border-box layout.
4) Only One Blog.tsx occupies the remaining space of Main.tsx. The content of Blog.tsx should be the first item of blog list.
|
task-3 | 2025-05-12T00:00:00 | easy | 1) Make blog items in BlogList selectable. When an item in BlogList is selected, highlight it with appealing style and display its content in the Blog Component.
2) Set 'Morning' as the default selected blog.
3) Beautify the List without changing the size of List Item
4) Use Zustand to manage the selected blog
|
task-4 | 2025-05-12T00:00:00 | easy | 1) Create a BlogForm component as a appealing Modal with the title 'Create Blog'.
2) Use Zustand to manage the 'formVisible' state. When formVisible is true, the BlogForm should be displayed, otherwise, it should be hidden.
3) Add an 'Add Blog' appealing blue button in the right of Header.tsx to toggle the BlogForm's visibility.
4) Place a close button (.close-btn) with 'x' in the top right of BlogForm to hide it.
5) Place the BlogForm component in App.tsx.
|
task-5 | 2025-05-12T00:00:00 | easy | 1) An API is prepared, here is the docs of API:
GET /api/blogs
<response_definition>
interface Response {
blogs: { title: string; detail:string; }[];
}
</response_definition>
<response_example>
{
blogs: [
{ title: 'XXX', detail: 'XXX' },
],
}
</response_example>
2) In stores/blog.ts, add an async function to fetch data from API and update the blog list data in the store.
3) When App.tsx mounted, call the fetch function to start fetching blogs.
4) When API is fetching, show 'Blog is loading' in App.tsx
5) Notice: When Initial Blog is fetching, Header is always visible but 'Add Blog' button should be disabled.
|
task-6 | 2025-05-12T00:00:00 | moderate | 1) Add appealing Form with label (label[htmlFor="title"], label[htmlFor="detail"]) in BlogForm to input title and detail; BlogForm can be submitted by button (.submit-btn);
2) When submitted, append this Blog to BlogList, and set this Blog as selected.
3) Use Zustand to append form data to blogs.
4) Check title duplication when submit clicked. When title is duplicated, stop submitting and show a red border around the input field.
5) Add a span(.blog-list-len) near 'Hello Blog' in Header.tsx to show the length of blogs
|
task-7 | 2025-05-12T00:00:00 | moderate | 1) Add 'Delete' appealing red button (.delete-btn) in top&right of Blog.tsx to delete the selected blog.
2) When blog deleted, set the first blog in blogs as selected.
3) If blogs is empty, shows 'No Blog' instead.
|
task-8 | 2025-05-12T00:00:00 | moderate | 1) Add 'Edit' appealing blue button (.edit-btn) in top&right of Blog.tsx.
2) When Edit clicked, toggle BlogForm to edit the content of selected Blog. The Title of BlogForm is 'Edit Blog' in this case. When submitted, update selected Blog.
3) Use Zustand to manage edit logic.
|
task-9 | 2025-05-12T00:00:00 | moderate | 1) Here is Search API:
GET /api/search_blogs?keywords=XXX
<response_definition>
interface Response {
// blogs is the search result
blogs: { title: string; detail:string; }[];
}
</response_definition>
<response_example>
{
blogs: [
{ title: 'XXX', detail: 'XXX' },
],
}
</response_example>
2) Add a Search.tsx(width: 200px, border-box) component above BlogList.tsx in Main.tsx.
3) Include an input field with the placeholder 'Search Blogs'. The keywords in the input field are used to FILTER blogs by using new Search API.
4) Use Zustand to request Search API and manage filtered blogs. Notice: Do not change the blogs in store.
5) Hint: When input field is typed fast, make sure the latest search result is displayed.
Constraint: DO NOT USE any third-party packages, ONLY React/Zustand APIs can be used to optimize performance.
|
task-10 | 2025-05-12T00:00:00 | moderate | 1) Add stores/route.ts to control the Route Logic
The definition of state is:
```
interface RouteState {
currentRoute: string;
}
```
The initial state of route will be the pathname of the current page.
2) In stores/route.ts, listens to browser history change, and updates the currentRoute in the store.
3) When path is '/', shows Main.tsx, when path is '/login', shows pages/Login.tsx. Header is visible for every page.
4) Render <h1>User Login</h1> in components/Login.tsx. Add Button with text '🔑' in the right of Header.tsx, when clicked, go to '/login'.
Constraint: DO NOT USE any third-party packages, ONLY React/Zustand APIs can be used to optimize performance.
|
task-11 | 2025-05-12T00:00:00 | challenging | 1) Add a button with the text '🔀' in Header to append 100,000 blogs to BlogList at one time. Each blog should have a title formatted in regex 'RandomBlog-[\\d]{12}', digits in title is random.
2) Ensure the page will not be stuck when 100000 blogs are appended.
Constraint: DO NOT USE any third-party packages, ONLY React/Zustand APIs can be used to optimize performance.
|
task-12 | 2025-05-12T00:00:00 | challenging | 1) Enable Markdown text input for blog details. Preview the Markdown in Blog.tsx.
2) Develop a utility to reuse Markdown-related logic.
3) Prevent XSS attacks.
Constraint: DO NOT use any third-party packages; ONLY React/Zustand APIs are permitted.
|
task-13 | 2025-05-12T00:00:00 | challenging | Implement user login, logout, and display blog poster's username.
1) Login API:
POST /api/login
Request: { username: string, password: string }
Response: { success: boolean }
2) On the /login page, add a LoginForm with labels(label[htmlFor="username"], label[htmlFor="password"]), and a .login-submit-btn to submit the form via the Login API.
3) Display the user's username in Header.tsx with the class '.username'.
4) Show the blog author's username with the class '.blog-author'. If blog has no author, display 'Anonymous'.
5) Add a '👋' Logout button (class '.logout-btn') next to the username in Header.tsx. Clicking it logs the user out.
6) Use Zustand to manage user states.
Constraint: DO NOT use any third-party packages; ONLY React/Zustand APIs are permitted.
|
task-14 | 2025-05-12T00:00:00 | challenging | Implement blog comment feature:
1) Display commenter's username with class '.comment-author' and text with '.comment-text'.
2) Add a CommentForm with a '.comment-input' textarea and a '.comment-submit-btn' below each blog.
3) Use Zustand to manage comments.
4) Add undo functionality via Ctrl+Z (Windows/Linux) or Command+Z (Mac) to remove the last comment.
Constraint: DO NOT use any third-party packages; ONLY React/Zustand APIs are permitted.
|
task-15 | 2025-05-12T00:00:00 | challenging | Write a Gomoku chess game in route: '/game'
1) Add a button with the text '🎮' in Header, when clicked, jump to new page '/game'
2) chess board is 15*15, there is black chess and white chess, black chess first
3) Add the className for important element: white chess(.chess-white), black chess(.chess-black), position chess can be clicked to drop follow regex: .chess-pos-\\d{1,2}-d\\{1,2}.
4) show 'White's Turn' and 'Black'Turn' to shw current player
5) show 'White Wins!' and 'Black Wins!'.
6) Use Zustand to manage the game logic. Beautify this game
Constraint: DO NOT use any third-party packages; ONLY React/Zustand APIs are permitted.
|
task-16 | 2025-05-12T00:00:00 | challenging | Enhance the Gomoku game with multi-step undo functionality.
1) Implement keyboard shortcut (Ctrl+Z on Windows/Linux or Command+Z on Mac) to trigger the undo action.
2) Allow multiple consecutive undos to revert the game state to any previous point.
3) Add a move history display with className '.move-history' showing all moves in the format "White: (x,y)" or "Black: (x,y)".
4) Each history item should have className '.history-item'.
Constraint: DO NOT use any third-party packages; ONLY React/Zustand APIs are permitted; Use Zustand to manage the logic;
|
task-17 | 2025-05-12T00:00:00 | challenging | Implement a recording and replay system for Gomoku games.
1) Every games will be auto recorded, and can be replayed by play button (.replay-play-btn) after the game is finished.
2) Add play/pause button (className '.replay-play-btn', '.replay-pause-btn') and a slider (className '.replay-slider') to navigate through game moves.
3) When replaying, show the current move number with className '.current-move'.
4) There is an interval of 1000 ms between each move.
Constraint: DO NOT use any third-party packages; ONLY React/Zustand APIs are permitted; Use Zustand to manage the logic;
|
task-18 | 2025-05-12T00:00:00 | challenging | Create functionality to share Gomoku games as blog posts.
1) Shows the "Share to Blog" button with className '.share-to-blog-btn' in the Gomoku game after the game is finished.
2) When clicked, open a modal form (className '.share-modal') with title input (className '.title-input'), description input (className '.description-input'), submit button (className '.share-submit').
Go to home page ('/') after submitted.
3) In Blog Detail, detect if a blog contains a Gomoku game recording and display a "Replay Game" button (className '.blog-replay-btn').
4) When the replay button is clicked, show a modal (className '.blog-replay-modal') with the full game replay interface.
5) The replay interface should include the start play button (className '.blog-replay-start-play'), showing the current move number with className '.current-move'. There is an interval of 1000 ms between each move.
Constraint: DO NOT use any third-party packages; ONLY React/Zustand APIs are permitted; Use Zustand to manage the logic.
|
task-19 | 2025-05-12T00:00:00 | challenging | Add new page '/rooms':
1) Add a button with the text '🚪' in Header, when clicked, jump to new page '/rooms'
2) Add a "Create Room" button with className '.create-room-btn' that opens a room creation form.
3) The room creation form should include a labeled input field for room name ("Room Name") and a "Create" button to submit the form and create a new game room with a unique ID. Don't enter the room instantly.
4) Each room should be displayed as a card with className '.room-card' showing room name, creator's username, and current status.
5) Sync room status between all open tabs/windows.
Constraint: DO NOT use any third-party packages; ONLY React/Zustand APIs are permitted; Use Zustand to manage the state and sync logic.
|
task-20 | 2025-05-12T00:00:00 | challenging | Implement a multi-user chat system based on rooms
1) When a user clicks on a chat room card (with className '.room-card'), navigate to '/chat/:roomId' route.
2) The chat room page ('/chat/:roomId') contains a message list (className '.message-list'), status display (in '.room-status'), and participant information (display all participants' usernames in '.participant-list').
3) Implement message sending and receiving functionality, including a message input box (className '.message-input') and a send button (className '.send-button').
4) Each message (className .message) should contains the sender's information (className '.message-sender').
5) If the user enters the chat room, add this user to .participant-list.
6) User will send heartbeat to check if user is in chat room, if the user is not active for 2000ms, the user will be removed from .participant-list.
7) Sync chat room status, messages, and user connection status between all open tabs/windows.
Constraint: DO NOT use any third-party packages; ONLY React/Zustand APIs are permitted; Use Zustand to manage the logic.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.