Skip to content

Commit e29b736

Browse files
committed
Update reference template to 2024-02-06a "Kaos"
1 parent a751f51 commit e29b736

14 files changed

+72
-50
lines changed

css/design.less

+3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
img {
3636
float: left;
3737
margin-right: .5em;
38+
height: 64px;
39+
width: auto;
3840
}
3941

4042
span {
@@ -95,6 +97,7 @@
9597
margin-left: 1em;
9698
list-style: none;
9799
display: inline;
100+
vertical-align: top;
98101
}
99102

100103
form.search div.ajax_qsearch li {

css/print.css

+2
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ th {
152152
#dokuwiki__header .logo img {
153153
float: left;
154154
margin-right: .5em;
155+
height: 64px;
156+
width: auto;
155157
}
156158
[dir=rtl] #dokuwiki__header .logo img {
157159
float: right;

detail.php

+20-19
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* DokuWiki Image Detail Page
45
*
@@ -15,56 +16,56 @@
1516
<head>
1617
<meta charset="utf-8" />
1718
<title>
18-
<?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG))?>
19+
<?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG))?>
1920
[<?php echo strip_tags($conf['title'])?>]
2021
</title>
2122
<script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
2223
<?php tpl_metaheaders()?>
2324
<meta name="viewport" content="width=device-width,initial-scale=1" />
24-
<?php echo tpl_favicon(array('favicon', 'mobile')) ?>
25+
<?php echo tpl_favicon(['favicon', 'mobile']) ?>
2526
<?php tpl_includeFile('meta.html') ?>
2627
</head>
2728

2829
<body>
2930
<div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?>">
3031

31-
<?php include('tpl_header.php') ?>
32+
<?php include(__DIR__ . '/tpl_header.php') ?>
3233

3334
<div class="wrapper group" id="dokuwiki__detail">
3435

3536
<!-- ********** CONTENT ********** -->
3637
<main id="dokuwiki__content"><div class="pad group">
3738
<?php html_msgarea() ?>
3839

39-
<?php if(!$ERROR): ?>
40-
<div class="pageId"><span><?php echo hsc(tpl_img_getTag('IPTC.Headline',$IMG)); ?></span></div>
40+
<?php if (!$ERROR) : ?>
41+
<div class="pageId"><span><?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG)); ?></span></div>
4142
<?php endif; ?>
4243

4344
<div class="page group">
4445
<?php tpl_flush() ?>
4546
<?php tpl_includeFile('pageheader.html') ?>
4647
<!-- detail start -->
4748
<?php
48-
if($ERROR):
49-
echo '<h1>'.$ERROR.'</h1>';
50-
else: ?>
51-
<?php if($REV) echo p_locale_xhtml('showrev');?>
49+
if ($ERROR) :
50+
echo '<h1>' . $ERROR . '</h1>';
51+
else : ?>
52+
<?php if ($REV) echo p_locale_xhtml('showrev');?>
5253
<h1><?php echo nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h1>
5354

54-
<?php tpl_img(900,700); /* parameters: maximum width, maximum height (and more) */ ?>
55+
<?php tpl_img(900, 700); /* parameters: maximum width, maximum height (and more) */ ?>
5556

5657
<div class="img_detail">
5758
<?php tpl_img_meta(); ?>
5859
<dl>
5960
<?php
60-
echo '<dt>'.$lang['reference'].':</dt>';
61-
$media_usage = ft_mediause($IMG,true);
62-
if(count($media_usage) > 0){
63-
foreach($media_usage as $path){
64-
echo '<dd>'.html_wikilink($path).'</dd>';
61+
echo '<dt>' . $lang['reference'] . ':</dt>';
62+
$media_usage = ft_mediause($IMG, true);
63+
if ($media_usage !== []) {
64+
foreach ($media_usage as $path) {
65+
echo '<dd>' . html_wikilink($path) . '</dd>';
6566
}
66-
}else{
67-
echo '<dd>'.$lang['nothingfound'].'</dd>';
67+
} else {
68+
echo '<dd>' . $lang['nothingfound'] . '</dd>';
6869
}
6970
?>
7071
</dl>
@@ -86,7 +87,7 @@
8687
<hr class="a11y" />
8788

8889
<!-- PAGE ACTIONS -->
89-
<?php if (!$ERROR): ?>
90+
<?php if (!$ERROR) : ?>
9091
<nav id="dokuwiki__pagetools" aria-labelledby="dokuwiki__pagetools__heading">
9192
<h3 class="a11y" id="dokuwiki__pagetools__heading"><?php echo $lang['page_tools']; ?></h3>
9293
<div class="tools">
@@ -98,7 +99,7 @@
9899
<?php endif; ?>
99100
</div><!-- /wrapper -->
100101

101-
<?php include('tpl_footer.php') ?>
102+
<?php include(__DIR__ . '/tpl_footer.php') ?>
102103
</div></div><!-- /site -->
103104
</body>
104105
</html>

images/pagetools-build.php

+2-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
$GAMMA = 0.8;
1818
$OPTIPNG = '/usr/bin/optipng';
1919

20-
if('cli' != php_sapi_name()) die('please run from commandline');
20+
if('cli' != PHP_SAPI) die('please run from commandline');
2121

2222
// load input images
2323
$input = glob('pagetools/*.png');
@@ -86,11 +86,7 @@ function hex2rgb($hex) {
8686
}
8787

8888
// calc rgb
89-
return array(
90-
'r' => hexdec(substr($hex, 0, 2)),
91-
'g' => hexdec(substr($hex, 2, 2)),
92-
'b' => hexdec(substr($hex, 4, 2))
93-
);
89+
return ['r' => hexdec(substr($hex, 0, 2)), 'g' => hexdec(substr($hex, 2, 2)), 'b' => hexdec(substr($hex, 4, 2))];
9490
}
9591

9692
/**

lang/cs/lang.php

+2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
/**
44
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
55
*
6+
* @author Petr Kajzar <[email protected]>
67
* @author Robert Surý <[email protected]>
78
* @author Jaroslav Lichtblau <[email protected]>
89
*/
10+
$lang['home'] = 'Domů';
911
$lang['__background_site__'] = 'Barva hlavního pozadí (pod kontextovým boxem)';
1012
$lang['__link__'] = 'Hlavní barva odkazů';
1113
$lang['__existing__'] = 'Barva odkazů na existující stránky';

lang/fr/lang.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/**
44
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
55
*
6+
* @author Jérémy Just <[email protected]>
67
* @author Schplurtz le Déboulonné <[email protected]>
78
* @author Nicolas Friedli <[email protected]>
89
*/
@@ -11,8 +12,8 @@
1112
$lang['__link__'] = 'Couleur générale des liens';
1213
$lang['__existing__'] = 'Couleur des liens pour les pages existantes';
1314
$lang['__missing__'] = 'Couleur des liens pour les pages inexistantes';
14-
$lang['__site_width__'] = 'Largeur du site complet (dans une unité de longueur valide : %, px, em,...)';
15-
$lang['__sidebar_width__'] = 'Largeur de la barre latérale, si existante (dans une unité de longueur valide : %, px, em,...)';
15+
$lang['__site_width__'] = 'Largeur du site complet (dans une unité de longueur valide : %, px, em...)';
16+
$lang['__sidebar_width__'] = 'Largeur de la barre latérale, si existante (dans une unité de longueur valide : %, px, em...)';
1617
$lang['__tablet_width__'] = 'En dessous de cette largeur, le site passe en mode tablette.';
1718
$lang['__phone_width__'] = 'En dessous de cette largeur, le site passe en mode smartphone.';
1819
$lang['__theme_color__'] = 'Thème de couleur de l\'application web';

lang/hu/lang.php

+3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
/**
44
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
55
*
6+
* @author Fekete Ádám Zsolt <[email protected]>
67
* @author Marton Sebok <[email protected]>
78
*/
9+
$lang['home'] = 'Kezdőlap';
810
$lang['__background_site__'] = 'Lap színe (a tartalom mögött)';
911
$lang['__link__'] = 'Hivatkozás általános színe';
1012
$lang['__existing__'] = 'Hivatkozása színe létező lapoknál';
@@ -13,3 +15,4 @@
1315
$lang['__sidebar_width__'] = 'Az oldalsáv szélessége (tetszőleges mértékegységgel: %, px, em, ...)';
1416
$lang['__tablet_width__'] = 'Váltás tablet-módra ezen szélesség alatt';
1517
$lang['__phone_width__'] = 'Váltás mobiltelefon-módra ezen szélesség alatt';
18+
$lang['__theme_color__'] = 'Webalkalmazás témaszíne';

lang/pl/lang.php

+2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
/**
44
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
55
*
6+
* @author Marek Adamski <[email protected]>
67
* @author Bartek S <[email protected]>
78
* @author Wojciech Lichota <[email protected]>
89
*/
10+
$lang['home'] = 'Główna';
911
$lang['__background_site__'] = 'Kolor tła za polem zawartości';
1012
$lang['__link__'] = 'Kolor łącza';
1113
$lang['__existing__'] = 'Kolor łącza do istniejącej strony';

lang/pt-br/lang.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
55
*
6-
* @author Gilson Caldeira <gilsoncaldeira@gmail.com>
6+
* @author Daniel Dias Rodrigues <danieldiasr@gmail.com>
77
* @author Frederico Gonçalves Guimarães <[email protected]>
88
*/
99
$lang['home'] = 'Início';

lang/pt/lang.php

+2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
/**
44
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
55
*
6+
* @author Eduardo Mozart de Oliveira <[email protected]>
67
* @author Paulo Ricardo Schopf <[email protected]>
78
*/
9+
$lang['home'] = 'Página Inicial';
810
$lang['__background_site__'] = 'A cor para o fundo (atrás da caixa de conteúdo)';
911
$lang['__link__'] = 'A cor para links gerais';
1012
$lang['__existing__'] = 'A cor para links de páginas existentes';

main.php

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* DokuWiki Default Template 2012
45
*
@@ -11,7 +12,7 @@
1112
if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */
1213

1314
$hasSidebar = page_findnearest($conf['sidebar']);
14-
$showSidebar = $hasSidebar && ($ACT=='show');
15+
$showSidebar = $hasSidebar && ($ACT == 'show');
1516
?><!DOCTYPE html>
1617
<html lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
1718
<head>
@@ -20,22 +21,22 @@
2021
<script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
2122
<?php tpl_metaheaders() ?>
2223
<meta name="viewport" content="width=device-width,initial-scale=1" />
23-
<?php echo tpl_favicon(array('favicon', 'mobile')) ?>
24+
<?php echo tpl_favicon(['favicon', 'mobile']) ?>
2425
<?php tpl_includeFile('meta.html') ?>
2526
</head>
2627

2728
<body>
2829
<div id="dokuwiki__site"><div id="dokuwiki__top" class="site <?php echo tpl_classes(); ?> <?php
2930
echo ($showSidebar) ? 'showSidebar' : ''; ?> <?php echo ($hasSidebar) ? 'hasSidebar' : ''; ?>">
3031

31-
<?php include('tpl_header.php') ?>
32+
<?php include(__DIR__ . '/tpl_header.php') ?>
3233

3334
<div class="wrapper group">
3435

35-
<?php if($showSidebar): ?>
36+
<?php if ($showSidebar) : ?>
3637
<!-- ********** ASIDE ********** -->
3738
<nav id="dokuwiki__aside" aria-label="<?php echo $lang['sidebar']
38-
?>"><div class="pad aside include group">
39+
?>"><div class="pad aside include group">
3940
<h3 class="toggle"><?php echo $lang['sidebar'] ?></h3>
4041
<div class="content"><div class="group">
4142
<?php tpl_flush() ?>
@@ -79,7 +80,7 @@
7980
</nav>
8081
</div><!-- /wrapper -->
8182

82-
<?php include('tpl_footer.php') ?>
83+
<?php include(__DIR__ . '/tpl_footer.php') ?>
8384
</div></div><!-- /site -->
8485

8586
<div class="no"><?php tpl_indexerWebBug() /* provide DokuWiki housekeeping, required in all templates */ ?></div>

mediamanager.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<?php
2+
23
/**
34
* DokuWiki Media Manager Popup
45
*
56
* @author Andreas Gohr <[email protected]>
67
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
78
*/
9+
810
// must be run from within DokuWiki
911
if (!defined('DOKU_INC')) die();
1012

@@ -19,7 +21,7 @@
1921
<script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script>
2022
<?php tpl_metaheaders()?>
2123
<meta name="viewport" content="width=device-width,initial-scale=1" />
22-
<?php echo tpl_favicon(array('favicon', 'mobile')) ?>
24+
<?php echo tpl_favicon(['favicon', 'mobile']) ?>
2325
<?php tpl_includeFile('meta.html') ?>
2426
</head>
2527

tpl_footer.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Template footer, included in the main and detail files
45
*/
@@ -14,7 +15,7 @@
1415
<div class="buttons">
1516
<?php
1617
tpl_license('button', true, false, false); // license button, no wrapper
17-
$target = ($conf['target']['extern']) ? 'target="'.$conf['target']['extern'].'"' : '';
18+
$target = ($conf['target']['extern']) ? 'target="' . $conf['target']['extern'] . '"' : '';
1819
?>
1920
<a href="https://www.dokuwiki.org/donate" title="Donate" <?php echo $target?>><img
2021
src="<?php echo tpl_basedir(); ?>images/button-donate.gif" width="80" height="15" alt="Donate" /></a>

tpl_header.php

+20-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Template header, included in the main and detail files
45
*/
@@ -19,33 +20,38 @@
1920

2021
<h1 class="logo"><?php
2122
// get logo either out of the template images folder or data/media folder
22-
$logoSize = array();
23-
$logo = tpl_getMediaFile(array(':wiki:logo.png', ':logo.png', 'images/logo.png'), false, $logoSize);
23+
$logoSize = [];
24+
$logo = tpl_getMediaFile([
25+
':wiki:logo.svg', ':logo.svg',
26+
':wiki:logo.png', ':logo.png',
27+
'images/logo.svg', 'images/logo.png'
28+
], false, $logoSize);
2429

2530
// display logo and wiki title in a link to the home page
2631
tpl_link(
2732
wl(),
28-
'<img src="'.$logo.'" '.$logoSize[3].' alt="" /> <span>'.$conf['title'].'</span>',
33+
'<img src="' . $logo . '" ' . ($logoSize ? $logoSize[3] : '') . ' alt="" />' .
34+
'<span>' . $conf['title'] . '</span>',
2935
'accesskey="h" title="' . tpl_getLang('home') . ' [h]"'
3036
);
31-
?></h1>
32-
<?php if ($conf['tagline']): ?>
37+
?></h1>
38+
<?php if ($conf['tagline']) : ?>
3339
<p class="claim"><?php echo $conf['tagline']; ?></p>
3440
<?php endif ?>
3541
</div>
3642

3743
<div class="tools group">
3844
<!-- USER TOOLS -->
39-
<?php if ($conf['useacl']): ?>
45+
<?php if ($conf['useacl']) : ?>
4046
<div id="dokuwiki__usertools">
4147
<h3 class="a11y"><?php echo $lang['user_tools']; ?></h3>
4248
<ul>
4349
<?php
44-
if (!empty($_SERVER['REMOTE_USER'])) {
45-
echo '<li class="user">';
46-
tpl_userinfo(); /* 'Logged in as ...' */
47-
echo '</li>';
48-
}
50+
if (!empty($_SERVER['REMOTE_USER'])) {
51+
echo '<li class="user">';
52+
tpl_userinfo(); /* 'Logged in as ...' */
53+
echo '</li>';
54+
}
4955
echo (new \dokuwiki\Menu\UserMenu())->getListItems('action ');
5056
?>
5157
</ul>
@@ -67,12 +73,12 @@
6773
</div>
6874

6975
<!-- BREADCRUMBS -->
70-
<?php if($conf['breadcrumbs'] || $conf['youarehere']): ?>
76+
<?php if ($conf['breadcrumbs'] || $conf['youarehere']) : ?>
7177
<div class="breadcrumbs">
72-
<?php if($conf['youarehere']): ?>
78+
<?php if ($conf['youarehere']) : ?>
7379
<div class="youarehere"><?php tpl_youarehere() ?></div>
7480
<?php endif ?>
75-
<?php if($conf['breadcrumbs']): ?>
81+
<?php if ($conf['breadcrumbs']) : ?>
7682
<div class="trace"><?php tpl_breadcrumbs() ?></div>
7783
<?php endif ?>
7884
</div>

0 commit comments

Comments
 (0)