Manual:$wgAppleTouchIcon

From mediawiki.org
This page is a translated version of the page Manual:$wgAppleTouchIcon and the translation is 38% complete.
Outdated translations are marked like this.
URLs de servidor e caminhos de arquivo: $wgAppleTouchIcon
URL opcional para um ícone a ser usado quando marcando na tela inicial em dispositivos portáteis da Apple
Introduzido na versão:1.12.0 (r29942)
Removido na versão:ainda em uso
Valores permitidos:(URL absoluta ou relativa)
Valor padrão:false

Detalhes

Os dispositivos iPhone, iPod Touch e iPad da Apple têm a capacidade de exibir um ícone quando você salva um marcador na tela inicial do Safari. Isso é um pouco semelhante a um favicon, mas com tamanhos maiores (57x57, 72x72, 114x114 e 144x144 pixels, dependendo do dispositivo).

Guia de Conteúdo Safari Web recomenda colocar um arquivo chamado "apple-touch-icon.png" no diretório raiz do documento do seu site; use "apple-touch-icon-precomposed.png" para evitar os cantos arredondados criados pelo iOS e o efeito de brilho brilhante para o seu ícone. No entanto, se por algum motivo você quiser usar um ícone de conjunto personalizado, você pode usar o seguinte formato:

$wgAppleTouchIcon = "/wiki/icons/apple-touch-icon.png";

Isso produz uma marca <link> na saída do cabeçalho HTML:

<link rel="apple-touch-icon" href="/wiki/icons/apple-touch-icon.png" />

As $wgAppleTouchIcon is set to false by default, MediaWiki will not generate the link, and the browser will attempt to load "/apple-touch-icon.png". If this doesn't exist either, a thumbnail of the page is used which is not very attractive.

Using the override option, wikis may set a different icon from other pages on the same host, or may simply choose to set a custom URL.

For Android devices place "apple-touch-icon-precomposed.png" in your root directory, and include $wgAppleTouchIcon = "$wgScriptPath/apple-touch-icon-precomposed.png"; in LocalSettings.php.

Diretrizes

An iPhone home screen including some custom site icons.

As imagens limpas com boa nitidez e contraste e um fundo colorido brilhante cabem razoavelmente bem com outros ícones. If you don't have one to test with, refer to handy screen shots such as the one here.

Apple documentation recommends a 114×114 pixel PNG image; however, 118×120 seems to be the mark for retina displays. A smaller image is scaled up slightly, becoming a bit blurry. Wikimedia projects currently (May 2021) use 152×152 pixel.

Rounded corners and a "glossy" texture are added by the iPhone UI, so use a flat, square background in your source image:

Original image: As rendered:

Transparent backgrounds are rendered as solid black.


See also