[TikiWiki-commits] [Git][tikiwiki/tiki][30.x] [FIX] autotoc: Fix the auto-toc z-index and top
"Jonny Bradley \(@jonnybradley\) via TikiWiki-cvs" <[email protected]> Mon, 29 Jun 2026 16:17:58 +0000
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a429ab6aa32b_38baf007c1027e1@gitlab-sidekiq-low-urgency-cpu-bound-v2-656d6f88d7-579vs.mail> |
Jonny Bradley pushed to branch 30.x at Tiki Wiki CMS Groupware / Tiki Commits: 3eddd5d1 by Jonny Bradley at 2026-06-29T16:11:07+00:00 [FIX] autotoc: Fix the auto-toc z-index and top --- * [FIX] autotoc: Fix the auto-toc z-index and top --- * [FIX] autotoc: Fix the auto-toc z-index (`.sticky-top` really isn't the right class for this any more) and use some js to make it not disappear under the header on the social layout. See merge request tikiwiki/tiki!10619 (cherry picked from commit c9f1a90459d039d6c1450bc4d558ecd44ddd6474) 6f15948c [FIX] autotoc: Fix the auto-toc z-index (`.sticky-top` really isn't the right... Co-authored-by: Jonny Bradley <[email protected]> See merge request tikiwiki/tiki!10621 - - - - - 2 changed files: - lib/jquery_tiki/autoToc.js - themes/base_files/scss/_tiki-wikipages_and_plugins.scss Changes: ===================================== lib/jquery_tiki/autoToc.js ===================================== @@ -108,19 +108,22 @@ $.genAutoToc = function () { if (countHeadings(children) > 0) { $row = $("<div class='row'/>"); - $container = $("<div class='container'/>"); + const $container = $("<div class='container'/>"); + let $tocNav, $page_data; if (toc_pos === "left" || toc_pos === "top") { - var $tocNav = $("<div id='all-toc' class='col-md-5 hidden sticky-top'/>"); - var $page_data = $("#page-data").addClass("col-md-7 clearfix"); + $tocNav = $("<div id='all-toc' class='col-md-5 hidden sticky-top'/>"); + $page_data = $("#page-data").addClass("col-md-7 clearfix"); $('<style type="text/css">#autotoc .nav > li{max-width: 350px;}</style>').appendTo('head'); + } else if (toc_pos === "right") { + $tocNav = $("<div id='all-toc' class='col-md-4 hidden sticky-top'/>"); + $page_data = $("#page-data").addClass("col-md-8 clearfix"); } - else if (toc_pos === "right") { - var $tocNav = $("<div id='all-toc' class='col-md-4 hidden sticky-top'/>"); - var $page_data = $("#page-data").addClass("col-md-8 clearfix"); + if ($("body").is(".layout_social")) { + $tocNav.css("top", $("header").height()); } - var $nav = $("<nav id='autotoc'>"); + const $nav = $("<nav id='autotoc'>"); //create object to store processed IDs. var processedId = {}; ===================================== themes/base_files/scss/_tiki-wikipages_and_plugins.scss ===================================== @@ -1113,6 +1113,7 @@ h6:hover .heading-link { // Autotoc #all-toc.hidden.sticky-top { height: 80vh !important; + z-index: 4; } // /* wikiplugin viewtextfile */ View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/3eddd5d1c5ba925f50b898fbbb091fa859c5c569 -- View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/3eddd5d1c5ba925f50b898fbbb091fa859c5c569 You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help _______________________________________________ TikiWiki-cvs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs