Browse Source

Fix svg size

pull/1/merge
Shadowfacts 5 years ago
parent
commit
596c69a9c7
Signed by: shadowfacts GPG Key ID: 94A5AB95422746E5
  1. 2
      README.md
  2. BIN
      github-activity.widget.zip
  3. 2
      src/generate.js

2
README.md

@ -49,5 +49,5 @@ Installation:
## Other Notes
- The shell script (`run.sh`) is used to find the location of Node and run the script. Currently, the script only special cases for Node installed via Homebrew and falls back on running node through the shell's normal behavior. The environment the shells script is executed in does not have `.bash_profile`/`.bashrc`/`.zshrc`/anything else loaded. If you have node installed in an unusual location, open an issue and, if it's common enough, I'll add another special case.
- You'll need to change the `size`, `incrAmount`, and possibly `margin` values in the options to fit your screen size. The defaults are sized for the largest that can fit on a 1440p screen. A rule of thumb for size/margin is `screenWidth / 54 >= size + margin`
- You'll need to change the `size`, `incrAmount`, and possibly `margin` values in the options to fit your screen size. The defaults are sized for the largest that can fit on a 1440p screen. A rule of thumb for size/margin is `screenWidth / 53 >= size + margin`
- You may need to modify the values used by the `else if` conditions in the `getColorsForPalette` function, depending on your GitHub contributions. GitHub determines which color "level" to use dynamically, based on your average contributions but this widget does not.

BIN
github-activity.widget.zip

Binary file not shown.

2
src/generate.js

@ -40,7 +40,7 @@ axios.get(`https://github.com/${options.user}`)
.catch(console.error);
function generate(res) {
console.log(`<svg id="github-activity" width="${54 * options.size}" height="${7 * (options.size)}">`);
console.log(`<svg id="github-activity" width="${53 * options.size}" height="${7 * (options.size)}">`);
const $ = cheerio.load(res.data);

Loading…
Cancel
Save