Skip to content

Commit

Permalink
update readme with contributing information for theming
Browse files Browse the repository at this point in the history
  • Loading branch information
agonyz committed Jul 15, 2023
1 parent 6c5043e commit ff51727
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- [By vendor](#by-vendor)
- [By maintainer](#by-maintainer)
- [Themes](#themes)
- [Add own themes](#add-own-themes)
- [Caching](#caching)

## Top bundles
Expand Down Expand Up @@ -56,5 +57,24 @@ You can use different themes for the cards
```
![Packagist Top Bundles](https://github-readme-packagist-stats.vercel.app/api/packagist/card?vendor=agonyz&theme=dark)

### Add own themes
If you want to add your own themes, you can do it like this
- Navigate to the theme directory `src/themes/`
- Create a theme file e.g. `dark.ts`
- Place your styles inside the theme file and export them
```ts
export const darkTheme = `
#rect {
rx: 7;
...
}
#name {
font-family: "Ubuntu", "Helvetica", sans-serif;
...
`
```
- Add a switch case in the ThemeService `src/services/theme.service.ts`
- Create a pull request e.g. `feature/add-theme-{theme-name}`

## Caching
- In order to not overuse the packagist api a cache time of `12 hours` was implemented.

0 comments on commit ff51727

Please sign in to comment.