1ca90ebc1SJana Deutschländer<?php 2*06cdf148SAndreas Gohr/** 3*06cdf148SAndreas Gohr * Embed the various bookmarking icon sizes 4*06cdf148SAndreas Gohr * 5*06cdf148SAndreas Gohr * Basically it will first check for an exact image in the right size in the wiki namespace, then for generally named 6*06cdf148SAndreas Gohr * logos in the wiki namespace and finally it falls back to the logo configured in the template. 7*06cdf148SAndreas Gohr * 8*06cdf148SAndreas Gohr * 9*06cdf148SAndreas Gohr * @author Andreas Gohr <gohr@cosmocode.de> 10*06cdf148SAndreas Gohr */ 11*06cdf148SAndreas Gohruse dokuwiki\template\sprintdoc\Template; 12*06cdf148SAndreas Gohr 13ca90ebc1SJana Deutschländerif(!defined('DOKU_INC')) die(); 14ca90ebc1SJana Deutschländer 15*06cdf148SAndreas Gohr// standard favicon 16*06cdf148SAndreas Gohrecho Template::getResizedImgTag( 17*06cdf148SAndreas Gohr 'link', 18*06cdf148SAndreas Gohr array( 19*06cdf148SAndreas Gohr 'rel' => 'shortcut icon', 20*06cdf148SAndreas Gohr 'href' => array('wiki:favicon.ico', 'wiki:favicon.png', tpl_getConf('logo')) 21*06cdf148SAndreas Gohr ), 22*06cdf148SAndreas Gohr 0, 0 // no scaling 23*06cdf148SAndreas Gohr); 24ca90ebc1SJana Deutschländer 25*06cdf148SAndreas Gohr// square apple icons 26*06cdf148SAndreas Gohrforeach(array(57, 60, 72, 76, 114, 120, 144, 152, 180) as $size) { 27*06cdf148SAndreas Gohr echo Template::getResizedImgTag( 28*06cdf148SAndreas Gohr 'link', 29*06cdf148SAndreas Gohr array( 30*06cdf148SAndreas Gohr 'rel' => 'apple-touch-icon', 31*06cdf148SAndreas Gohr 'sizes' => $size . 'x' . $size, 32*06cdf148SAndreas Gohr 'href' => array('wiki:logo-' . $size . 'x' . $size . '.png', 'wiki:logo-square.png', 'wiki:logo.png', tpl_getConf('logo')) 33*06cdf148SAndreas Gohr ), 34*06cdf148SAndreas Gohr $size, $size 35*06cdf148SAndreas Gohr ); 36*06cdf148SAndreas Gohr} 37ca90ebc1SJana Deutschländer 38*06cdf148SAndreas Gohr// square favicons 39*06cdf148SAndreas Gohrforeach(array(32, 96, 192) as $size) { 40*06cdf148SAndreas Gohr echo Template::getResizedImgTag( 41*06cdf148SAndreas Gohr 'link', 42*06cdf148SAndreas Gohr array( 43*06cdf148SAndreas Gohr 'rel' => 'icon', 44*06cdf148SAndreas Gohr 'sizes' => $size . 'x' . $size, 45*06cdf148SAndreas Gohr 'href' => array('wiki:logo-' . $size . 'x' . $size . '.png', 'wiki:logo-square.png', 'wiki:logo.png', tpl_getConf('logo')) 46*06cdf148SAndreas Gohr ), 47*06cdf148SAndreas Gohr $size, $size 48*06cdf148SAndreas Gohr ); 49*06cdf148SAndreas Gohr} 50ca90ebc1SJana Deutschländer 51*06cdf148SAndreas Gohr// square microsoft icons 52*06cdf148SAndreas Gohrforeach(array(70, 310) as $size) { 53*06cdf148SAndreas Gohr echo Template::getResizedImgTag( 54*06cdf148SAndreas Gohr 'meta', 55*06cdf148SAndreas Gohr array( 56*06cdf148SAndreas Gohr 'name' => 'msapplication-square' . $size . 'x' . $size . 'logo', 57*06cdf148SAndreas Gohr 'content' => array('wiki:logo-' . $size . 'x' . $size . '.png', 'wiki:logo-square.png', 'wiki:logo.png', tpl_getConf('logo')) 58*06cdf148SAndreas Gohr ), 59*06cdf148SAndreas Gohr $size, $size 60*06cdf148SAndreas Gohr ); 61*06cdf148SAndreas Gohr} 62*06cdf148SAndreas Gohr 63*06cdf148SAndreas Gohr// wide micorsoft icons 64*06cdf148SAndreas Gohrforeach(array(array(310, 150)) as $size) { 65*06cdf148SAndreas Gohr echo Template::getResizedImgTag( 66*06cdf148SAndreas Gohr 'meta', 67*06cdf148SAndreas Gohr array( 68*06cdf148SAndreas Gohr 'name' => 'msapplication-wide' . $size[0] . 'x' . $size[1] . 'logo', 69*06cdf148SAndreas Gohr 'content' => array('wiki:logo-' . $size[0] . 'x' . $size[1] . '.png', 'wiki:logo-wide.png', 'wiki:logo.png', tpl_getConf('logo')) 70*06cdf148SAndreas Gohr ), 71*06cdf148SAndreas Gohr $size[0], $size[1] 72*06cdf148SAndreas Gohr ); 73*06cdf148SAndreas Gohr} 74