Skip to content

Commit

Permalink
Fixes #2 - Support Breadcrumbs/You are here
Browse files Browse the repository at this point in the history
  • Loading branch information
dploeger committed Sep 2, 2013
1 parent 2e93696 commit 1523780
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 3 deletions.
25 changes: 25 additions & 0 deletions css/aran.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,31 @@ body {

/** Header **/

#dokuwiki__header {

display:none;

}

#aranheader #dokuwiki__header {

display: block;

}

#dokuwiki__header > .pad {
margin-left: 15px;
padding-left: 1em;
margin-right: 15px;
padding-right: 1em;
}

#searchform {
float: right;
margin-right: 15px;
padding-right: 1em;
}

#dokuwiki__top {

padding-top: 42px;
Expand Down
5 changes: 5 additions & 0 deletions footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

<span class="style5">
<?php tpl_include_page(tpl_getConf('footerID')); ?>
<?php
tpl_action('register', 1);
print "&nbsp;";
tpl_action('login', 1);
?>
</span>

<br />
Expand Down
59 changes: 59 additions & 0 deletions header.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,66 @@
<?php

global $conf;
global $_SERVER;
$showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER['REMOTE_USER'] );

?>
<div id="header">
</div>
<div id="top">
<?php
tpl_include_page(tpl_getConf('menuID'));
?>
</div>
<div id="searchform"><?php tpl_searchform() ?></div>
<!-- ********** HEADER ********** -->
<div id="aranheader"><div id="dokuwiki__header">
<div class="pad">

<div class="headings">
<ul class="a11y skip">
<li><a href="#dokuwiki__content"><?php echo $lang['skip_to_content'] ?></a></li>
</ul>
<div class="clearer"></div>
</div>

<div class="tools">
<?php if ($conf['useacl'] && $showTools): ?>
<!-- USER TOOLS -->
<div id="dokuwiki__usertools">
<h3 class="a11y"><?php echo $lang['user_tools'] ?></h3>
<ul>
<?php /* the optional second parameter of tpl_action() switches between a link and a button,
e.g. a button inside a <li> would be: tpl_action('edit', 0, 'li') */
if ($_SERVER['REMOTE_USER']) {
echo '<li class="user">';
tpl_userinfo(); /* 'Logged in as ...' */
echo '</li>';
}
tpl_action('recent', 1, 'li');
tpl_action('media', 1, 'li');
tpl_action('index', 1, 'li');
tpl_action('admin', 1, 'li');
_tpl_action('userpage', 1, 'li');
tpl_action('profile', 1, 'li');
tpl_action('register', 1, 'li'); /* DW versions < 2011-02-20 need to use _tpl_action('register', 1, 'li') */
tpl_action('login', 1, 'li');
?>
</ul>
</div>

<?php endif ?>

</div>

<!-- BREADCRUMBS -->
<?php if($conf['breadcrumbs']){ ?>
<div class="breadcrumbs"><?php tpl_breadcrumbs() ?></div>
<?php } ?>
<?php if($conf['youarehere']){ ?>
<div class="breadcrumbs"><?php tpl_youarehere() ?></div>
<?php } ?>

<div class="clearer"></div>
<hr class="a11y" />
</div></div></div><!-- /header -->
5 changes: 2 additions & 3 deletions main.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ class="dokuwiki site mode_<?php echo $ACT ?> <?php echo ($showSidebar) ? 'hasSid
<?php html_msgarea() /* occasional error and info messages on top of the page */ ?>
<?php tpl_includeFile('header.html') ?>

<?php if ($conf['useacl'] && $showTools): ?>

<!-- ********** HEADER ********** -->
<div id="dokuwiki__header"><div class="pad">

Expand All @@ -63,6 +61,7 @@ class="dokuwiki site mode_<?php echo $ACT ?> <?php echo ($showSidebar) ? 'hasSid

<div class="tools">
<!-- USER TOOLS -->
<?php if ($conf['useacl'] && $showTools): ?>
<div id="dokuwiki__usertools">
<h3 class="a11y"><?php echo $lang['user_tools'] ?></h3>
<ul>
Expand All @@ -81,6 +80,7 @@ class="dokuwiki site mode_<?php echo $ACT ?> <?php echo ($showSidebar) ? 'hasSid
?>
</ul>
</div>
<?php endif ?>

<!-- SITE TOOLS -->
<div id="dokuwiki__sitetools">
Expand Down Expand Up @@ -110,7 +110,6 @@ class="dokuwiki site mode_<?php echo $ACT ?> <?php echo ($showSidebar) ? 'hasSid
<hr class="a11y" />
</div></div><!-- /header -->

<?php endif ?>

<div class="wrapper">

Expand Down

0 comments on commit 1523780

Please sign in to comment.