mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
Use html details element for toc on top of help pages.
This allows us to get rid of some more unneccessary JavaScript that just implements stuff that web browsers now do anyways.
This commit is contained in:
@@ -15,6 +15,14 @@
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#doco-top-toc-wrapper {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
#doco-top-toc-wrapper > summary {
|
||||
font-size: large;
|
||||
}
|
||||
|
||||
.toc-content li,
|
||||
#doco-top-toc li {
|
||||
padding: 3px 0px;
|
||||
@@ -23,4 +31,3 @@
|
||||
#doco-side-toc li {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,3 @@
|
||||
function docoTocToggle() {
|
||||
if ($('#doco-top-toc').is(':visible')) {
|
||||
$('#doco-toc-toggle').removeClass('bi-gear').addClass('bi-caret-right');
|
||||
} else {
|
||||
$('#doco-toc-toggle').removeClass('bi-caret-right').addClass('bi-caret-down');
|
||||
}
|
||||
$('#doco-top-toc').toggle();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
toc = {};
|
||||
// Generate the table of contents in the side nav menu (see view/tpl/help.tpl)
|
||||
$(document).ready(function () {
|
||||
|
||||
@@ -8,13 +8,10 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="section-content-wrapper">
|
||||
<h3 id="doco-top-toc-heading">
|
||||
<span class="fakelink" onclick="docoTocToggle(); return false;">
|
||||
<i class="bi bi-caret-right fakelink" id="doco-toc-toggle"></i>
|
||||
{{$module->get_toc_heading()}}
|
||||
</span>
|
||||
</h3>
|
||||
<ul id="doco-top-toc" style="margin-bottom: 1.5em; display: none;"></ul>
|
||||
<details id="doco-top-toc-wrapper">
|
||||
<summary id="doco-top-toc-heading">{{$module->get_toc_heading()}}</summary>
|
||||
<ul id="doco-top-toc"></ul>
|
||||
</details>
|
||||
<div id="doco-content">
|
||||
{{$module->render_content()}}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user