Update siteHead and siteBodyBegin methods to use HTML link and script tags directly
This commit is contained in:
1 parent
cb6f0bb547
commit
6f7e647be1
2 files changed
+8
-2
No files matched your search
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"plugin-bludit-toc": {
|
||||
"name": "Table of Contents",
|
||||
"description": "Sticky ToC sidebar (desktop) and floating drawer (mobile) generated from the article's h2/h3/h4 headings."
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -60,7 +60,7 @@ class PluginBluditToc extends Plugin {
|
||||
*/
|
||||
public function siteHead() {
|
||||
$url = DOMAIN_PLUGINS . $this->directoryName . '/toc.css';
|
||||
return HTML::style($url) . PHP_EOL;
|
||||
return '<link rel="stylesheet" type="text/css" href="' . $url . '">' . PHP_EOL;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -87,7 +87,7 @@ class PluginBluditToc extends Plugin {
|
||||
$url = DOMAIN_PLUGINS . $this->directoryName . '/toc.js';
|
||||
|
||||
$out = '<script>window.BLTOC={title:' . $title . ',navbarHeight:' . $navbarHeight . ',minWidth:' . $minWidth . '};</script>' . PHP_EOL;
|
||||
$out .= HTML::script($url) . PHP_EOL;
|
||||
$out .= '<script defer src="' . $url . '"></script>' . PHP_EOL;
|
||||
return $out;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user