Skip to content

Commit

Permalink
Added a page footer feature
Browse files Browse the repository at this point in the history
  • Loading branch information
ipari committed Mar 11, 2017
1 parent de16ff2 commit 0a8376d
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 10 deletions.
1 change: 1 addition & 0 deletions conf/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@

$conf['numberedHeading'] = 0;
$conf['tocPosition'] = 'wikipedia';
$conf['footer'] = '';
1 change: 1 addition & 0 deletions conf/metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@

$meta['numberedHeading'] = array('onoff');
$meta['tocPosition'] = array('multichoice', '_choices' => array('dokuwiki', 'wikipedia'));
$meta['footer'] = array('string');
28 changes: 20 additions & 8 deletions css/design.less
Original file line number Diff line number Diff line change
Expand Up @@ -277,20 +277,32 @@
padding: 0.5em 1em;

div.doc {
margin-bottom: .6em;
margin-bottom: 1em;
}
.license {
div.license {
margin-bottom: 1em;
font-size: 85%;

> a {
display: block;
float: left;
margin-right: .5em;
height: 2em;
padding-top: .3em;
}
a.urlextern {
float: left;
display: block;
background-position: 0 0.2em;
}
:after {
content: '';
display: block;
clear: both;
}
}
div.footer {
margin: 0 -1em;
padding: 0.5em 1em;
}
}

.license a.urlextern {
display: block;
background-position: top left;
}
/* icons */
3 changes: 2 additions & 1 deletion lang/en/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
$lang['numberedHeading'] = 'Numbering headings';
$lang['tocPosition'] = 'Position of TOC';
$lang['tocPosition_o_dokuwiki'] = 'DokuWiki';
$lang['tocPosition_o_wikipedia'] = 'Wikipedia';
$lang['tocPosition_o_wikipedia'] = 'Wikipedia';
$lang['footer'] = 'Footer page name, empty field disables the footer';
1 change: 1 addition & 0 deletions lang/ko/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
$lang['tocPosition'] = '목차의 위치';
$lang['tocPosition_o_dokuwiki'] = '도쿠위키 기본';
$lang['tocPosition_o_wikipedia'] = '위키백과 스타일';
$lang['footer'] = '바닥글 문서 이름, 필드를 비우면 바닥글 비활성화';
8 changes: 7 additions & 1 deletion main.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
<?php } ?>

<div class="page group
<?php if (tpl_getConf('numberedHeading')): ?> numbered_heading<?php endif ?>
<?php if(tpl_getConf('numberedHeading')): ?> numbered_heading<?php endif ?>
<?php if(tpl_getConf('tocPosition')): ?> toc_<?php echo tpl_getConf('tocPosition') ?><?php endif ?>
">
<!-- wikipage start -->
Expand All @@ -147,8 +147,14 @@

<!-- ********** FOOTER ********** -->
<div id="dokuwiki__footer">
<?php if($INFO['exists']): ?>
<div class="doc"><?php white_pageinfo() ?></div>
<?php endif ?>
<?php tpl_includeFile('sidebarfooter.html') ?>
<?php tpl_license('badge', false, false) ?>
<div class="footer">
<?php tpl_include_page(tpl_getConf('footer'), 1, 1) ?>
</div>
</div><!-- /footer -->

<?php tpl_includeFile('footer.html') ?>
Expand Down

0 comments on commit 0a8376d

Please sign in to comment.