Merge branch 'sidebar' into live
* sidebar: fix problems with ini handling in svg dispatch added profile link to usertools in sidebar finally align the menu items correctly some more list adjustments for sidebar add level1 class to fake inpage lists adjusted language some style adjustments for the sidebar complete refactor of the sidebar behaviour javascript RES-754 style the fake icon use jQuery slector to define the elements directly embed SVGs for better styling very simple styling of the new sidebar behaviour. New sidebar JavaScript logic allow style.ini replacements in SVG dispatcher SVG Dispatch: allow for referencing material design icons add caching and fix <g> wrapping fixed content type header fixed auth check feat: add background-colors to SVG-dispatcher first go at a dispatcher to dynamically recolor SVGs
This commit is contained in:
commit
248d08817b
20 changed files with 729 additions and 897 deletions
74
tpl/main-sidebar-nav.php
Normal file
74
tpl/main-sidebar-nav.php
Normal file
|
@ -0,0 +1,74 @@
|
|||
<nav class="nav-main">
|
||||
<?php /* main navigation, loaded from sidebar, fixed up by javascript */
|
||||
tpl_include_page($conf['sidebar'], 1, 1);
|
||||
?>
|
||||
</nav>
|
||||
|
||||
|
||||
<nav class="nav-sitetools">
|
||||
<h6 role="heading" aria-level="2">
|
||||
<span class="ico"><?php echo inlineSVG(__DIR__ . '/../img/sitemap.svg') ?></span>
|
||||
<span class="lbl"><?php echo $lang['site_tools']; ?></span>
|
||||
</h6>
|
||||
<div class="nav-panel level1">
|
||||
<ul>
|
||||
<?php
|
||||
tpl_toolsevent(
|
||||
'sitetools',
|
||||
array(
|
||||
'recent' => tpl_action('recent', 1, 'li', 1),
|
||||
'media' => tpl_action('media', 1, 'li', 1),
|
||||
'index' => tpl_action('index', 1, 'li', 1),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
<nav class="nav-usermenu">
|
||||
<h6 role="heading" aria-level="2">
|
||||
<span class="ico"><?php echo inlineSVG(__DIR__ . '/../img/account-settings.svg') ?></span>
|
||||
<span class="lbl"><?php echo $lang['user_tools']; ?></span>
|
||||
</h6>
|
||||
<div class="nav-panel level1">
|
||||
<ul>
|
||||
<?php /* dokuwiki user tools */
|
||||
tpl_toolsevent(
|
||||
'usertools',
|
||||
array(
|
||||
'login' => tpl_action('login', 1, 'li', 1),
|
||||
'profile' => tpl_action('profile', 1, 'li', 1),
|
||||
'admin' => tpl_action('admin', 1, 'li', 1),
|
||||
'register' => tpl_action('register', 1, 'li', 1),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
<?php if($conf['breadcrumbs']): ?>
|
||||
<nav class="nav-trace">
|
||||
<h6 role="heading" aria-level="2">
|
||||
<span class="ico"><?php echo inlineSVG(__DIR__ . '/../img/apple-safari.svg') ?></span>
|
||||
<span class="lbl"><?php echo tpl_getLang('head_menu_trace'); ?></span>
|
||||
</h6>
|
||||
<div class="nav-panel level1">
|
||||
<ul>
|
||||
<?php /* trace breadcrumbs as list */
|
||||
// FIXME move to helper class
|
||||
$crumbs = breadcrumbs();
|
||||
$crumbs = array_reverse($crumbs, true);
|
||||
foreach($crumbs as $id => $name) {
|
||||
echo '<li>';
|
||||
tpl_link(wl($id), hsc($name), 'title="' . $id . '"');
|
||||
echo '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<?php endif ?>
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
if (!defined('DOKU_INC')) die();
|
||||
if ($showSidebar):
|
||||
|
||||
echo "<nav class=\"nav-main\">";
|
||||
echo "<h6 class=\"sr-only\" role=\"heading\" aria-level=\"2\">".tpl_getLang('head_menu_main')."</h6>";
|
||||
echo PHP_EOL;
|
||||
tpl_include_page($conf['sidebar'], 1, 1);
|
||||
echo PHP_EOL;
|
||||
echo "</nav>";
|
||||
|
||||
endif ?>
|
|
@ -1,14 +0,0 @@
|
|||
<?php
|
||||
if (!defined('DOKU_INC')) die();
|
||||
|
||||
if ($showSidebar): ?>
|
||||
|
||||
<nav id="dokuwiki__sitetools" class="nav-sitetools">
|
||||
<h6 class="sr-only" role="heading" aria-level="2"><?php echo $lang['site_tools']; ?></h6>
|
||||
<ul><?php tpl_toolsevent('sitetools', array(
|
||||
'recent' => tpl_action('recent', 1, 'li', 1),
|
||||
'media' => tpl_action('media', 1, 'li', 1),
|
||||
'index' => tpl_action('index', 1, 'li', 1),
|
||||
)); ?></ul>
|
||||
</nav>
|
||||
<?php endif ?>
|
|
@ -1,11 +0,0 @@
|
|||
<?php
|
||||
if (!defined('DOKU_INC')) die();
|
||||
|
||||
if ($conf['useacl'] && $showTools): ?>
|
||||
|
||||
<nav class="nav-trace <?php echo $navClass?>">
|
||||
<h6 class="sr-only" role="heading" aria-level="2"><?php echo tpl_getLang('head_menu_trace'); ?></h6>
|
||||
<div class="trace"><p><?php tpl_breadcrumbs(); ?></p></div>
|
||||
</nav><!-- #dokuwiki__usertools -->
|
||||
<?php endif ?>
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
<?php
|
||||
if (!defined('DOKU_INC')) die();
|
||||
|
||||
if ($conf['useacl'] && $showTools): ?>
|
||||
|
||||
<nav class="nav-usermenu <?php echo $navClass?>">
|
||||
<h6 class="sr-only" role="heading" aria-level="2"><?php echo $lang['user_tools']; ?></h6>
|
||||
<ul>
|
||||
<li class="log"><?php tpl_actionlink('login'); ?></li>
|
||||
<?php if($_SERVER['REMOTE_USER']){
|
||||
echo '<a class="profile" href="'.wl(tpl_getConf('user_ns').$_SERVER['REMOTE_USER'].':') . '">'.hsc($USERINFO['name']).'</a>';
|
||||
}?>
|
||||
|
||||
<?php /* dokuwiki user tools */
|
||||
tpl_toolsevent('usertools', array(
|
||||
'admin' => tpl_action('admin', 1, 'li', 1),
|
||||
'register' => tpl_action('register', 1, 'li', 1),
|
||||
)); ?>
|
||||
|
||||
</ul>
|
||||
</nav><!-- #dokuwiki__usertools -->
|
||||
<?php endif ?>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue