Skip to content

Commit

Permalink
add special sponsor
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Apr 25, 2023
1 parent 300a09e commit 50f0c05
Show file tree
Hide file tree
Showing 11 changed files with 159 additions and 12 deletions.
45 changes: 42 additions & 3 deletions docs/.vuepress/components/HomePage.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,57 @@
<template>
<HopeHomePage>
<template #center>
<div class="hero-info-wrapper ads-container">
<div class="ss">
<span>🌈 {{ spStr }}</span>
<div class="mingdao">
<a href="https://www.mingdao.com?s=utm_51=utm_source=liteflow&utm_medium=banner&utm_campaign=%E5%93%81%E7%89%8C%E6%8E%A8%E5%B9%BF&utm_content=IT%E8%B5%8B%E8%83%BD%E4%B8%9A%E5%8A%A1"
target="_blank"><img src="/img/ads/mingdao-h.png" alt="" /></a>
</div>
</div>
<div class="hero-info-wrapper wwads-container">
<div class="wwads wwads-cn wwads-horizontal" data-id="213" style="width:100% !important"></div>
</div>
</template>
</HopeHomePage>
</template>
<script setup lang="ts">
import HopeHomePage from "vuepress-theme-hope/components/HomePage";
import { usePageData } from '@vuepress/client'
import { computed } from "vue";
const pageData = usePageData()
const spStr = computed(() => {
if (pageData.value.path.startsWith("/zh/")) {
return "特别赞助";
}
return "Sponsorship";
})
</script>

<style>
.ads-container {
<style scoped lang="scss">
.ss {
display: flex;
flex-direction: column;
align-items: center;
span {
font-size: large;
font-weight: bold;
margin-bottom: 14px;
}
.mingdao {
a {
img {
max-width: 500px;
}
}
}
}
.wwads-container {
padding-top: 0 !important;
padding-bottom: 0 !important;
}
Expand Down
46 changes: 44 additions & 2 deletions docs/.vuepress/components/NormalPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,58 @@
<NormalPage>
<template #contentBefore>
<div class="theme-hope-content ads-container">
<div class="wwads wwads-cn wwads-horizontal" data-id="213" style="width:100% !important"></div>
<div class="mingdao" v-if="!enableSidebar">
<a href="https://www.mingdao.com?s=utm_51=utm_source=liteflow&utm_medium=banner&utm_campaign=%E5%93%81%E7%89%8C%E6%8E%A8%E5%B9%BF&utm_content=IT%E8%B5%8B%E8%83%BD%E4%B8%9A%E5%8A%A1"
target="_blank"><img src="/img/ads/mingdao-h.png" alt="" /></a>
<span>{{ spStr }}</span>
</div>
<div class="wwads wwads-cn wwads-horizontal" data-id="213" style="width:100% !important" v-else>
</div>
</div>
</template>
</NormalPage>
</template>
<script setup lang="ts">
import NormalPage from "vuepress-theme-hope/components/NormalPage";
import { usePageFrontmatter } from "@vuepress/client";
import { computed } from "vue";
import { usePageData } from '@vuepress/client'
const pageData = usePageData()
// get is enable sidebar from frontmatter
const frontmatter = usePageFrontmatter();
const enableSidebar = computed(() => {
return frontmatter.value.sidebar === undefined ? true : frontmatter.value.sidebar;
})
const spStr = computed(() => {
if (pageData.value.path.startsWith("/zh/")) {
return "赞助商";
}
return "Sponsorship";
})
</script>

<style>
<style lang="scss" scoped>
.mingdao {
display: flex;
gap: 4px;
justify-content: center;
a {
max-width: 500px;
img {
width: 100%;
}
}
span {
font-size: small;
}
}
.ads-container {
padding-top: 0 !important;
padding-bottom: 0 !important;
Expand Down
50 changes: 50 additions & 0 deletions docs/.vuepress/components/Sidebar.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<template>
<Sidebar>
<template #top>
<div class="ss">
<div class="mingdao">
<a href="https://www.mingdao.com?s=utm_51=utm_source=liteflow&utm_medium=banner&utm_campaign=%E5%93%81%E7%89%8C%E6%8E%A8%E5%B9%BF&utm_content=IT%E8%B5%8B%E8%83%BD%E4%B8%9A%E5%8A%A1"
target="_blank"><img src="/img/ads/mingdao.png" alt="" /></a>
<span>{{ spStr }}</span>
</div>
</div>
</template>
</Sidebar>
</template>
<script setup lang="ts">
import Sidebar from "vuepress-theme-hope/modules/sidebar/components/Sidebar";
import { usePageData } from '@vuepress/client'
import { computed } from "vue";
const pageData = usePageData()
const spStr = computed(() => {
if (pageData.value.path.startsWith("/zh/")) {
return "赞助商";
}
return "Sponsorship";
})
</script>

<style scoped lang="scss">
.mingdao {
margin-top: 8px;
display: flex;
flex-direction: column;
width: 100%;
align-items: center;
a {
max-width: 70%;
img {
width: 100%;
}
}
span {
width: 70%;
text-align: right;
font-size: small;
}
}</style>
4 changes: 4 additions & 0 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ export default defineUserConfig({
__dirname,
"./components/HomePage.vue"
),
"@theme-hope/modules/sidebar/components/Sidebar": path.resolve(
__dirname,
"./components/Sidebar.vue"
),
"@Onedrive/Request": path.resolve(
__dirname,
"./components/onedrive/Request.vue"
Expand Down
Binary file added docs/.vuepress/public/img/ads/mingdao-h.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/.vuepress/public/img/ads/mingdao.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions docs/.vuepress/styles/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.ads-card{
background-color: #f4f8fa;
padding: 14px;
border-radius: 8px;
}

html[data-theme="dark"] .ads-card {
background-color: #272829;
}
8 changes: 4 additions & 4 deletions docs/.vuepress/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ export default hopeTheme({
flowchart: true,
mark: true,
mermaid: true,
sub: true,
sup: true,
align: true,
sub: true,
sup: true,
align: true,
},
components: {
components: ["ArtPlayer","BiliBili","Badge"],
components: ["ArtPlayer", "BiliBili", "Badge"],
},
},
});
7 changes: 4 additions & 3 deletions docs/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ A file list program that supports multiple storage, and supports web browsing an
- [x] [mediatrack](https://www.mediatrack.cn/)
- [x] [139yun](https://yun.139.com/) (Personal, Family)
- [x] [YandexDisk](https://disk.yandex.com/)
- [x] [BaiduNetdisk](https://pan.baidu.com/) / [share](./drivers/baidu_share.md)
- [x] [BaiduNetdisk](https://pan.baidu.com/) / [share](./drivers/baidu_share.md)
- [x] [Quark](https://pan.quark.cn/)
- [x] [Thunder](https://pan.xunlei.com)
- [x] [Lanzou](https://www.lanzou.com/)
Expand All @@ -60,7 +60,6 @@ A file list program that supports multiple storage, and supports web browsing an
- [x] [Trainbit](https://trainbit.com/)
- [x] [UrlTree](../guide/drivers/urltree.md)


### Discussion

Please go to our [discussion forum](https://github.com/Xhofe/alist/discussions) for general questions, **issues are for bug reports and feature request only.**
Expand All @@ -70,8 +69,10 @@ Please go to our [discussion forum](https://github.com/Xhofe/alist/discussions)
- https://al.nn.ci

### Special sponsors

- [明道云 - 零代码开发平台,快速响应业务需求。从“IT 背锅侠”变成“IT 英雄”](https://www.mingdao.com/?s=utm_51=utm_source=liteflow&utm_medium=banner&utm_campaign=%E5%93%81%E7%89%8C%E6%8E%A8%E5%B9%BF&utm_content=IT%E8%B5%8B%E8%83%BD%E4%B8%9A%E5%8A%A1)
- [找资源 - 阿里云盘资源搜索引擎](https://zhaoziyuan.la/)
- [KinhDown 百度云盘不限速下载!永久免费!以稳定运行3年!非常可靠!](https://kinhdown.com/?Type=Tutorials)
- [KinhDown 百度云盘不限速下载!永久免费!以稳定运行 3 年!非常可靠!](https://kinhdown.com/?Type=Tutorials)

### License

Expand Down
1 change: 1 addition & 0 deletions docs/zh/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ category:

## 特别赞助

- [明道云 - 零代码开发平台,快速响应业务需求。从“IT 背锅侠”变成“IT 英雄”](https://www.mingdao.com/?s=utm_51=utm_source=liteflow&utm_medium=banner&utm_campaign=%E5%93%81%E7%89%8C%E6%8E%A8%E5%B9%BF&utm_content=IT%E8%B5%8B%E8%83%BD%E4%B8%9A%E5%8A%A1)
- [找资源 - 阿里云盘资源搜索引擎](https://zhaoziyuan.la/)
- [KinhDown 百度云盘不限速下载!永久免费!以稳定运行3年!非常可靠!](https://kinhdown.com/?Type=Tutorials)

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"packageManager": "[email protected]",
"scripts": {
"ecosystem": "npx tsx scripts/ecosystem.ts",
"dev-build": "vuepress build docs",
"docs:build": "pnpm ecosystem && vuepress build docs",
"docs:clean-dev": "vuepress dev docs --clean-cache",
"docs:dev": "vuepress dev docs"
Expand Down

0 comments on commit 50f0c05

Please sign in to comment.