You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CONTRIBUTING.md
+33-3
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
If you are contributing to the Open Source for the first time, You can checkout[First Time Contributors Guide](#first-time-contributors-guide)
1
+
If you are contributing to the Open Source for the first time, You can check out[First Time Contributors Guide](#first-time-contributors-guide)
2
2
3
3
# Local Setup
4
4
-[Fork](https://github.com/saurabhdaware/DEV-widget/fork) the repository
@@ -18,7 +18,7 @@ The code is based upon web components and does not use any dependency. You can r
18
18
```
19
19
20
20
# Sending Pull Request
21
-
- Create a branch in your forked repository with relevant name (`e.g enhanced-styling`, `feature-autoreload`)
21
+
- Create a branch in your forked repository with a relevant name (`e.g enhanced-styling`, `feature-autoreload`)
22
22
- Push your changes to the branch
23
23
- Create a pull request from your branch to `master` of my branch.
24
24
@@ -31,4 +31,34 @@ The code is based upon web components and does not use any dependency. You can r
31
31
- You can checkout the [Issues](https://github.com/saurabhdaware/DEV-widget/issues) and select the one that you like (You can comment on issue with something like *"Let me work on this or I'll kill you"* to let me know that you are working on it.)
32
32
- There are issues with label `Difficulty: Easy` and `Difficulty: Super Easy` which are easier to solve as compare to the other issues. Though if you know JavaScript well you can solve `Difficulty: Medium` and `Difficulty: Hard` issues as well.
33
33
- Just go through the [Local Setup Guide](#local-setup) to locally setup the project
34
-
- Once you are done making changes you can create a Pull Request to the master of this (https://github.com/saurabhdaware/DEV-widget) repository.
34
+
- Once you are done making changes you can create a Pull Request to the master of this (https://github.com/saurabhdaware/DEV-widget) repository.
35
+
36
+
37
+
# Other Guides
38
+
39
+
## - Creating Themes
40
+
41
+
Before you work on a code please create an issue and mention the colors that you want to add and wait for the response. Since adding themes increase the size of the code, only few themes will be chosen for the final version.
42
+
43
+
Here's an example from `card.style.mjs`:
44
+
```css
45
+
.card.pink{
46
+
--header-bg:#ffc0cb;
47
+
--header-color:#222;
48
+
--header-logo-filter: invert(0%);
49
+
--content-bg: #fff;
50
+
--content-bghover: #ffc0cb44;
51
+
--content-border: #ffc0cb66;
52
+
--content-color: #555;
53
+
--button-bg: #222;
54
+
--button-color: #ddd;
55
+
--scroll-track: #ffc0cb;
56
+
--scroll-thumb: #999;
57
+
--likes-color: #999;
58
+
--likes-icon-filter: invert(0%);
59
+
}
60
+
```
61
+
62
+
To create a theme named "yellow", You will have to create a css block for `.card.yellow` and set the variable names as given in the above example.
63
+
64
+
With these settings adding `data-theme="yellow"` in the file will apply your colors to the card.
| data-theme |**Theme of the card** (dark, ocean, pink, default) | default |
50
51
| data-name (optional) | Name to display on card | Will be fetched from API |
51
52
| data-limit | Number of articles to display | 30 |
52
53
53
54
**Note:** Value of `data-limit` should not be too high. An API request has to be made for every 30 articles so for `data-limit=200` 7 API requests will be made synchronously.
0 commit comments