* fix: prevent crash if undefined color is passed to func fallbackColor
* feat: allow users to pass ring_color param
Before this commit, the ring color was always equal to the title color.
This commit allows the user to pass a ring_color property to allow him
to style the ring color the way he pleases to. If no ring_color is
passed we default to the title color.
* docs: improves ring color documentation
* fix: improve code style
Co-authored-by: rickstaa <rick.staa@outlook.com>
* refactor: use default value for languages
* fix: truncated compact progress bar
* test: add test for truncated compact progress bar with langs_count set
* build: create npm package
This commit makes sure that the common modules of the GRS package can be
imported as an npm package.
* feat: export card render functions
* style: update formatting
* fix: adding doc strings to files in src folder where it was missing
* refactor: add docstrings
* style: run formatter
Co-authored-by: rickstaa <rick.staa@outlook.com>
* fetch all stars
* stop fetching when there are repos with zero stars
* remove not needed parameters from the query
* add docstring
* removed not needed mock
* style: update formatting
Co-authored-by: rickstaa <rick.staa@outlook.com>
* Fix card length during error
Fixes#1774
The size of the box should be 550px to allow 25px padding from both sides
I found the width of the text using `getComputedTextLength()` method
* fix: improve error card size
Co-authored-by: rickstaa <rick.staa@outlook.com>
* GRS-1955: Using ES6 import/export in src files
* GRS-1955: Using ES6 import/export in test files
* GRS-1955: Using ES6 import/export in themes index.js
* GRS-1955: Readding blank line at end of top-languages-card.js
* feat: fix test es6 import errors
This commit makes sure jest is set-up to support es6. It also fixes
several test errors and sorts the imports.
* test: update test node version
This commit makes sure node 16 is used in the github actions.
* refactor: run prettier
Co-authored-by: rickstaa <rick.staa@outlook.com>
* Change default stats card width with hide rank
* Add tests for stats card with card_width
* Add card_width Stats Card description to readme
* fix: add icon width to stats-card min width calculation
* fix: fixes rank circle padding problem
This commit fixes a padding problem that was introduced in
f9c0e0bff64f325235ccbf936c9d5f7a918ac790. In the new code, the padding
around the rank circle will be 50 when the stats card is bigger than
450. When it is smaller than 450 the left and right padding will shrink
equally.
* style: run prettier
* tests: add extra stats 'card_width' tests
This commit makes sure we also test the stats card width for the case that the 'show_icons'
option is enabled.
* style: run prettier
Co-authored-by: rickstaa <rick.staa@outlook.com>
* totalCommits: don't return NaN
* rank: B+ should cover everyone
Empty profile used to show "undefined" as the rank. Now empty profile shows "A+"... is B+ possible?
* Add min width to languages card
* Add test for min width languages card
* feat: increase lang card min width
Co-authored-by: Rick Staa <rick.staa@outlook.com>
* chore: replace `git.io` links
* Update src/common/utils.js
Co-authored-by: Rick Staa <rick.staa@outlook.com>
Co-authored-by: Rick Staa <rick.staa@outlook.com>