Merge branch 'favicons' into details
* favicons: fix alt pre/postfixes for logo output newline after logo images
This commit is contained in:
commit
3d943758e5
1 changed files with 15 additions and 7 deletions
22
Template.php
22
Template.php
|
@ -116,7 +116,7 @@ class Template {
|
||||||
$attributes[$attr] = $media;
|
$attributes[$attr] = $media;
|
||||||
|
|
||||||
// return the full tag
|
// return the full tag
|
||||||
return '<' . $tag . ' ' . buildAttributes($attributes) . ' />';
|
return '<' . $tag . ' ' . buildAttributes($attributes) . ' />' . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -127,12 +127,20 @@ class Template {
|
||||||
public function mainLogo() {
|
public function mainLogo() {
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
// homepage logo should not link to itself (BITV accessibility requirement)
|
||||||
|
$linkit = (strcmp(wl(), $_SERVER['REQUEST_URI']) !== 0);
|
||||||
|
if($linkit) {
|
||||||
|
$title = $conf['title'] . tpl_getLang('adjunct_linked_logo_text');
|
||||||
|
} else {
|
||||||
|
$title = tpl_getLang('adjunct_start_logo_text') . $conf['title'];
|
||||||
|
}
|
||||||
|
|
||||||
$desktop = self::getResizedImgTag(
|
$desktop = self::getResizedImgTag(
|
||||||
'img',
|
'img',
|
||||||
array(
|
array(
|
||||||
'class' => 'mobile-hide',
|
'class' => 'mobile-hide',
|
||||||
'src' => array(tpl_getConf('logo'), 'wiki:logo-wide.png', 'wiki:logo.png'),
|
'src' => array(tpl_getConf('logo'), 'wiki:logo-wide.png', 'wiki:logo.png'),
|
||||||
'alt' => tpl_getLang('adjunct_start_logo_text') . $conf['title'],
|
'alt' => $title,
|
||||||
),
|
),
|
||||||
0, 0
|
0, 0
|
||||||
);
|
);
|
||||||
|
@ -141,18 +149,18 @@ class Template {
|
||||||
array(
|
array(
|
||||||
'class' => 'mobile-only',
|
'class' => 'mobile-only',
|
||||||
'src' => array('wiki:logo-32x32.png', 'wiki:favicon.png', 'wiki:logo-square.png', 'wiki:logo.png', tpl_getConf('logo')),
|
'src' => array('wiki:logo-32x32.png', 'wiki:favicon.png', 'wiki:logo-square.png', 'wiki:logo.png', tpl_getConf('logo')),
|
||||||
'alt' => tpl_getLang('adjunct_start_logo_text') . $conf['title'],
|
'alt' => $title,
|
||||||
),
|
),
|
||||||
32, 32
|
32, 32
|
||||||
);
|
);
|
||||||
|
|
||||||
// homepage logo should not link to itself (BITV accessibility requirement)
|
// homepage logo should not link to itself (BITV accessibility requirement)
|
||||||
if(strcmp(wl(), $_SERVER['REQUEST_URI']) === 0) {
|
if($linkit) {
|
||||||
echo $desktop;
|
|
||||||
echo $mobile;
|
|
||||||
} else {
|
|
||||||
tpl_link(wl(), $desktop, 'accesskey="h" title="[H]"');
|
tpl_link(wl(), $desktop, 'accesskey="h" title="[H]"');
|
||||||
tpl_link(wl(), $mobile, 'accesskey="h" title="[H]"');
|
tpl_link(wl(), $mobile, 'accesskey="h" title="[H]"');
|
||||||
|
} else {
|
||||||
|
echo $desktop;
|
||||||
|
echo $mobile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue