【问题标题】:how to get the startgazer icon for a github repo如何获取 github repo 的 startgazer 图标
【发布时间】:2021-09-24 09:21:57
【问题描述】:

我正在尝试包含 stargazer,它显示了回购的许多明星 在一个 Nikola 生成的计划 HTML 静态页面中。 类似以下的东西

是否有任何 UI 代码可以包含它?

【问题讨论】:

标签: javascript html css github icons


【解决方案1】:

转到https://buttons.github.io 并选择“星号”并确保选择了“大按钮”和“显示计数”。现在,您需要做的就是在“预览和代码”<textarea> 字段中复制相关的 HTML。

这是您需要的生成代码。

<!-- Place this tag in your head or just before your close body tag. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>

<!-- Place this tag where you want the button to render. -->
<a class="github-button"
   href="https://github.com/ntkme/github-buttons"
   data-icon="octicon-star"
   data-size="large"
   data-show-count="true"
   aria-label="Star ntkme/github-buttons on GitHub">Star</a>

这是一个带有特定用户和 repo (Facebook React) 的暗版:

body { background: #222; }
<!-- Place this tag in your head or just before your close body tag. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>

<!-- Place this tag where you want the button to render. -->
<a class="github-button"
   href="https://github.com/facebook/react"
   data-color-scheme="no-preference: dark; light: light; dark: dark;"
   data-icon="octicon-star"
   data-size="large"
   data-show-count="true"
   aria-label="Star facebook/react on GitHub">Star</a>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-11-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-12-30
    • 2018-02-15
    • 1970-01-01
    相关资源
    最近更新 更多