diff --git a/conf/default.php b/conf/default.php index 7c60e66..e5bce5e 100644 --- a/conf/default.php +++ b/conf/default.php @@ -4,8 +4,9 @@ * */ -$conf['tagline'] = 'This is the tagline - explaining what this site is about.'; -$conf['discussionNS'] = 'discussion'; -$conf['userNS'] = 'user'; -$conf['sidebarID'] = 'sidebar'; -$conf['hideTools'] = 0; +$conf['tagline'] = 'This is the tagline - explaining what this site is about.'; +$conf['discussionNS'] = 'discussion'; +$conf['discussNSreverse'] = 0; +$conf['userNS'] = 'user'; +$conf['sidebarID'] = 'sidebar'; +$conf['hideTools'] = 0; diff --git a/conf/metadata.php b/conf/metadata.php index c6ebe16..792c47a 100644 --- a/conf/metadata.php +++ b/conf/metadata.php @@ -4,10 +4,9 @@ * */ -$meta['tagline'] = array('string'); -$meta['discussionNS'] = array('string'); -$meta['userNS'] = array('string'); -$meta['sidebarID'] = array('string'); -$meta['hideTools'] = array('onoff'); - -// array('multichoice','_choices' => array(0,1,2)); +$meta['tagline'] = array('string'); +$meta['discussionNS'] = array('string'); +$meta['discussNSreverse'] = array('onoff'); +$meta['userNS'] = array('string'); +$meta['sidebarID'] = array('string'); +$meta['hideTools'] = array('onoff'); diff --git a/css/_links.css b/css/_links.css index 8fc6c13..d62a4de 100644 --- a/css/_links.css +++ b/css/_links.css @@ -13,7 +13,7 @@ .dokuwiki a.wikilink2 { color: __missing__; background-color: inherit; - text-decoration: none !important; + text-decoration: none; } .dokuwiki a.wikilink2:link, .dokuwiki a.wikilink2:visited { @@ -25,6 +25,11 @@ border-bottom-width: 0; } +/* any link to current page */ +.dokuwiki span.curid a { + font-weight: bold; +} + /*____________ other link types ____________*/ .dokuwiki a.urlextern, diff --git a/css/_mediamanager.css b/css/_mediamanager.css index da1af90..01e23ef 100644 --- a/css/_mediamanager.css +++ b/css/_mediamanager.css @@ -14,7 +14,7 @@ html.popup { overflow: hidden; } -#media__left { +#mediamgr__aside { width: 30%; height: 100%; overflow: auto; @@ -22,18 +22,18 @@ html.popup { left: 0; border-right: solid 1px __border__; } -#media__left .pad { +#mediamgr__aside .pad { padding: .5em; } -#media__right { +#mediamgr__content { width: 69.7%; height: 100%; overflow: auto; position: absolute; right: 0; } -#media__right .pad { +#mediamgr__content .pad { padding: .5em; } diff --git a/css/_toc.css b/css/_toc.css index 5595c52..fcccf4f 100644 --- a/css/_toc.css +++ b/css/_toc.css @@ -16,7 +16,7 @@ /*____________ toc header ____________*/ .dokuwiki div.tocheader { - padding: 0.2em 0.4em; + padding: .2em .5em; margin-bottom: .2em; font-weight: bold; background-color: __background_alt__; @@ -47,7 +47,7 @@ /*____________ toc list ____________*/ .dokuwiki #toc__inside { - padding: .2em .4em; + padding: .2em .5em; background-color: __background_alt__; color: __text__; } diff --git a/css/design.css b/css/design.css index d6e68ba..a86fc9f 100644 --- a/css/design.css +++ b/css/design.css @@ -10,13 +10,14 @@ ********************************************************************/ #dokuwiki__header { - margin: 1em 0 1.4em; + margin: 1em 0 0; } + #dokuwiki__header .headings { - margin-bottom: .7em; + margin-bottom: 2.1em; } #dokuwiki__header h1 { - margin-bottom: .2em; + margin-bottom: 0; font-size: 1.5em; } #dokuwiki__header h1 a { @@ -33,21 +34,7 @@ } #dokuwiki__header .tools { - margin-bottom: .7em; -} -#dokuwiki__header .tools #dokuwiki__usertools { - position: absolute; - top: 0; - right: 0; - border-bottom: 1px solid __border__; - background-color: __background_alt__; - width: 100%; -} -#dokuwiki__header .tools #dokuwiki__usertools ul { - /* imitate #dokuwiki__site */ - margin: 0 auto; - max-width: 64em; - padding: 0 1em; + margin-bottom: 2.1em; } #dokuwiki__header .tools ul { margin-bottom: 0; @@ -55,71 +42,132 @@ #dokuwiki__header .tools ul li { display: inline; } + #dokuwiki__header form.search { - margin: .5em 0 .2em; + margin: .5em 0 0; display: block; } -form.search #qsearch__in { +#dokuwiki__header form.search #qsearch__in { width: 12em; margin-right: .5em; } #dokuwiki__header div.breadcrumbs { + margin-bottom: .3em; } -div.breadcrumbs a { +#dokuwiki__header div.breadcrumbs a { color: __existing__; background-color: inherit; } -/* nav +/* tools ********************************************************************/ -#dokuwiki__aside h1 { } -#dokuwiki__aside h2 { } -#dokuwiki__aside h3 { } -#dokuwiki__aside h4 { } -#dokuwiki__aside h5 { } - -#dokuwiki__aside ul, -#dokuwiki__aside ol { - padding-left: 0; +/* make wiki links look the same as tool links in tool bars */ +#dokuwiki__usertools a.wikilink1, +#dokuwiki__pagetools a.wikilink1, +#dokuwiki__usertools a.wikilink2, +#dokuwiki__pagetools a.wikilink2 { + color: #00c; + border-bottom-width: 0; +} +#dokuwiki__usertools a.wikilink2:hover, +#dokuwiki__pagetools a.wikilink2:hover, +#dokuwiki__usertools a.wikilink2:active, +#dokuwiki__pagetools a.wikilink2:active, +#dokuwiki__usertools a.wikilink2:focus, +#dokuwiki__pagetools a.wikilink2:focus { + text-decoration: underline; } +/* highlight selected tool */ +.mode_admin a.action.admin, +.mode_profile a.action.profile, +.mode_recent a.action.recent, +.mode_index a.action.index, +.mode_revisions a.action.revs, +.mode_backlink a.action.backlink { + font-weight: bold; +} -/* page tools -********************************************************************/ +/*____________ user tools ____________*/ -#dokuwiki__pagetools { - position: fixed; - bottom: 0; - left: 0; - border-top: 1px solid __border__; +#dokuwiki__usertools { + position: absolute; + top: 0; + right: 0; + border-bottom: 1px solid __border__; background-color: __background_alt__; width: 100%; } +#dokuwiki__usertools ul, #dokuwiki__pagetools ul { /* imitate #dokuwiki__site */ margin: 0 auto; max-width: 64em; padding: 0 1em; } -#dokuwiki__pagetools li { +#dokuwiki__usertools ul li.user { + float: left; + margin-left: 0; +} + +/*____________ page tools ____________*/ + +#dokuwiki__pagetools { + position: fixed; + bottom: 0; + left: 0; + border-top: 1px solid __border__; + background-color: __background_alt__; + width: 100%; + z-index: 10; +} +#dokuwiki__pagetools ul li { display: inline; margin: 0 1.5em 0 0; } +#dokuwiki__pagetools ul li a.action.top { + float: right; +} + + +/* sidebar +********************************************************************/ + +#dokuwiki__aside { + padding-top: .4em; + line-height: 1.2; +} + +/* make sidebar more condensed */ + +#dokuwiki__aside h1 { margin-bottom: .222em; } +#dokuwiki__aside h2 { margin-bottom: .333em; } +#dokuwiki__aside h3 { margin-bottom: .444em; } +#dokuwiki__aside h4 { margin-bottom: .5em; } +#dokuwiki__aside h5 { margin-bottom: .5714em; } + +#dokuwiki__aside p, #dokuwiki__aside ul, #dokuwiki__aside ol, #dokuwiki__aside dl, +#dokuwiki__aside pre, #dokuwiki__aside table, #dokuwiki__aside fieldset, +#dokuwiki__aside hr, #dokuwiki__aside blockquote, #dokuwiki__aside address { + margin-bottom: .7em; +} + +#dokuwiki__aside ul, #dokuwiki__aside ol { + padding-left: 0; +} +#dokuwiki__aside li ul, #dokuwiki__aside li ol { + margin-bottom: 0; +} + /* content ********************************************************************/ - /* .dokuwiki .page { - -webkit-border-image: 1em -webkit-gradient(linear, left top, right top, from(#cccccc), to(#ffffff)); - padding: 1em; - background: -moz-linear-gradient(100% 100% 180deg, #cccccc, #ffffff 1em); - background: -webkit-gradient(linear, left top, right top, from(#cccccc), to(#ffffff)); } - */ /*____________ section indenting ____________ @@ -180,6 +228,7 @@ div.breadcrumbs a { } .dokuwiki pre { border: 1px solid __border__; + padding: 0 .2em; } /* for code in */ .dokuwiki pre.file { @@ -217,11 +266,6 @@ div.breadcrumbs a { font-size: 90%; } -/* any link to current page */ -.dokuwiki span.curid a { - color: __text_neu__; -} - /*____________ JS popup ____________*/ @@ -230,6 +274,7 @@ div.breadcrumbs a { color: __text__; border: 1px solid __border__; line-height: 1.2; + padding: 0 .2em; } .JSpopup ul, @@ -257,4 +302,8 @@ div.breadcrumbs a { #dokuwiki__footer .license { clear: both; } +#dokuwiki__footer .license img { + margin: 0 .5em 0 0; + float: none; +} diff --git a/detail.php b/detail.php index 4dc870c..5008901 100644 --- a/detail.php +++ b/detail.php @@ -1,13 +1,7 @@ * @author Anika Henke */ diff --git a/lang/en/lang.php b/lang/en/lang.php index 5496cbe..91b04b1 100644 --- a/lang/en/lang.php +++ b/lang/en/lang.php @@ -4,6 +4,12 @@ * */ -$lang['btn_discussion'] = "Discussion"; -$lang['btn_back2article'] = "Back to article"; -$lang['btn_userpage'] = "User page"; +$lang['discussion'] = 'Discussion'; +$lang['back_to_article'] = 'Back to article'; +$lang['userpage'] = 'User page'; + +/* accessibility headlines */ +$lang['user_tools'] = 'User Tools'; +$lang['site_tools'] = 'Site Tools'; +$lang['page_tools'] = 'Page Tools'; +$lang['skip_to_content'] = 'skip to content'; diff --git a/lang/en/settings.php b/lang/en/settings.php index 66c9c44..e2fde20 100644 --- a/lang/en/settings.php +++ b/lang/en/settings.php @@ -4,8 +4,9 @@ * */ -$lang['foo'] = 'Tagline'; -$lang['discussionNS'] = 'Discussion namespace (leave empty to disable discussions)'; -$lang['userNS'] = 'User namespace (leave empty to disable user pages)'; -$lang['sidebarID'] = 'page name of page included in sidebar'; -$lang['hideTools'] = 'Hide tools when not logged in?'; +$lang['tagline'] = 'Tagline'; +$lang['discussionNS'] = 'Discussion namespace (leave empty to disable discussions)'; +$lang['discussNSreverse'] = 'Reverse discussion namespace? (e.g. "foo:bar:discussion" instead of "discussion:foo:bar")'; +$lang['userNS'] = 'User namespace (leave empty to disable user pages)'; +$lang['sidebarID'] = 'page name of page included in sidebar'; +$lang['hideTools'] = 'Hide tools when not logged in?'; diff --git a/main.php b/main.php index 65d964c..23f3f2d 100644 --- a/main.php +++ b/main.php @@ -45,44 +45,41 @@ $showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER

- -
- +
-

User Tools

+

    would be: tpl_action('edit',0,'li') */ - tpl_action('admin', 1, 'li'); - tpl_action('profile', 1, 'li', 0, '', '', $INFO['userinfo']['name'].' ('.$_SERVER['REMOTE_USER'].')'); - // this partly replaces tpl_userinfo() - if (tpl_getConf('userNS') && $_SERVER['REMOTE_USER']) { - echo '
  • '; - _tpl_userpage(tpl_getConf('userNS').':',1); + if ($_SERVER['REMOTE_USER']) { + echo '
  • '; + tpl_userinfo(); /* 'Logged in as ...' */ echo '
  • '; } + tpl_action('admin', 1, 'li'); + if (tpl_getConf('userNS')) { + _tpl_userpage(tpl_getConf('userNS'),1,'li'); + } + tpl_action('profile', 1, 'li'); tpl_action('login', 1, 'li'); ?>
-
- +
-

Site Tools

- +

+
    - - -
    -

    Page Tools

    -
      - '; - _tpl_discussion(tpl_getConf('discussionNS').':',1); - echo ''; - } - tpl_action('history', 1, 'li'); - tpl_action('backlink', 1, 'li'); - tpl_action('subscribe', 1, 'li'); - ?> -
    -
    - - @@ -154,20 +131,38 @@ $showTools = !tpl_getConf('hideTools') || ( tpl_getConf('hideTools') && $_SERVER

    -
    + + +
    +

    +
      + +
    +
    + +
- +
diff --git a/mediamanager.php b/mediamanager.php index df9ff6e..0f43625 100644 --- a/mediamanager.php +++ b/mediamanager.php @@ -1,13 +1,7 @@ */ ?>
-
+

@@ -37,7 +31,7 @@
-
+
diff --git a/tpl_functions.php b/tpl_functions.php index 6dc9e4b..0dfee95 100644 --- a/tpl_functions.php +++ b/tpl_functions.php @@ -1,37 +1,66 @@ */ -function _tpl_discussion($discussNS='discussion:',$link=0) { +function _tpl_discussion($discussNS='discussion',$link=0,$wrapper=0,$reverse=0) { global $ID; - if(substr($ID,0,strlen($discussNS))==$discussNS) { - $backID = substr(strstr($ID,':'),1); + + if ($reverse) { + $discussPage = $ID.':'.$discussNS; + $isDiscussPage = substr($ID,-strlen($discussNS),strlen($discussNS))==$discussNS; + $backID = substr($ID,0,-strlen($discussNS)); + } else { + $discussPage = $discussNS.':'.$ID; + $isDiscussPage = substr($ID,0,strlen($discussNS))==$discussNS; + $backID = strstr($ID,':'); + } + + if ($wrapper) echo "<$wrapper>"; + + if($isDiscussPage) { if ($link) - tpl_link(wl($backID),tpl_getLang('btn_back2article')); + tpl_pagelink($backID,tpl_getLang('back_to_article')); else - echo html_btn('back2article',$backID,'',array()); + echo html_btn('back2article',$backID,'',array(),0,0,tpl_getLang('back_to_article')); } else { if ($link) - tpl_link(wl($discussNS.$ID),tpl_getLang('btn_discussion')); + tpl_pagelink($discussPage,tpl_getLang('discussion')); else - echo html_btn('discussion',$discussNS.$ID,'',array()); + echo html_btn('discussion',$discussPage,'',array(),0,0,tpl_getLang('discussion')); } + + if ($wrapper) echo ""; } /** * Create link/button to user page + * + * @author Anika Henke */ -function _tpl_userpage($userNS='user:',$link=0) { +function _tpl_userpage($userNS='user',$link=0,$wrapper=false) { + if (!$_SERVER['REMOTE_USER']) return; + global $conf; + $userPage = $userNS.':'.$_SERVER['REMOTE_USER'].':'.$conf['start']; + + if ($wrapper) echo "<$wrapper>"; + if ($link) - tpl_link(wl($userNS.$_SERVER['REMOTE_USER'].':'.$conf['start']),tpl_getLang('btn_userpage')); + tpl_pagelink($userPage,tpl_getLang('userpage')); else - echo html_btn('userpage',$userNS.$_SERVER['REMOTE_USER'].':'.$conf['start'],'',array()); + echo html_btn('userpage',$userPage,'',array(),0,0,tpl_getLang('userpage')); + + if ($wrapper) echo ""; }