refactoring avec claude + ajout scroll-margin-top et désaffichage du panel au click sur les liens du toc
This commit is contained in:
parent
d51fc592ed
commit
01c5b098e4
14 changed files with 149 additions and 121 deletions
|
|
@ -12,14 +12,6 @@ function allYears ($article) {
|
|||
return $years;
|
||||
}
|
||||
|
||||
function addAnchors($content) {
|
||||
$content = preg_replace_callback('/<h3>(.*?)<\/h3>/', function($matches) {
|
||||
$slug = Str::slug($matches[1]);
|
||||
return '<h3 id="' . $slug . '">' . $matches[1] . '</h3>';
|
||||
}, $content);
|
||||
return $content;
|
||||
}
|
||||
|
||||
function setTitleFontSizeClass($title, $level = 'h1')
|
||||
{
|
||||
$length = strlen($title);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue