Skip to content

Commit 9a16897

Browse files
committed
update docs
1 parent 68d2e23 commit 9a16897

File tree

11 files changed

+40
-72
lines changed

11 files changed

+40
-72
lines changed

docs/.vuepress/components/SponsorPanel.vue

Lines changed: 5 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,26 @@
11
<template>
2-
<div class="brand-header" @click="toggleCollapse">
2+
<div class="brand-header">
33
<span>倾情赞助</span>
4-
<span class="toggle-icon">
5-
<Icon v-if="isCollapsed" name="iconamoon:arrow-right-2" />
6-
<Icon v-else name="iconamoon:arrow-down-2" />
7-
</span>
84
</div>
95
<div class="brand-container">
106
<div class="gold-sponsors">
117
<div
128
v-for="brand in goldSponsors"
139
v-show="shouldShowSponsor(brand)"
14-
:class="{ 'collapsed-mode': isCollapsed }"
1510
class="brand-item gold"
1611
@click="openSponsorLink(brand.href, '_blank')"
1712
>
18-
<img v-if="!isCollapsed" :alt="brand.alt" :src="brand.link" class="brand-image" />
19-
<span v-else class="brand-text collapsed-text">
20-
{{ brand.alt }}
21-
</span>
13+
<img :alt="brand.alt" :src="brand.link" class="brand-image" />
2214
</div>
2315
</div>
2416
<div class="general-sponsors">
2517
<div
2618
v-for="brand in generalSponsors"
2719
v-show="shouldShowSponsor(brand)"
28-
:class="{ 'collapsed-mode': isCollapsed }"
2920
class="brand-item"
3021
@click="openSponsorLink(brand.href, '_blank')"
3122
>
32-
<img v-if="!isCollapsed" :alt="brand.alt" :src="brand.link" class="brand-image" />
33-
<span v-else class="brand-text collapsed-text">
34-
{{ brand.alt }}
35-
</span>
23+
<img :alt="brand.alt" :src="brand.link" class="brand-image" />
3624
</div>
3725
</div>
3826
<div
@@ -54,26 +42,11 @@ import {
5442
shouldShowSponsor,
5543
sponsorUrl
5644
} from "../data/sponsors";
57-
import { useStorage } from "@vueuse/core";
58-
59-
const isCollapsed = useStorage('fba-docs-sponsor-collapsed', false);
6045
6146
const shouldShowExtraBecomeSponsor = computed(() => {
6247
return (goldSponsors.filter(brand => shouldShowSponsor(brand)).length +
6348
generalSponsors.filter(brand => shouldShowSponsor(brand)).length) < 9;
6449
});
65-
66-
const toggleCollapse = () => {
67-
isCollapsed.value = !isCollapsed.value;
68-
};
69-
70-
const brandItemGoldHeight = computed(() => {
71-
return isCollapsed.value ? '32px' : '96px'
72-
})
73-
74-
const brandItemHeight = computed(() => {
75-
return isCollapsed.value ? '32px' : '66px'
76-
})
7750
</script>
7851

7952
<style scoped>
@@ -87,12 +60,6 @@ const brandItemHeight = computed(() => {
8760
margin: 3px 0 2px;
8861
}
8962
90-
.toggle-icon {
91-
font-size: 10px;
92-
transform: scale(1.2);
93-
opacity: 0.7;
94-
}
95-
9663
.brand-container {
9764
display: flex;
9865
flex-direction: column;
@@ -117,7 +84,7 @@ const brandItemHeight = computed(() => {
11784
display: flex;
11885
align-items: center;
11986
justify-content: center;
120-
height: v-bind(brandItemHeight);
87+
height: 66px;
12188
transition: all 0.3s ease;
12289
position: relative;
12390
}
@@ -127,7 +94,7 @@ const brandItemHeight = computed(() => {
12794
}
12895
12996
.brand-item.gold {
130-
height: v-bind(brandItemGoldHeight);
97+
height: 96px;
13198
}
13299
133100
.brand-image {
@@ -152,24 +119,6 @@ const brandItemHeight = computed(() => {
152119
font-size: 13px;
153120
}
154121
155-
.collapsed-mode {
156-
height: 32px !important;
157-
}
158-
159-
.collapsed-mode .brand-image {
160-
opacity: 0;
161-
}
162-
163-
.collapsed-text {
164-
color: var(--vp-c-brand-1) !important;
165-
font-weight: 600;
166-
transform: scale(1.05);
167-
}
168-
169-
.collapsed-mode:hover .collapsed-text {
170-
color: var(--vp-c-text-1) !important;
171-
}
172-
173122
.become-brand {
174123
height: 32px;
175124
background-color: unset;

docs/.vuepress/components/SponsorSidebar.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import { homeSponsor, openSponsorLink, shouldShowSponsor } from "../data/sponsor
2626

2727
<style scoped>
2828
.brand-header {
29+
text-align: left;
2930
font-size: 11px;
3031
color: var(--vp-c-text-3);
3132
}

docs/.vuepress/layouts/Layout.vue

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ import SponsorPanel from "../components/SponsorPanel.vue";
55
import BannerTop from "../components/BannerTop.vue";
66
import SponsorSidebar from "../components/SponsorSidebar.vue";
77
import Footer from "../components/Footer.vue";
8+
import { useData } from 'vuepress-theme-plume/composables'
9+
import { computed } from "vue";
10+
11+
const { frontmatter } = useData()
12+
const showSidebarSponsorOnAsideTop = computed(() => frontmatter.value.sponsor_sidebar)
13+
814
</script>
915

1016
<template>
@@ -19,6 +25,16 @@ import Footer from "../components/Footer.vue";
1925
<SponsorSidebar />
2026
</div>
2127
</template>
28+
<template #aside-top>
29+
<div v-if="showSidebarSponsorOnAsideTop" style="margin-bottom: 8px">
30+
<SponsorSidebar />
31+
</div>
32+
</template>
33+
<template #posts-aside-top>
34+
<div style="margin-bottom: 8px">
35+
<SponsorSidebar />
36+
</div>
37+
</template>
2238
<template #doc-title-after>
2339
<PageContextMenu />
2440
</template>

docs/architecture.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: 架构
3+
sponsor_sidebar: true
34
---
45

56
待补充

docs/community-open-source.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: 社区开源
3+
sponsor_sidebar: true
34
---
45

56
作者正在翘首以盼的等着投喂🥹,这里是你的 Show Time 时刻!

docs/group.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: 交流群
3+
sponsor_sidebar: true
34
---
45

56
[通过 fba 作者主页与他互动](https://wu-clan.github.io/homepage/){.read-more}

docs/open-source.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: 官方开源
3+
sponsor_sidebar: true
34
---
45

56
在此之前,让我们通过维基百科简单了解下 [开源](https://zh.wikipedia.org/wiki/%E5%BC%80%E6%BA%90%E8%BD%AF%E4%BB%B6) 这个词

docs/questions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: 常见问题
3+
sponsor_sidebar: true
34
---
45

56
::: tip

docs/sponsors.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: 成为 fba 的赞助者
3+
sponsor_sidebar: true
34
---
45

56
::: note ⚡
@@ -61,7 +62,8 @@ title: 成为 fba 的赞助者
6162
<td>
6263
- 首页独家展示位<br>
6364
- 文档左侧边栏独家展示位<br>
64-
- 固定不可折叠<br>
65+
- 文档右侧边栏独家展示位<br>
66+
- 博客右侧边栏独家展示位<br>
6567
- 移动端可见
6668
</td>
6769
<td rowspan="2">
@@ -76,19 +78,17 @@ title: 成为 fba 的赞助者
7678
<td style="color: orangered">(目前空缺)</td>
7779
<td>与作者沟通 / 月</td>
7880
<td>
79-
- 首页信息轮播展示位<br>
80-
- 文档右侧边栏大号展示位<br>
81-
- 可折叠
81+
- 首页轮播固定展示位<br>
82+
- 文档右侧边栏大号展示位
8283
</td>
8384
</tr>
8485
<tr>
8586
<td><strong>普通展位</strong></td>
8687
<td style="color: orangered">(目前空缺)</td>
8788
<td>与作者沟通 / 月</td>
8889
<td>
89-
- 首页滚动展示位<br>
90-
- 文档右侧边栏小号展示位<br>
91-
- 可折叠
90+
- 首页轮播滚动展示位<br>
91+
- 文档右侧边栏小号展示位
9292
</td>
9393
<td>
9494
- 赞助商名称<br>

docs/stack.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: 技术栈
3+
sponsor_sidebar: true
34
---
45

56
fba 采用当前主流技术框架,我们追求新事物,拥抱新事物,并且积极更新与跟进

0 commit comments

Comments
 (0)