已弃坑,目前遇到的困难:无法异步获取GitHub动态数据,无法设置Cookie后再获取Cookie
A web component by lit
The final product is an ES module, and it can be used alone.
Anywhere like Vanilla JS / Vue / React / Angular / Svelte ...
npm i wc-github-dynamic
See demo/index.html
<!-- cdn -->
<script
type="module"
src="https://cdn.jsdelivr.net/npm/wc-github-dynamic@latest"
></script>
// main.ts
import "wc-github-dynamic"
<!-- index.html -->
<lantern-element></lantern-element>
Because GitHub Rate limit, this component will set a cookie in browser, the validity period is 1 hour
<github-dynamic
username="iRoZhi"
limit="3"
bgColor="#fff"
>
</github-dynamic>
Name | Module | Package |
---|---|---|
LitElement |
lit |
Name | Privacy | Type | Default | Description | Inherited From |
---|---|---|---|---|---|
username |
string |
"wibus-wee" |
the github username | ||
limit |
number |
10 |
limit number | ||
bgColor |
string |
"#fafafa" |
set background color | ||
titleColor |
string |
"#555" |
set title color | ||
descriptionColor |
string |
"#8b8b8b" |
set description color |
GS-server © Wibus, Released under the MIT License.
Personal Website · Blog · GitHub @wibus-wee · Telegram @wibus✪