svelte-github-calendar 0.1.0-alpha.1 → 0.1.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -37
- package/dist/GitHubCalendar.svelte +9 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,58 +1,79 @@
|
|
|
1
|
-
#
|
|
1
|
+
# svelte-github-calendar
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A Svelte wrapper of the [github-calendar](https://github.com/Bloggify/github-calendar) library to displays GitHub contribution graphs in your Svelte applications.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
If you're seeing this, you've probably already done this step. Congrats!
|
|
10
|
-
|
|
11
|
-
```sh
|
|
12
|
-
# create a new project in the current directory
|
|
13
|
-
npx sv create
|
|
14
|
-
|
|
15
|
-
# create a new project in my-app
|
|
16
|
-
npx sv create my-app
|
|
7
|
+
```bash
|
|
8
|
+
npm install svelte-github-calendar
|
|
17
9
|
```
|
|
18
10
|
|
|
19
|
-
##
|
|
11
|
+
## Usage
|
|
20
12
|
|
|
21
|
-
|
|
13
|
+
### Basic Example
|
|
22
14
|
|
|
23
|
-
```
|
|
24
|
-
|
|
15
|
+
```svelte
|
|
16
|
+
<script>
|
|
17
|
+
import { GithubCalendar } from 'svelte-github-calendar';
|
|
18
|
+
</script>
|
|
25
19
|
|
|
26
|
-
|
|
27
|
-
npm run dev -- --open
|
|
20
|
+
<GithubCalendar username="yourusername" />
|
|
28
21
|
```
|
|
29
22
|
|
|
30
|
-
|
|
23
|
+
### Advanced Example
|
|
24
|
+
|
|
25
|
+
```svelte
|
|
26
|
+
<script>
|
|
27
|
+
import { GithubCalendar } from 'svelte-github-calendar';
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<GithubCalendar
|
|
31
|
+
username="yourusername"
|
|
32
|
+
summary_text="Summary of {name}'s GitHub activity"
|
|
33
|
+
global_stats={true}
|
|
34
|
+
responsive={true}
|
|
35
|
+
tooltips={true}
|
|
36
|
+
cache={60}
|
|
37
|
+
class="my-custom-class"
|
|
38
|
+
/>
|
|
39
|
+
```
|
|
31
40
|
|
|
32
|
-
##
|
|
41
|
+
## Props
|
|
33
42
|
|
|
34
|
-
|
|
43
|
+
| Prop | Type | Default | Description |
|
|
44
|
+
| -------------- | ---------- | ------------ | ---------------------------------------- |
|
|
45
|
+
| `username` | `string` | **Required** | GitHub username to display calendar for |
|
|
46
|
+
| `summary_text` | `string` | `undefined` | Custom summary text template. |
|
|
47
|
+
| `proxy` | `function` | `undefined` | Custom proxy function for API requests |
|
|
48
|
+
| `global_stats` | `boolean` | `undefined` | Whether to show global statistics |
|
|
49
|
+
| `responsive` | `boolean` | `undefined` | Enable responsive design |
|
|
50
|
+
| `tooltips` | `boolean` | `undefined` | Enable hover tooltips |
|
|
51
|
+
| `cache` | `number` | `undefined` | Cache duration in seconds |
|
|
52
|
+
| `class` | `string` | `''` | Additional CSS classes for the container |
|
|
35
53
|
|
|
36
|
-
|
|
37
|
-
npm pack
|
|
38
|
-
```
|
|
54
|
+
You can read more about the props in the [original documentation](https://github.com/Bloggify/github-calendar).
|
|
39
55
|
|
|
40
|
-
|
|
56
|
+
## Credits
|
|
41
57
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
```
|
|
58
|
+
- Svelte wrapper of [github-calendar](https://github.com/Bloggify/github-calendar) by Bloggify
|
|
59
|
+
- Designed specifically for Svelte applications
|
|
45
60
|
|
|
46
|
-
|
|
61
|
+
## License
|
|
47
62
|
|
|
48
|
-
|
|
63
|
+
This library is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
|
|
49
64
|
|
|
50
|
-
##
|
|
65
|
+
## Contributing
|
|
51
66
|
|
|
52
|
-
|
|
67
|
+
Contributions are welcome! Feel free to:
|
|
53
68
|
|
|
54
|
-
|
|
69
|
+
- Report bugs
|
|
70
|
+
- Suggest new features
|
|
71
|
+
- Submit pull requests
|
|
72
|
+
- Improve documentation
|
|
55
73
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
74
|
+
## Troubleshooting
|
|
75
|
+
|
|
76
|
+
### Calendar not loading
|
|
77
|
+
|
|
78
|
+
- Ensure the username is valid and public
|
|
79
|
+
- Verify network connectivity
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
|
|
59
59
|
table.ContributionCalendar-grid {
|
|
60
60
|
margin-bottom: 0pt !important;
|
|
61
|
+
border-collapse: separate !important;
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
table.ContributionCalendar-grid td {
|
|
@@ -144,6 +145,10 @@
|
|
|
144
145
|
font-size: 11px !important;
|
|
145
146
|
}
|
|
146
147
|
|
|
148
|
+
.contrib-column span {
|
|
149
|
+
color: #000 !important;
|
|
150
|
+
}
|
|
151
|
+
|
|
147
152
|
.contrib-column-first {
|
|
148
153
|
border-left: 0 !important;
|
|
149
154
|
}
|
|
@@ -191,6 +196,10 @@
|
|
|
191
196
|
height: 26px !important;
|
|
192
197
|
}
|
|
193
198
|
|
|
199
|
+
.calendar .text-muted {
|
|
200
|
+
color: inherit !important;
|
|
201
|
+
}
|
|
202
|
+
|
|
194
203
|
.left.text-muted {
|
|
195
204
|
float: left !important;
|
|
196
205
|
margin-left: 9px !important;
|