Adds apple-touch-icon to /bus-arrival/ #29
Default busrouter.sg apple-touch-icon added to /bus-arrival/, inserted
On /bus-arrival/, when a bus is pinned, the default apple-touch-icon is
Here's a screenshot of the generated apple-touch-icon ("Clementi")
I've also uploaded a screen recording of the result
The text was updated successfully, but these errors were encountered:
…web-app-title - "apple-touch-icon-precomposed" is now "apple-touch-icon" - apple-touch-icon links to a png instead of inlining base64 - Added apple-mobile-web-app-title that contains the current bus stop's name
Thanks for the quick reply!
Sure! I used to save the stop names based on intent (e.g. 196 "Home » Clementi"), though displaying the stop name might be semantically better, so I implemented it as such.
Static image (can!) or dynamic content generated from text (trickier, still can..)? Will first listen to and understand your thoughts before implementing.
The last "starred" service code will be the one that's used as the icon
Hey @jglim sorry for the late reply.
After some thinking, here are my thoughts:
There can be a lot of permutations for this but let's keep it simple for now
On rendering, apple-touch-icon is replaced with the bus stop code busNumber -> iconText (semantics only) Icon color changed to match existing busrouter's style - from green (bus numbers) to red (bus stops). Icon text size is reduced to half of previous, since bus stop codes are universally 5 characters wide
…-arrival/ Replaced querySelectorAll to querySelector for queries returning one element in arrival.js and setIcon.js (total of 2 instances) Shifted non-critical meta tags below link tags in bus-arrival/index.html Changed strings to match existing style (single quotes)