diff --git a/plugin.php b/plugin.php index 353707d..b83b64c 100644 --- a/plugin.php +++ b/plugin.php @@ -1,29 +1,14 @@ dbFields = array( - // Label shown at the top of the sidebar and in the mobile drawer. 'title' => 'On this page', - // Pixel offset to clear the fixed navbar when jumping to a heading. 'navbarHeight' => 80, - // Viewport width (px) at which the fixed sidebar appears. - // Below this width the mobile floating-button drawer is used instead. 'minWidth' => 1280, ); } - // ---- Admin settings form ---- - public function form() { global $L; @@ -34,40 +19,59 @@ class PluginBluditToc extends Plugin { $h = ''; $h .= '
'; - $h .= ''; - $h .= ''; + $h .= ''; + $h .= ''; $h .= '
'; $h .= '
'; - $h .= ''; - $h .= ''; - $h .= '' . $L->get('Used to offset hash-jump anchors so they clear the fixed navbar.') . ''; + $h .= ''; + $h .= ''; + $h .= '' . $L->get('Pixel offset applied to heading anchors to clear a fixed navbar.') . ''; $h .= '
'; $h .= '
'; - $h .= ''; - $h .= ''; - $h .= '' . $L->get('Viewport widths below this value use the mobile floating button instead.') . ''; + $h .= ''; + $h .= ''; + $h .= '' . $L->get('Below this width the mobile floating button is shown instead.') . ''; $h .= '
'; return $h; } - // ---- Front-end hooks ---- - - /** - * Inject the plugin CSS in . - */ public function siteHead() { - $url = DOMAIN_PLUGINS . $this->directoryName . '/toc.css'; - return '' . PHP_EOL; + return '' . PHP_EOL; } - /** - * Inject the ToC sidebar container right after . - * It is position:fixed, so placement in the DOM doesn't affect layout. - * JS will populate