diff options
author | Andreas Gohr <andi@splitbrain.org> | 2012-04-20 17:20:17 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2012-04-20 17:20:17 +0200 |
commit | c8388e443bcd0c09a0b142b31819d48abd559aa0 (patch) | |
tree | 3ee1a17a29bfd980257750215dcda68d824d9441 /lib/tpl | |
parent | 3d2fd76a6a87ddf4a45c05091799c09500265307 (diff) | |
download | rpg-c8388e443bcd0c09a0b142b31819d48abd559aa0.tar.gz rpg-c8388e443bcd0c09a0b142b31819d48abd559aa0.tar.bz2 |
made TOC togling script more generic
Instead of a dedicated function to toggle the TOC we now have a function
that allows to use this functionality everywhere. This will be used to
toggle the sidebar in the mobile view (in an upcoming patch).
Note, this required some changes to the CSS (to make it more generic).
The CSS is still located in the TOC sections but should probably be
moved into its own section instead.
Diffstat (limited to 'lib/tpl')
-rw-r--r-- | lib/tpl/default/design.css | 10 | ||||
-rw-r--r-- | lib/tpl/default/rtl.css | 3 | ||||
-rw-r--r-- | lib/tpl/dokuwiki/css/_toc.css | 6 | ||||
-rw-r--r-- | lib/tpl/dokuwiki/css/design.css | 8 | ||||
-rw-r--r-- | lib/tpl/dokuwiki/main.php | 11 |
5 files changed, 24 insertions, 14 deletions
diff --git a/lib/tpl/default/design.css b/lib/tpl/default/design.css index 300b62a15..44ccc0343 100644 --- a/lib/tpl/default/design.css +++ b/lib/tpl/default/design.css @@ -565,23 +565,25 @@ div.dokuwiki #dw__toc h3 { font-size: 1em; } -div.dokuwiki #dw__toc h3 strong { +div.dokuwiki .toggle_close .toggle, +div.dokuwiki .toggle_open .toggle { border: 0.4em solid __background_alt__; float: right; display: block; margin: 0.4em 3px 0 0; } -div.dokuwiki #dw__toc h3 strong span { +div.dokuwiki .toggle_open .toggle span, +div.dokuwiki .toggle_close .toggle span { display: none; } -div.dokuwiki #dw__toc.close h3 strong { +div.dokuwiki .toggle_close .toggle { margin-top: 0.4em; border-top: 0.4em solid __text__; } -div.dokuwiki #dw__toc.open h3 strong { +div.dokuwiki .toggle_open .toggle { margin-top: 0; border-bottom: 0.4em solid __text__; } diff --git a/lib/tpl/default/rtl.css b/lib/tpl/default/rtl.css index 32a8ddb6d..b9dd82902 100644 --- a/lib/tpl/default/rtl.css +++ b/lib/tpl/default/rtl.css @@ -98,7 +98,8 @@ div.dokuwiki #dw__toc h3 { text-align: right; } -div.dokuwiki #dw__toc h3 strong { +div.dokuwiki .toggle_close .toggle, +div.dokuwiki .toggle_open .toggle { float: left; margin: 0.4em 0 0 3px; } diff --git a/lib/tpl/dokuwiki/css/_toc.css b/lib/tpl/dokuwiki/css/_toc.css index e62bb0a7a..71cc4096a 100644 --- a/lib/tpl/dokuwiki/css/_toc.css +++ b/lib/tpl/dokuwiki/css/_toc.css @@ -26,11 +26,13 @@ font-weight: bold; } -#dw__toc h3 strong { +.toggle_open .toggle, +.toggle_close .toggle { float: right; margin: 0 .2em; } -[dir=rtl] #dw__toc h3 strong { +[dir=rtl] .toggle_open .toggle, +[dir=rtl] .toggle_close .toggle { float: left; } diff --git a/lib/tpl/dokuwiki/css/design.css b/lib/tpl/dokuwiki/css/design.css index 8ebeca6da..2d0af6ad1 100644 --- a/lib/tpl/dokuwiki/css/design.css +++ b/lib/tpl/dokuwiki/css/design.css @@ -412,17 +412,19 @@ letter-spacing: .1em; } -#dw__toc h3 strong { +.toggle_open .toggle, +.toggle_close .toggle { background: transparent url(images/toc-arrows.png) 0 0; width: 8px; height: 5px; margin: .4em 0 0; } -#dw__toc.close strong { +.toggle_close .toggle { background-position: 0 -5px; } -#dw__toc strong span { +.toggle_open .toggle span, +.toggle_close .toggle span { display: none; } diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php index 57c94f174..5e8eb7517 100644 --- a/lib/tpl/dokuwiki/main.php +++ b/lib/tpl/dokuwiki/main.php @@ -37,10 +37,13 @@ $showSidebar = $conf['sidebar'] && page_exists($conf['sidebar']) && ($ACT=='show <?php if($showSidebar): ?> <!-- ********** ASIDE ********** --> <div id="dokuwiki__aside"><div class="pad include group"> - <?php tpl_flush() ?> - <?php tpl_includeFile('sidebarheader.html') ?> - <?php tpl_include_page($conf['sidebar']) ?> - <?php tpl_includeFile('sidebarfooter.html') ?> + <div class="a11y toggle"><?php echo hsc(ucfirst($conf['sidebar'])) ?></div> + <div class="aside group"> + <?php tpl_flush() ?> + <?php tpl_includeFile('sidebarheader.html') ?> + <?php tpl_include_page($conf['sidebar']) ?> + <?php tpl_includeFile('sidebarfooter.html') ?> + </div> </div></div><!-- /aside --> <?php endif; ?> |