Skip to content

Commit

Permalink
更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
ikenxuan committed Aug 18, 2024
1 parent 8c98822 commit 5722705
Show file tree
Hide file tree
Showing 6 changed files with 201 additions and 11 deletions.
134 changes: 134 additions & 0 deletions .vitepress/theme/components/Task.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
<template>
<div class="task-item">
<div
class="task-status"
:class="getStatusClass"
>
<!-- 根据状态显示不同的图标 -->
<div v-if="status === '已发布'" class="check-circle"></div>
<div v-else class="circle-container" :style="{ animationDuration: '5s' }">
<div v-for="n in 8" :key="n" :style="{ backgroundColor: statusColor }"></div>
</div>
</div>
<div class="task-description" v-html="compiledMarkdown"></div>
</div>
</template>

<script>
import { marked } from 'marked';
export default {
name: 'Task',
props: {
status: {
type: String,
default: '待确定',
validator: (value) => ['待确定', '开发中', '已发布'].includes(value)
},
content: {
type: String,
required: true
}
},
computed: {
getStatusClass() {
return `status-${this.status}`;
},
statusColor() {
switch (this.status) {
case '待确定':
return 'grey';
case '开发中':
return 'yellow';
case '已发布':
return 'green';
default:
return 'grey';
}
},
compiledMarkdown() {
return marked(this.content);
}
}
};
</script>

<style scoped>
.task-item {
display: flex;
align-items: center;
margin: 0;
padding: 0;
}
.task-status {
margin-right: 8px;
}
/* 圆圈 + 勾的样式 */
.check-circle {
position: relative;
width: 20px;
height: 20px;
border: 1.5px solid #20CC20;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.check-circle::after {
content: '';
width: 5px;
height: 10px;
border-right: 1.5px solid #20CC20;
border-bottom: 1.5px solid #20CC20;
transform: rotate(45deg);
position: absolute;
margin: 0 0 1.5px 0.8px;
}
/* 动态旋转的小圆点动画 */
.circle-container {
position: relative;
width: 15px;
height: 15px;
margin: 0 auto;
border-radius: 50%;
animation: rotate 5s linear infinite;
}
.circle-container div {
position: absolute;
width: 3px;
height: 3px;
border-radius: 50%;
}
@keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(1440deg); /* 4圈 */
}
}
/* 定位点的位置 */
.circle-container div:nth-child(1) { top: 50%; left: 100%; transform: translate(-50%, -50%); }
.circle-container div:nth-child(2) { top: 15%; left: 85%; transform: translate(-50%, -50%); }
.circle-container div:nth-child(3) { top: 0%; left: 50%; transform: translate(-50%, -50%); }
.circle-container div:nth-child(4) { top: 15%; left: 15%; transform: translate(-50%, -50%); }
.circle-container div:nth-child(5) { top: 50%; left: 0%; transform: translate(-50%, -50%); }
.circle-container div:nth-child(6) { top: 85%; left: 15%; transform: translate(-50%, -50%); }
.circle-container div:nth-child(7) { top: 100%; left: 50%; transform: translate(-50%, -50%); }
.circle-container div:nth-child(8) { top: 85%; left: 85%; transform: translate(-50%, -50%); }
.vp-doc p, .vp-doc summary {
margin: 16px 0;
}
.task-description {
flex: 1;
}
</style>
2 changes: 2 additions & 0 deletions .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import HomeUnderline from './components/HomeUnderline.vue'
import HomeFooter from './components/HomeFooter.vue'
import Confetti from './components/Confetti.vue'
import ChangeLogs from './components/ChangeLogs.vue'
import Task from './components/Task.vue'
// 页面属性
import {
NolebasePagePropertiesPlugin,
Expand Down Expand Up @@ -74,6 +75,7 @@ export default {
app.component('HomeFooter', HomeFooter)
app.component('Confetti', Confetti)
app.component('ChangeLogs', ChangeLogs)
app.component('Task', Task)
app.use(TwoslashFloatingVue as unknown as Plugin)
app.use(NolebaseGitChangelogPlugin as Plugin)
app.provide(InjectionKey, {
Expand Down
11 changes: 5 additions & 6 deletions docs/intro/kuaishou.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
[^1]: 快手的分享链接: [`https://v.kuaishou.com/JTDKHe 祝各位都能成为自己想成为的那个人。 "边路之怪听安    "听安cos天暗星   该作品在快手被播放过1,988.7万次,点击链接,打开【快手】直接观看!`](https://v.kuaishou.com/JTDKHe)

# TODO

- [x] 自定义 ck 由 [**@ikenxuan**](https://github.com/ikenxuan)[**2a8afd**](https://github.com/ikenxuan/kkkkkk-10086/commit/2a8afd9ca06ac29c3d1e4726aa7a59a1e70e37cf) 完成
- [ ] 图集
- [x] 评论 由 [**@ikenxuan**](https://github.com/ikenxuan)[**b37949**](https://github.com/ikenxuan/kkkkkk-10086/commit/b379497062b4a3be29017635824c8381dbb9f9be) 完成
- [ ] ~~用户主视频列表~~
- [ ] ~~视频更新推送~~
<Task status="已发布" content="自定义 ck 由 [**@ikenxuan**](https://github.com/ikenxuan) 在 [**2a8afd**](https://github.com/ikenxuan/kkkkkk-10086/commit/2a8afd9ca06ac29c3d1e4726aa7a59a1e70e37cf) 完成"></Task>
<Task status="开发中" content="图集"></Task>
<Task status="已发布" content="评论 由 [**@ikenxuan**](https://github.com/ikenxuan) 在 [**b37949**](https://github.com/ikenxuan/kkkkkk-10086/commit/b379497062b4a3be29017635824c8381dbb9f9be) 完成"></Task>
<Task status="待确定" content="~~用户主视频列表~~"></Task>
<Task status="待确定" content="~~视频更新推送~~"></Task>
5 changes: 2 additions & 3 deletions docs/intro/push.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,5 @@ $$(\text{now time} - \text{86400}) < \textcolor{red}{\text{true}} < \text{now ti
:::
## TODO
- [x] 往后可能会根据配置文件内容进行内容渲染,而不是通过数据库缓存<br>由 [**@ikenxuan**](https://github.com/ikenxuan) 在 [**95dcffa**](https://github.com/ikenxuan/kkkkkk-10086/commit/95dcffab00f8afc1484a1e350911636b2d92006d) 完成
- [ ] 当机器人被踢时自动删除该群的推送
<Task status="已发布" content="往后可能会根据配置文件内容进行内容渲染,而不是通过数据库缓存。由 [**@ikenxuan**](https://github.com/ikenxuan) 在 [**95dcffa**](https://github.com/ikenxuan/kkkkkk-10086/commit/95dcffab00f8afc1484a1e350911636b2d92006d) 完成"></Task>
<Task status="开发中" content="当机器人被踢时自动删除该群的推送"></Task>
57 changes: 57 additions & 0 deletions docs/other/test.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rotating Dots Circle</title>
<style>
.circle-container {
position: relative;
width: 200px;
height: 200px;
margin: 50px auto;
border-radius: 50%;
animation: rotate 5s linear infinite;
}

.circle-container div {
position: absolute;
width: 10px;
height: 10px;
background-color: yellow;
border-radius: 50%;
}

@keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}

/* Positioning the dots around the circle */
.circle-container div:nth-child(1) { top: 0; left: 50%; transform: translateX(-50%); }
.circle-container div:nth-child(2) { top: 15%; left: 85%; transform: translate(-50%, -50%); }
.circle-container div:nth-child(3) { top: 50%; left: 100%; transform: translate(-50%, -50%); }
.circle-container div:nth-child(4) { top: 85%; left: 85%; transform: translate(-50%, -50%); }
.circle-container div:nth-child(5) { top: 100%; left: 50%; transform: translate(-50%, -50%); }
.circle-container div:nth-child(6) { top: 85%; left: 15%; transform: translate(-50%, -50%); }
.circle-container div:nth-child(7) { top: 50%; left: 0; transform: translate(-50%, -50%); }
.circle-container div:nth-child(8) { top: 15%; left: 15%; transform: translate(-50%, -50%); }
</style>
</head>
<body>
<div class="circle-container">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</body>
</html>
3 changes: 1 addition & 2 deletions docs/start/start.config.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ _**Karin**_ 生态用户建议使用 [**Karin Manage**](https://github.com/Halcy
```

# TODO

- [x] 后续版本将使用 `YAML` 格式配置文件<br>由 [**@ikenxuan**](https://github.com/ikenxuan)[**88fa787**](https://github.com/ikenxuan/kkkkkk-10086/commit/88fa787ea2365821deff71298ebc60f8adcd0815) 完成
<Task status="已发布" content="后续版本将使用 `YAML` 格式配置文件。由 [**@ikenxuan**](https://github.com/ikenxuan) 在 [**88fa787**](https://github.com/ikenxuan/kkkkkk-10086/commit/88fa787ea2365821deff71298ebc60f8adcd0815) 完成"></Task>

0 comments on commit 5722705

Please sign in to comment.