Skip to content

Commit

Permalink
Standardise all icons; update screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
m-roberts committed Feb 3, 2020
1 parent 5d0a8d4 commit 8b4cef0
Show file tree
Hide file tree
Showing 23 changed files with 51 additions and 1 deletion.
1 change: 1 addition & 0 deletions MMM-Fitbit2.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
.MMM-Fitbit2 .widgettext {
height: 60px;
padding: 0 0 5px 0;
text-align: center;
}

.MMM-Fitbit2 .widgeticon {
Expand Down
2 changes: 1 addition & 1 deletion MMM-Fitbit2.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Module.register("MMM-Fitbit2", {

// Generate div for icon
iconDiv: function(resource) {
const iconPath = "/img/" + resource + "White.png";
const iconPath = "/img/" + resource + ".png";

var iconDiv = document.createElement("img");
iconDiv.className = "widgeticon";
Expand Down
22 changes: 22 additions & 0 deletions img/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# All images are taken from [The Noun Project](https://thenounproject.com/).


[activeMinutes.png](activeMinutes.png): [Lightning by Eagle Eye from the Noun Project](https://thenounproject.com/term/lightning/1830708/)

[caloriesOut.png](caloriesOut.png): [Fire by Aisyah from the Noun Project](https://thenounproject.com/term/fire/1519955/)

[caloriesIn.png](caloriesIn.png): [cutlery by Vectors Market from the Noun Project](https://thenounproject.com/term/cutlery/263101/)

[distance.png](distance.png): [Location by Iconnic from the Noun Project](https://thenounproject.com/term/location/3089867/)

[floors.png](floors.png): [steps by Marco Livolsi from the Noun Project](https://thenounproject.com/term/steps/1272371/)

[restingHeart.png](restingHeart.png): [Heart by Muhajir ila Robbi from the Noun Project](https://thenounproject.com/term/heart/2276652/)

[steps.png](steps.png): [footprints by Eugen Belyakoff from the Noun Project](https://thenounproject.com/term/footprints/38542/)

[sleep.png](sleep.png): [Moon by Pedro Vidal from the Noun Project](https://thenounproject.com/term/moon/1028/)

[water.png](water.png): [Water Bottle by Vectors Market from the Noun Project](https://thenounproject.com/term/water-bottle/2170588/)

[weight.png](weight.png): [Scale by Bakunetsu Kaito from the Noun Project](https://thenounproject.com/term/scale/990543/)
Binary file modified img/activeMinutes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/activeMinutesWhite.png
Binary file not shown.
Binary file added img/caloriesIn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/caloriesOut.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/caloriesOutWhite.png
Binary file not shown.
Binary file modified img/distance.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/distanceWhite.png
Binary file not shown.
Binary file modified img/floors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/floorsWhite.png
Binary file not shown.
Binary file modified img/restingHeart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/restingHeartWhite.png
Binary file not shown.
27 changes: 27 additions & 0 deletions img/scripts/formatTNP.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# Take "The Noun Project" icons, make them square, white and transparent

for f in *.png; do
echo "${f}"

# Crop bottom of image
convert -crop -0-85 "${f}" "${f}"

# Remove surrounding whitespace
convert -trim "${f}" "${f}"

width=$(identify -format "%w" "${f}")
height=$(identify -format "%h" "${f}")

max=$(( width > height ? width : height ))

# Make square; side-effect: white background
mogrify -gravity center -extent "${max}x${max}" "${f}"

# Remove white background
convert "${f}" -fuzz 2% -transparent white "${f}"

# Invert to white
convert "${f}" -channel RGB -negate "${f}"
done
Binary file modified img/sleep.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/sleepWhite.png
Binary file not shown.
Binary file modified img/steps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/stepsWhite.png
Binary file not shown.
Binary file added img/water.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/weight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/weightWhite.png
Binary file not shown.
Binary file modified screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8b4cef0

Please sign in to comment.