forked from nacos-group/nacos-group.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 设置star+fork组件为client:load (nacos-group#516)
- Loading branch information
Showing
3 changed files
with
38 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
import Star from "../icon/Star.astro"; | ||
import Fork from "../icon/Fork.astro"; | ||
import Button from '@components/common/Button.astro'; | ||
const data = await fetch("https://api.github.com/repos/alibaba/nacos").then( | ||
(r) => r.json() | ||
); | ||
const { stargazers_count: startCount = 0, forks_count: forkCount = 0 } = | ||
data || { stargazers_count: 0, forks_count: 0 }; | ||
--- | ||
|
||
<div class="shortcut flex"> | ||
<Button | ||
size="large" | ||
class="rounded-3xl mr-4" | ||
href="https://github.com/alibaba/nacos" | ||
target="_blank" | ||
> | ||
<Star /> | ||
<span class="text-[0.875rem] leading-4 ml-2">{startCount}</span> | ||
</Button> | ||
|
||
<Button | ||
size="large" | ||
type="primary" | ||
class="rounded-3xl" | ||
href="https://github.com/alibaba/nacos/fork" | ||
target="_blank" | ||
> | ||
<Fork theme="light" /> | ||
<span class="ml-2">{forkCount}</span> | ||
</Button> | ||
</div> | ||
|