Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added settings and images for display on iOS devices

* Adds support for app "capability"
* Removes Safari chrome, uses the black mini-status bar
* Adds the icon for Home screen

See: http://developer.apple.com/library/ios/#DOCUMENTATION/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html

-----

Note: The "apple-touch-icon" is dynamically replaced with Base64-encoded data URI,
      so we circumvent any HTTP Auth related issues

See: http://www.technetra.com/2008/12/23/how-to-deploy-an-iphone-web-application/

Ruby:

    $ ruby -e 'print %{data:image/png;base64,#{[ARGF.read].pack("m").gsub("\n","")}\n}' img/apple-touch-icon.png > img/apple-touch-icon.png.b64
  • Loading branch information...
commit bcc5cbeafd11d1e946ae2228cffa0f393fb462be 1 parent ee7d4f9
@karmi authored
View
BIN  img/apple-touch-icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
3  index.html
@@ -2,6 +2,9 @@
<html>
<head>
<title>Paramedic</title>
+ <meta name="apple-mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-status-bar-style" content="black">
+ <link rel="apple-touch-icon" href="img/apple-touch-icon.png">
<link rel="stylesheet" href="css/libs/style.css">
<link rel="stylesheet" href="css/libs/cubism.css">
<link rel="stylesheet" href="css/app.css">
View
9 js/app.js
@@ -5,6 +5,7 @@ var App = Em.Application.create({
ready: function() {
l(App.name + ' (re)loaded.')
+ App.__initialize_page()
App.__perform_refresh()
App.__initialize_cubism()
return this._super()
@@ -36,6 +37,10 @@ var App = Em.Application.create({
__initialize_cubism: function() {
App.Cubism.setup()
+ },
+
+ __initialize_page: function() {
+ $("link[rel=apple-touch-icon]").attr("href", App.apple_touch_icon_b64)
}
});
@@ -439,3 +444,7 @@ App.nodes.addObserver('@each.name', function() {
Ember.Logger.log("Nodes changed to: " + App.nodes.mapProperty("name").join("; "))
App.Cubism.reset()
});
+
+// ===== Varia ==================================================================================
+
+App.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r3lKX1bwmTfy/OISXOwyMBAWJqtAuoySKJhXmHfZkYIS88kCppGWIxnzs3gIUsQt4aF1j3Tvml2wwmzbD4WY2E5A2H1xs7D4dDsi5G+VzpjmeaHd5bzPHcXq/X7/ePj4/V6TX9bIa7H87hoXObhZYVZK36cFxCno4KGHb4g6u4pvBpmb4R9rGEefKdYCLPvMe4jl0ipS2kGW9rt5lBSU1pNTyF2plS3hZL8ddqWOBZQWrSGEjhrvVWKuYgalLp0lhb+PIRRvOrlcpmyerWYNg7ZTKJ2GVutVk1VMsilPa5CqeH0R1iLUM1qcOA3ChDl4nqlCRthlEyPOlLfJBefLhFXtzs2wohd6lXTCvsudCEoFqQgssVlD1uVumpTFl5KP/t9K6poRnTS6XQCb45Z9mrP8xyfK52kMjga64MwwL7lC1yp8XgcDk+Pj4+WUb/qSMr1PMwbmJRjmamBd0yYCYN+SC/ZL74G79ZP28WEktLS0hiymxwnNR2j0Ujaa6t3fbD/rBPC4PUl3sBe+2aWsAgrOUv2hW+O2Go5relQr/VAsDWfzxPpJaC6qDntiua8CAdPDx9ksVjQX44UI7y18M/8CKO6OIMzs2btIUP17/dm/L2WuZV9wLbbbV4gxs4rqgHoWQH/AQxzasoMHx8fZWVVaEnF/dc9drvd2o8IB0GYoH63XiCECYQwIUwghAmEMCFMIIQJhDAhTCCECYQwIUxQI/4JMABsmpGrX6NFBgAAAABJRU5ErkJggg==";
Please sign in to comment.
Something went wrong with that request. Please try again.