Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wibus-wee-ac/wc-github-dynamic
Github Dynamic for Web Components
https://github.com/wibus-wee-ac/wc-github-dynamic
Last synced: 14 minutes ago
JSON representation
Github Dynamic for Web Components
- Host: GitHub
- URL: https://github.com/wibus-wee-ac/wc-github-dynamic
- Owner: wibus-wee-ac
- Created: 2022-01-31T07:56:22.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-26T06:51:01.000Z (over 2 years ago)
- Last Synced: 2024-11-22T02:17:46.582Z (2 months ago)
- Language: TypeScript
- Size: 80.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GitHub Dynamic for Web Components
> 已弃坑,目前遇到的困难:无法异步获取GitHub动态数据,无法设置Cookie后再获取Cookie
A web component by [lit](https://github.com/lit/lit)
The final product is an ES module, and it can be used alone.
> Anywhere like Vanilla JS / Vue / React / Angular / Svelte ...
## Usage
```bash
npm i wc-github-dynamic
```### By CDN
See [demo/index.html](https://github.com/wibus-wee/wc-github-dynamic/blob/main/demo/index.html)
```html
```
### By NPM
```ts
// main.ts
import "wc-github-dynamic"
``````html
```
## Notice
Because GitHub Rate limit, this component will set a cookie in browser, the validity period is 1 hour
## API
### Example
```html
```
### `src/index.ts`:
#### class: `GithubDynamic`
##### Superclass
| Name | Module | Package |
| ------------ | ------ | ------- |
| `LitElement` | | lit |##### Fields
| 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 | |
## Author
GS-server © Wibus, Released under the MIT License.
> [Personal Website](http://iucky.cn/) · [Blog](https://blog.iucky.cn/) · GitHub [@wibus-wee](https://github.com/wibus-wee/) · Telegram [@wibus✪](https://t.me/wibus_wee)