### Description
- `GET` `/post_info`
Get all the info of the posts.
- `200` Without any post
```json
[]
```
- `200` With posts
```json
[
{
"description": "This is the first post.",
"id": 1,
"labels": [
{
"color": "#FF666666",
"id": 2,
"name": "Rust"
}
],
"preview_image_url": "https://squidspirit.com/icon/logo-light.svg",
"published_time": null,
"title": "The First Post"
}
]
```
- `GET` `/post/{id}`
Get the full post content with the given `id`
- `200` With result
```json
{
"content": "Hello! I'm Squid!!",
"id": 1,
"info": {
"description": "This is the first post.",
"id": 1,
"labels": [
{
"color": "#FF666666",
"id": 2,
"name": "Rust"
}
],
"preview_image_url": "https://squidspirit.com/icon/logo-light.svg",
"published_time": null,
"title": "The First Post"
}
}
```
- `404` There is no post with the `id`
### Package Changes
```toml
[workspace.package]
version = "0.1.1"
edition = "2024"
[workspace.dependencies]
actix-web = "4.10.2"
async-trait = "0.1.88"
chrono = "0.4.41"
dotenv = "0.15.0"
env_logger = "0.11.8"
futures = "0.3.31"
log = "0.4.27"
serde = { version = "1.0.219", features = ["derive"] }
sqlx = { version = "0.8.5", features = [
"chrono",
"macros",
"postgres",
"runtime-tokio-rustls",
] }
tokio = { version = "1.45.0", features = ["full"] }
```
### Screenshots
_No response_
### Reference
Resolves#43
### Checklist
- [x] A milestone is set
- [x] The related issuse has been linked to this branch
Reviewed-on: #55
Reviewed-by: zoe <zoe@noreply.localhost>
Co-authored-by: SquidSpirit <squid@squidspirit.com>
Co-committed-by: SquidSpirit <squid@squidspirit.com>
### Description
Update license so that anyone should remove my personal information before deployment.
### Package Changes
_No response_
### Screenshots
_No response_
### Reference
Resolves#53
### Checklist
- [x] A milestone is set
- [x] The related issuse has been linked to this branch
Reviewed-on: #54
Reviewed-by: zoe <zoe@noreply.localhost>
Co-authored-by: SquidSpirit <squid@squidspirit.com>
Co-committed-by: SquidSpirit <squid@squidspirit.com>
### Description
As the title.
### Package Changes
_No response_
### Screenshots
_No response_
### Reference
_No issue_
### Checklist
- [x] A milestone is set
- [ ] The related issuse has been linked to this branch
Reviewed-on: #42
Reviewed-by: zoe <zoe@noreply.localhost>
Co-authored-by: SquidSpirit <squid@squidspirit.com>
Co-committed-by: SquidSpirit <squid@squidspirit.com>
### Description
- As the title.
### Package Changes
_No response_
### Screenshots
_No response_
### Reference
- Resolves#36
- Solution: https://stackoverflow.com/questions/75131872/error-failed-to-solve-failed-commit-on-ref-unexpected-status-400-bad-reques
- Docker document: https://docs.docker.com/build/ci/github-actions/attestations/#max-level-provenance
> Note that adding attestations to an image means you must push the image to a registry directly, as opposed to loading the image to the local image store of the runner. This is because the local image store doesn't support loading images with attestations.
### Checklist
- [x] A milestone is set
- [x] The related issuse has been linked to this branch
Reviewed-on: #38
Reviewed-by: zoe <zoe@noreply.localhost>
Co-authored-by: SquidSpirit <squid@squidspirit.com>
Co-committed-by: SquidSpirit <squid@squidspirit.com>
### Description
As the title.
### Package Changes
_No response_
### Screenshots
_No response_
### Reference
- Resolves#34
- [GitHub Action - Docker Build And Push](https://github.com/marketplace/actions/build-and-push-docker-images#customizing)
### Checklist
- [x] A milestone is set
- [x] The related issuse has been linked to this branch
Reviewed-on: #35
Reviewed-by: zoe <zoe@noreply.localhost>
Co-authored-by: SquidSpirit <squid@squidspirit.com>
Co-committed-by: SquidSpirit <squid@squidspirit.com>
### Description
- Create a Dockerfile to build the docker image.
- Set up the workflow to run deployment, which is to build and upload image to remote registry.
- Add a head meta html tag to show the version.
### Package Changes
_No response_
### Screenshots
_No response_
### Reference
Resolves#9
### Checklist
- [x] A milestone is set
- [x] The related issuse has been linked to this branch
Reviewed-on: #33
Reviewed-by: zoe <zoe@noreply.localhost>
Co-authored-by: SquidSpirit <squid@squidspirit.com>
Co-committed-by: SquidSpirit <squid@squidspirit.com>
### Description
- Design and apply a custom icon to favicon and navbar logo.
- For the favicon, it can be changed by the browser theme (dark or light.)
### Package Changes
_No response_
### Screenshots
| Desktop | Mobile |
| --- | --- |
|  |  |
### Reference
Resolves#11
### Checklist
- [x] A milestone is set
- [x] The related issuse has been linked to this branch
Reviewed-on: #32
Co-authored-by: SquidSpirit <squid@squidspirit.com>
Co-committed-by: SquidSpirit <squid@squidspirit.com>
### Description
- The validation regex is `^(BLOG-[0-9]+|NO-ISSUE) [A-Z].+$`
### Package Changes
_No response_
### Screenshots
_No response_
### Reference
_No issue_
### Checklist
- [x] The title is meet the format `'BLOG-XXX Title title title'`
- [ ] A milestone is set
- [ ] The related issuse has been linked to this branch
Reviewed-on: #30
Co-authored-by: SquidSpirit <squid@squidspirit.com>
Co-committed-by: SquidSpirit <squid@squidspirit.com>
### Description
- As the title
### Package Changes
_No response_
### Screenshots
_No response_
### Reference
_No issue_
### Checklist
- [x] The title is meet the format `BLOG-XXX: Title title title`
- [ ] A milestone is set
- [ ] The related issuse has been linked to this branch
Reviewed-on: #29
Co-authored-by: SquidSpirit <squid@squidspirit.com>
Co-committed-by: SquidSpirit <squid@squidspirit.com>
### Description
- Add Not Found Page
- Change the home page h1 font weight
- Change the order of Prettier plugins to fix the issue of tailwind css not being sorted
### Package Changes
_No response_
### Screenshots
| Desktop (FHD 1920x1080) | Mobile (iPhone16 Pro 390x844) |
| --- | --- |
|  | <img src="/attachments/6d3f21fe-a01b-4f02-86e1-9f917345e796" width="400" /> |
### Reference
Resolves#14
### Checklist
- [x] A milestone is set
Reviewed-on: #23
Reviewed-by: squid <squid@squidspirit.com>
Co-authored-by: Zoe <7711zoe@gmail.com>
Co-committed-by: Zoe <7711zoe@gmail.com>
### Description
- I found a build error when setting up gitea action, which is caused by circular dependency.
- We couldn't call dispatch in reducer, so something like streaming, delay, set interval could not be use in reducer directly.
- As for async function, we can use [`createAsyncTank`](https://redux-toolkit.js.org/api/createAsyncThunk).
### Package Changes
_No response_
### Screenshots
_No response_
### Reference
Resolves#8
### Checklist
- [x] A milestone is set
Reviewed-on: #22
Co-authored-by: SquidSpirit <squid@squidspirit.com>
Co-committed-by: SquidSpirit <squid@squidspirit.com>