Skip to content

Commit f4f2c91

Browse files
committed
update docs
1 parent e02d797 commit f4f2c91

File tree

9 files changed

+43
-77
lines changed

9 files changed

+43
-77
lines changed

docs/.vuepress/components/PluginMarket.vue

+15-43
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class="image-content"
1616
/>
1717
<div v-else class="image-placeholder">
18-
<Icon :name="item.icon" size="3em" color="var(--vp-c-brand)" />
18+
<Icon :name="item.icon" size="3em" color="var(--vp-c-text-1)" />
1919
</div>
2020
<div v-if="item.priceLabel" class="price-corner-tag" :class="{ 'paid': item.priceLabel === '付费' }">
2121
<span class="price-corner-text">{{ item.priceLabel }}</span>
@@ -49,21 +49,19 @@
4949
<h3 class="card-title">{{ item.title }}</h3>
5050
<p class="card-description">{{ item.description }}</p>
5151
<div class="card-tags">
52-
<span
52+
<Badge
5353
v-for="(tag, tagIndex) in item.tags"
5454
:key="tagIndex"
55-
class="badge"
56-
:style="getTagColors(tag)"
57-
>{{ tag }}</span>
55+
:text="tag"
56+
:style="colors[tag]"
57+
/>
5858
</div>
5959
</div>
6060
</div>
6161
</div>
6262
</template>
6363

6464
<script setup lang="ts">
65-
import type { CSSProperties } from 'vue';
66-
6765
export interface PluginItem {
6866
icon: string
6967
title: string
@@ -85,28 +83,16 @@ const props = withDefaults(
8583
}
8684
)
8785
88-
interface TagColors extends CSSProperties {
89-
}
90-
91-
const getTagColors = (tag: string): TagColors => {
92-
const colors: Record<string, TagColors> = {
93-
'MySQL': { color: '#006484', backgroundColor: 'rgba(0, 100, 132, 0.1)', borderColor: 'rgba(0, 100, 132, 0.2)' },
94-
'PostgreSQL': {
95-
color: '#336699',
96-
backgroundColor: 'rgba(51, 102, 153, 0.1)',
97-
borderColor: 'rgba(51, 102, 153, 0.2)'
98-
},
99-
'fba': { color: '#8b5cf6', backgroundColor: 'rgba(139, 92, 246, 0.1)', borderColor: 'rgba(139, 92, 246, 0.2)' },
100-
'fba_ui': { color: '#a855f7', backgroundColor: 'rgba(168, 85, 247, 0.1)', borderColor: 'rgba(168, 85, 247, 0.2)' },
101-
'app': { color: '#f97316', backgroundColor: 'rgba(249, 115, 22, 0.1)', borderColor: 'rgba(249, 115, 22, 0.2)' },
102-
'extra': { color: '#64748b', backgroundColor: 'rgba(100, 116, 139, 0.1)', borderColor: 'rgba(100, 116, 139, 0.2)' },
103-
};
104-
return colors[tag] || {
105-
color: 'var(--vp-c-text-2)',
106-
backgroundColor: 'var(--vp-c-bg-soft)',
107-
borderColor: 'var(--vp-c-divider)'
108-
};
109-
}
86+
const colors: Record<string, TagColors> = {
87+
'MySQL': { color: '#006484', backgroundColor: 'rgba(0, 100, 132, 0.1)', borderColor: 'rgba(0, 100, 132, 0.2)' },
88+
'PostgreSQL': {
89+
color: '#336699',
90+
backgroundColor: 'rgba(51, 102, 153, 0.1)',
91+
borderColor: 'rgba(51, 102, 153, 0.2)'
92+
},
93+
'后端': { color: '#009485', backgroundColor: 'rgba(0,148,133,0.1)', borderColor: 'rgba(0,148,133,0.2)' },
94+
'前端': { color: '#a855f7', backgroundColor: 'rgba(168, 85, 247, 0.1)', borderColor: 'rgba(168, 85, 247, 0.2)' },
95+
};
11096
11197
const getGithubAvatarUrl = (username: string) => {
11298
return `https://github.com/${ username }.png?size=32`;
@@ -269,24 +255,10 @@ const handleCardClick = (item: PluginItem) => {
269255
margin-bottom: 0.5rem;
270256
}
271257
272-
.badge {
273-
display: inline-flex;
274-
align-items: center;
275-
justify-content: center;
276-
padding: 0.1rem 0.5rem;
277-
border-radius: 4px;
278-
font-size: 0.7rem;
279-
line-height: 1;
280-
font-weight: 500;
281-
white-space: nowrap;
282-
border: 1px solid transparent;
283-
}
284-
285258
.price-corner-tag {
286259
position: absolute;
287260
top: 0;
288261
right: 0;
289-
background: #17bf63;
290262
color: #fff;
291263
padding: 0.3rem 0.6rem;
292264
font-size: 0.75rem;

docs/.vuepress/config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export default defineUserConfig({
5656
contributors: false,
5757
lastUpdated: false,
5858
footer: {
59+
message: 'FastAPI 最佳架构 & MIT LICENCE',
5960
copyright: 'Copyright © 2023-present FastAPI Practices'
6061
},
6162
//watermark: true,

docs/.vuepress/data/plugin.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,39 @@ export const pluginItems: PluginItem[] = [
55
icon: "fa6-regular:file-code",
66
title: "代码生成",
77
description: "生成通用业务代码(仅后端工程)",
8-
tags: ["MySQL", "PostgreSQL", "fba", "app"],
8+
tags: ["MySQL", "PostgreSQL", "后端"],
99
githubUser: 'wu-clan',
1010
priceLabel: "免费"
1111
},
1212
{
1313
icon: "fe:notice-active",
1414
title: "通知公告",
1515
description: "发布系统内部通知、公告",
16-
tags: ["MySQL", "PostgreSQL", "fba", "extra"],
16+
tags: ["MySQL", "PostgreSQL", "后端"],
1717
githubUser: 'wu-clan',
1818
priceLabel: "免费"
1919
},
2020
{
2121
icon: "fluent-mdl2:dictionary",
2222
title: "数据字典",
2323
description: "通常用于约束前端工程数据展示",
24-
tags: ["MySQL", "PostgreSQL", "fba", "extra"],
24+
tags: ["MySQL", "PostgreSQL", "后端"],
2525
githubUser: 'wu-clan',
2626
priceLabel: "免费"
2727
},
2828
{
2929
icon: "icon-park-outline:config",
3030
title: "参数配置",
3131
description: "通常用于前端工程数据展示",
32-
tags: ["MySQL", "PostgreSQL", "fba", "extra"],
32+
tags: ["MySQL", "PostgreSQL", "后端"],
3333
githubUser: 'wu-clan',
3434
priceLabel: "免费"
3535
},
3636
{
3737
icon: "charm:shield-keyhole",
3838
title: "Casbin-RBAC",
3939
description: "基于 Casbin 实现的 RBAC 权限",
40-
tags: ["MySQL", "PostgreSQL", "fba", "extra"],
40+
tags: ["MySQL", "PostgreSQL", "后端"],
4141
link: "https://github.com/fastapi-practices/fba_casbin",
4242
image: "https://avatars.githubusercontent.com/u/27810343?s=200&v=4",
4343
githubUser: 'wu-clan',
@@ -47,7 +47,7 @@ export const pluginItems: PluginItem[] = [
4747
icon: "streamline:ai-prompt-spark",
4848
title: "MCP ChatGPT",
4949
description: "带有 MCP 服务器调用的 AI 对话",
50-
tags: ["MySQL", "PostgreSQL", "fba", "extra"],
50+
tags: ["MySQL", "PostgreSQL", "后端"],
5151
link: "https://github.com/fastapi-practices/fba_mcp",
5252
image: "https://github.com/modelcontextprotocol/.github/raw/main/profile/assets/light.png",
5353
githubUser: 'wu-clan',
@@ -57,7 +57,7 @@ export const pluginItems: PluginItem[] = [
5757
icon: "ant-design:aliyun-outlined",
5858
title: "阿里云 oss",
5959
description: "阿里云 oss 文件上传",
60-
tags: ["MySQL", "PostgreSQL", "fba", "extra"],
60+
tags: ["MySQL", "PostgreSQL", "后端"],
6161
link: "https://github.com/fastapi-practices/fba_aliyun_oss",
6262
image: "https://img.alicdn.com/tfs/TB1Ly5oS3HqK1RjSZFPXXcwapXa-238-54.png",
6363
githubUser: 'wu-clan',
@@ -67,7 +67,7 @@ export const pluginItems: PluginItem[] = [
6767
icon: "material-symbols:token-outline",
6868
title: "配置下发",
6969
description: "将 env 等配置信息通过数据库进行管理",
70-
tags: ["MySQL", "fba", "extra"],
70+
tags: ["MySQL", "后端"],
7171
link: "https://github.com/dividduang/option",
7272
githubUser: 'dividduang',
7373
priceLabel: "免费"
@@ -76,7 +76,7 @@ export const pluginItems: PluginItem[] = [
7676
icon: "ant-design:wechat-work-outlined",
7777
title: "企微 bot 定时任务",
7878
description: "定时调用企业微信群聊机器人发送消息",
79-
tags: ["MySQL", "fba", "extra"],
79+
tags: ["MySQL", "后端"],
8080
link: "https://github.com/dividduang/wecom-task",
8181
image: "https://rescdn.qqmail.com/node/wework/images/Slice.d2258f37eb.png",
8282
githubUser: 'dividduang',
@@ -86,7 +86,7 @@ export const pluginItems: PluginItem[] = [
8686
icon: "ant-design:wechat-work-outlined",
8787
title: "SSO",
8888
description: "通过 Casdoor 实现 SSO 单点登录集成",
89-
tags: ["MySQL", "PostgreSQL", "fba", "extra"],
89+
tags: ["MySQL", "PostgreSQL", "后端"],
9090
link: "/fastapi_best_architecture_docs/planet.html",
9191
image: "https://casdoor.org/zh/img/casdoor.png",
9292
githubUser: 'wu-clan',

docs/.vuepress/navbar.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export const myNavbar = defineNavbarConfig([
106106
{
107107
text: '插件系统',
108108
icon: 'unjs:unplugin',
109-
badge: { text: 'New' },
109+
badge: { text: 'NEW' },
110110
link: '/plugin/before'
111111
},
112112
{
@@ -122,7 +122,7 @@ export const myNavbar = defineNavbarConfig([
122122
{
123123
text: '互动',
124124
icon: 'game-icons:talk',
125-
badge: { text: 'Hot', type: 'danger' },
125+
badge: { text: 'HOT', type: 'danger' },
126126
link: '/group'
127127
},
128128
{

docs/.vuepress/sidebar.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export const mySidebar: ThemeSidebarMulti = {
8888
text: '市场',
8989
collapsed: false,
9090
items: [
91-
{ text: '插件市场', badge: { text: 'New' }, link: 'market' },
91+
{ text: '插件市场', badge: { text: 'NEW' }, link: 'market' },
9292
]
9393
}
9494
],

docs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ config:
1010
actions:
1111
- theme: brand
1212
text: 快速开始 ->
13-
link: /backend/summary/quick-start
13+
link: /backend/summary/intro
1414
- theme: alt
1515
text: 伪三层架构?
1616
link: /backend/summary/intro#伪三层架构

docs/backend/summary/intro.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,11 @@ mvc 架构作为常规设计模式,在 python web 中很常见,但是三层
103103

104104
[![Stargazers over time](https://starchart.cc/fastapi-practices/fastapi_best_architecture.svg?variant=adaptive)](https://starchart.cc/fastapi-practices/fastapi_best_architecture)
105105

106-
## 相关
107-
108-
> [!IMPORTANT]
109-
> 特此感谢 [无名](https://github.com/lvright) 为此架构无偿设计的 LOGO
110-
>
111-
> LOGO 寓意:包含了 FBA 三个字母抽象结合,形成了一个类似从地面扩散投影上来的闪电
106+
## 特别鸣谢
107+
108+
- [downdawn](https://github.com/downdawn) 为此项目的创建提供大力支持
109+
- [无名](https://github.com/lvright) 精心设计的 LOGO(包含了 FBA 三个字母抽象结合,形成了一个类似从地面扩散投影上来的闪电)
110+
- [vuepress-theme-plume](https://github.com/pengzhanbo/vuepress-theme-plume) 为官网文档提供驱动支持
111+
- FastAPI、SQLAlchemy、Pydantic 等开源先行者
112+
- 此项目的所有贡献者、参与者和使用者
113+
- 赞助商们(包含所有渠道)的现金流支持

docs/plugin/market.md

+4-13
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,13 @@ watermark: true
66

77
::: info 标签说明
88

9-
<Badge text="MySQL" color="#006484" bg-color="rgba(0, 100, 132, 0.1)" border-color="rgba(0, 100, 132, 0.2)" /> [+MySQL] |
10-
<Badge text="PostgreSQL" color="#336699" bg-color="rgba(51, 102, 153, 0.1)" border-color="rgba(51, 102, 153, 0.2)" /> [+PostgreSQL] |
11-
<Badge text="fba" color="#8b5cf6" bg-color="rgba(139, 92, 246, 0.1)" border-color="rgba(139, 92, 246, 0.2)" /> [+fba] |
12-
<Badge text="fba_ui" color="#a855f7" bg-color="rgba(168, 85, 247, 0.1)" border-color="rgba(168, 85, 247, 0.2)" /> [+fba_ui] |
13-
<Badge text="app" color="#f97316" bg-color="rgba(249, 115, 22, 0.1)" border-color="rgba(249, 115, 22, 0.2)" /> [+app] |
14-
<Badge text="extra" color="#64748b" bg-color="rgba(100, 116, 139, 0.1)" border-color="rgba(100, 116, 139, 0.2)" /> [+extra]
9+
- <Badge text="MySQL" color="#006484" bg-color="rgba(0, 100, 132, 0.1)" border-color="rgba(0, 100, 132, 0.2)" /> - 支持 MySQL
10+
- <Badge text="PostgreSQL" color="#336699" bg-color="rgba(51, 102, 153, 0.1)" border-color="rgba(51, 102, 153, 0.2)" /> - 支持 PostgreSQL
11+
- <Badge text="后端" color="#009485" bg-color="rgba(0,148,133,0.1)" border-color="rgba(0,148,133,0.2)" /> - 后端代码插件
12+
- <Badge text="前端" color="#a855f7" bg-color="rgba(168, 85, 247, 0.1)" border-color="rgba(168, 85, 247, 0.2)" /> - 前端 [Vben Admin Antd](https://github.com/fastapi-practices/fastapi_best_architecture_ui) 代码插件
1513

1614
:::
1715

18-
[+MySQL]: 支持 MySQL
19-
[+PostgreSQL]: 支持 PostgreSQL
20-
[+fba]: 仅后端代码插件
21-
[+fba_ui]: 包含前端 [Vben Admin Antd](https://github.com/fastapi-practices/fastapi_best_architecture_ui) 代码插件
22-
[+app]: 应用级插件
23-
[+extra]: 扩展级插件
24-
2516
<script setup lang="ts">
2617
import { pluginItems } from '@source/.vuepress/data/plugin'
2718
</script>

docs/plugin/publish.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ title: 发布
88
社区的 [插件系统](https://discord.com/channels/1185035164577972344/1349951379560599572) 频道与我们分享
99

1010
> [!IMPORTANT]
11-
> 发布插件需满足以下要求
11+
> 发布插件必须满足以下要求
1212
>
1313
> - 提供插件 GitHub 仓库地址
1414
> - 在插件仓库内提供至少一种您的(任意)联系方式用于技术支持

0 commit comments

Comments
 (0)