add toc to top of page
This commit is contained in:
parent
995afff36a
commit
28d5e3f56b
|
@ -32,12 +32,11 @@
|
|||
cursor: pointer;
|
||||
}
|
||||
#dokuwiki__sidebar_content {
|
||||
margin-bottom: 1em;
|
||||
margin-bottom: 1em;
|
||||
padding: 1em;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--standard-border-radius);
|
||||
}
|
||||
|
||||
#dokuwiki__sidebar:target {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
|
@ -52,27 +51,26 @@
|
|||
}
|
||||
|
||||
/* toc */
|
||||
#dokuwiki__sidebar_toc {
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--standard-border-radius);
|
||||
padding: 1em;
|
||||
}
|
||||
.dokuwiki .toggle strong {
|
||||
float: right;
|
||||
margin: 0 .2em;
|
||||
}
|
||||
[dir=rtl] .dokuwiki .toggle strong { float: left; }
|
||||
#dw__toc {
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--standard-border-radius);
|
||||
padding: .5em;
|
||||
}
|
||||
#dw__toc > h3 {
|
||||
.toc { font-size: .95em; }
|
||||
ul.toc { padding-left:.25em; }
|
||||
.dw__toc > h3 {
|
||||
font-size: 1rem;
|
||||
margin-top: auto;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
#dw__toc ul {
|
||||
margin: 0;
|
||||
}
|
||||
#dw__toc ul li {
|
||||
.dw__toc ul li {
|
||||
padding-left: .25em;
|
||||
}
|
||||
#dw__toc ul ul { padding-left: 1em; }
|
||||
.dw__toc ul ul { padding-left: 1em; }
|
||||
[dir=rtl] #dw__toc ul ul {
|
||||
padding-left: 0;
|
||||
padding-right: 1em;
|
||||
|
|
|
@ -310,7 +310,7 @@ aside, details, pre, progress {
|
|||
|
||||
aside {
|
||||
font-size: 1rem;
|
||||
width: 30%;
|
||||
width: 33%;
|
||||
padding: 0 15px;
|
||||
margin-inline-start: 15px;
|
||||
float: right;
|
||||
|
|
18
main.php
18
main.php
|
@ -63,6 +63,7 @@ $showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show');
|
|||
<?php tpl_searchform() ?>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- TOC AND TOOLS IN SIDENAV -->
|
||||
<a id="dokuwiki__sidebar_show_btn" class="button" href="#dokuwiki__sidebar" class="button" >☰</a>
|
||||
<div id="dokuwiki__sidebar" aria-labelledby="dokuwiki__sitetools_heading">
|
||||
|
@ -80,20 +81,24 @@ $showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show');
|
|||
<details id="dokuwiki__pagetools" aria-labelledby="dokuwiki__pagetools_heading">
|
||||
<summary id="dokuwiki__pagetools_heading"><?php echo $lang['tools'] ?></summary>
|
||||
<ul>
|
||||
<?php if (file_exists(DOKU_INC . 'inc/Menu/SiteMenu.php')) {
|
||||
echo (new \dokuwiki\Menu\SiteMenu())->getListItems('action ', false);
|
||||
} else {
|
||||
_tpl_sitetools();
|
||||
} ?>
|
||||
<?php if (file_exists(DOKU_INC . 'inc/Menu/PageMenu.php')) {
|
||||
echo (new \dokuwiki\Menu\PageMenu())->getListItems('action ', false);
|
||||
} else {
|
||||
_tpl_pagetools();
|
||||
} ?>
|
||||
<?php if (file_exists(DOKU_INC . 'inc/Menu/SiteMenu.php')) {
|
||||
echo (new \dokuwiki\Menu\SiteMenu())->getListItems('action ', false);
|
||||
} else {
|
||||
_tpl_sitetools();
|
||||
} ?>
|
||||
</ul>
|
||||
</details>
|
||||
<div id="dokuwiki__sidebar_toc">
|
||||
<?php tpl_toc()?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</header>
|
||||
<?php tpl_flush() ?>
|
||||
|
||||
|
@ -111,6 +116,9 @@ $showSidebar = page_findnearest($conf['sidebar']) && ($ACT=='show');
|
|||
<?php tpl_flush() /* flush the output buffer */ ?>
|
||||
<?php tpl_includeFile('pageheader.html') ?>
|
||||
|
||||
<aside>
|
||||
<?php tpl_toc()?>
|
||||
</aside>
|
||||
<?php tpl_content(false) /* the main content */ ?>
|
||||
|
||||
<?php tpl_flush() ?>
|
||||
|
|
Loading…
Reference in New Issue