- Only change is formatting on 'myTile.'
I tried to balance making it looking good (which takes a lot of html CSS formatting) with minimizing the character length to keep under to 1,024 dashboard tile character limitation. One change I made was to copy and then re-named the two Dark Sky logo icons to reduce the characters (every character counts!). If you host your own icon repository copy the two new icon files to your repository. If you use the default icon respository (tinyurl) they are already there so no action is required.
- poweredby-oneline.png --> dsD.png ('D'ark text)
- poweredby-oneline-darkbackground.png --> dsL.png ('L'ight text)
Every icon must have the full path to that image in the myTile text. The default display shows eight icons, so the length of the path is important. If you are not using the tinyurl for the default icon repository, consider creating your own tinyurl for your repository (they are free).
Finally, the myTile character string is built as follows:
The text string is constructed including all icons and html CSS styling from the top down to just before the Dark Sky attribution on the last line. A calculation is then made for the Dark Sky attribution as follows:
On the DarkSky attribution logo/link:
-> full logo image/hyperlink is used, if size will permit (under 1,024 characters),
--> else, a plain text hyperlink is used, if size will permit,
---> else plain text (no hyperlink) is used.
At this point if the myTile character string is still greater then 1,024 characters it will calculate how many icons it needs to discard and then remove those. Those icons are replaced with text titles (e.g. 'Hum: ' for 'Humidity'), if neccessary. It will only remove as many cons as may be required to get under the 1,024 character limit. Icons are removed from the bottom to the top (e.g. 'Sunset' is the first to go, then 'Sunrise' etc...)
If all icon have been removed and the myTile string is still greater than 1.024 characters, all html CSS formatting is removed.
If the myTile string is still greater than 1,024 characters then string is truncated to 1,024 characters.