1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-28 16:30:59 +01:00

Add Apple Touch Icon.

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
This commit is contained in:
Chad Little 2013-03-25 11:24:17 -07:00
parent fb38e1049d
commit ca42d64c82
3 changed files with 23 additions and 1 deletions

View file

@ -14,6 +14,13 @@ celerity_register_resource_map(array(
'disk' => '/rsrc/image/actions/edit.png', 'disk' => '/rsrc/image/actions/edit.png',
'type' => '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' => '/rsrc/image/avatar.png' =>
array( array(
'hash' => '1c5f255071537f05406adee86717ff27', 'hash' => '1c5f255071537f05406adee86717ff27',

View file

@ -75,12 +75,27 @@ class PhabricatorBarePageView extends AphrontPageView {
'maximum-scale=1', '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(); $response = CelerityAPI::getStaticResourceResponse();
return hsprintf( 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, $viewport_tag,
$icon_tag,
$apple_tag,
$framebust, $framebust,
(PhabricatorEnv::getEnvConfig('phabricator.developer-mode') ? '1' : '0'), (PhabricatorEnv::getEnvConfig('phabricator.developer-mode') ? '1' : '0'),
$response->renderResourcesOfType('css')); $response->renderResourcesOfType('css'));

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB