Skip to content

Commit

Permalink
Add Apple Touch Icon.
Browse files Browse the repository at this point in the history
Summary: Adds an icon if you add Phabricator as a web app on your iPhone.

Test Plan: Test on simulator and in iOS.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5444
  • Loading branch information
chadlittle committed Mar 25, 2013
1 parent fb38e10 commit ca42d64
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/__celerity_resource_map__.php
Expand Up @@ -14,6 +14,13 @@
'disk' => '/rsrc/image/actions/edit.png',
'type' => 'png',
),
'/rsrc/image/apple-touch-icon.png' =>
array(
'hash' => '3380adf2dd4a5efa0885618bc5943640',
'uri' => '/res/3380adf2/rsrc/image/apple-touch-icon.png',
'disk' => '/rsrc/image/apple-touch-icon.png',
'type' => 'png',
),
'/rsrc/image/avatar.png' =>
array(
'hash' => '1c5f255071537f05406adee86717ff27',
Expand Down
17 changes: 16 additions & 1 deletion src/view/page/PhabricatorBarePageView.php
Expand Up @@ -75,12 +75,27 @@ protected function getHead() {
'maximum-scale=1',
));
}
$icon_tag = phutil_tag(
'link',
array(
'rel' => 'apple-touch-icon',
'href' => celerity_get_resource_uri('/rsrc/image/apple-touch-icon.png')
));

$apple_tag = phutil_tag(
'meta',
array(
'name' => 'apple-mobile-web-app-status-bar-style',
'content' => 'black-translucent'
));

$response = CelerityAPI::getStaticResourceResponse();

return hsprintf(
'%s<script type="text/javascript">%s window.__DEV__=%s;</script>%s',
'%s%s%s<script type="text/javascript">%s window.__DEV__=%s;</script>%s',
$viewport_tag,
$icon_tag,
$apple_tag,
$framebust,
(PhabricatorEnv::getEnvConfig('phabricator.developer-mode') ? '1' : '0'),
$response->renderResourcesOfType('css'));
Expand Down
Binary file added webroot/rsrc/image/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.

0 comments on commit ca42d64

Please sign in to comment.