mirror of
https://github.com/EasyTier/easytier.github.io.git
synced 2025-05-19 10:27:06 +00:00
🐞 fix: follow theme switch
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<script setup lang="ts">
|
||||
import { useData } from 'vitepress'
|
||||
import { computed } from 'vue'
|
||||
|
||||
const props = defineProps<{
|
||||
repo: string
|
||||
type?: 'Date' | 'Timeline'
|
||||
}>()
|
||||
|
||||
const { isDark } = useData()
|
||||
|
||||
const url = computed(() =>
|
||||
`https://star-history.com/#${props.repo}&${props.type || 'Date'}`,
|
||||
)
|
||||
|
||||
const imgUrl = computed(() =>
|
||||
`https://api.star-history.com/svg?repos=${props.repo}&type=${props.type || 'Date'}${isDark.value ? '&theme=dark' : ''}`,
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a :href="url">
|
||||
<img alt="Star History Chart" :src="imgUrl">
|
||||
</a>
|
||||
</template>
|
||||
@@ -1,13 +1,11 @@
|
||||
<script setup>
|
||||
import StarHistory from '../../.vitepress/components/starHistory.vue'
|
||||
</script>
|
||||
|
||||
# Community and Contribution
|
||||
|
||||
We welcome and encourage community contributions! If you want to get involved, please submit a [GitHub PR](https://github.com/EasyTier/EasyTier/pulls). Detailed contribution guidelines can be found in [CONTRIBUTING.md](https://github.com/EasyTier/EasyTier/blob/main/CONTRIBUTING.md).
|
||||
|
||||
## Star History
|
||||
|
||||
<a href="https://star-history.com/#EasyTier/EasyTier&Date">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=EasyTier/EasyTier&type=Date&theme=dark" />
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=EasyTier/EasyTier&type=Date" />
|
||||
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=EasyTier/EasyTier&type=Date" />
|
||||
</picture>
|
||||
</a>
|
||||
<StarHistory repo="EasyTier/EasyTier" type="Timeline" />
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
<script setup>
|
||||
import StarHistory from '../.vitepress/components/starHistory.vue'
|
||||
</script>
|
||||
|
||||
# 社区和贡献
|
||||
|
||||
我们欢迎并鼓励社区贡献!如果你想参与进来,请提交 [GitHub PR](https://github.com/EasyTier/EasyTier/pulls)。
|
||||
@@ -6,10 +10,4 @@
|
||||
|
||||
## Star 历史
|
||||
|
||||
<a href="https://star-history.com/#EasyTier/EasyTier&Date">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=EasyTier/EasyTier&type=Date&theme=dark" />
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=EasyTier/EasyTier&type=Date" />
|
||||
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=EasyTier/EasyTier&type=Date" />
|
||||
</picture>
|
||||
</a>
|
||||
<StarHistory repo="EasyTier/EasyTier" type="Timeline" />
|
||||
|
||||
Reference in New Issue
Block a user