Skip to content

Commit

Permalink
Merge pull request #3938 from dokuwiki/svglogo
Browse files Browse the repository at this point in the history
support SVG logo in dokuwiki template
  • Loading branch information
splitbrain committed Apr 26, 2023
2 parents efc6165 + 0f9b97d commit e002c05
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/tpl/dokuwiki/css/design.less
Expand Up @@ -35,6 +35,7 @@
img {
float: left;
margin-right: .5em;
height: 64px;
}

span {
Expand Down
84 changes: 84 additions & 0 deletions lib/tpl/dokuwiki/images/dokuwiki.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 8 additions & 3 deletions lib/tpl/dokuwiki/tpl_header.php
Expand Up @@ -19,13 +19,18 @@

<h1 class="logo"><?php
// get logo either out of the template images folder or data/media folder
$logoSize = array();
$logo = tpl_getMediaFile(array(':wiki:logo.png', ':logo.png', 'images/logo.png'), false, $logoSize);
$logoSize = [];
$logo = tpl_getMediaFile([
':wiki:logo.svg', ':logo.svg',
':wiki:logo.png', ':logo.png',
'images/logo.svg', 'images/logo.png'
], false, $logoSize);

// display logo and wiki title in a link to the home page
tpl_link(
wl(),
'<img src="'.$logo.'" '.$logoSize[3].' alt="" /> <span>'.$conf['title'].'</span>',
'<img src="' . $logo . '" ' . ($logoSize ? $logoSize[3] : '') . ' alt="" />' .
'<span>' . $conf['title'] . '</span>',
'accesskey="h" title="' . tpl_getLang('home') . ' [h]"'
);
?></h1>
Expand Down

0 comments on commit e002c05

Please sign in to comment.