|
|
@ -522,7 +522,7 @@ function get_posts($posts, $page = 1, $perpage = 0) |
|
|
if (isset($toc['1'])) { |
|
|
if (isset($toc['1'])) { |
|
|
$state = config('toc.state'); |
|
|
$state = config('toc.state'); |
|
|
if ($state !== 'open') { |
|
|
if ($state !== 'open') { |
|
|
$state = 'close'; |
|
|
|
|
|
|
|
|
$state = ''; |
|
|
} |
|
|
} |
|
|
$label = config('toc.label'); |
|
|
$label = config('toc.label'); |
|
|
if (empty($label)) { |
|
|
if (empty($label)) { |
|
|
@ -541,7 +541,7 @@ function get_posts($posts, $page = 1, $perpage = 0) |
|
|
}); |
|
|
}); |
|
|
</script> |
|
|
</script> |
|
|
EOF; |
|
|
EOF; |
|
|
$post->body = $toc['0'] . $load . '<div class="toc-wrapper" id="toc-wrapper.post-'.$post->date.'" style="display:none;" ><details '. $state .'><summary title="TOC"><span class="details">'. $label .'</span></summary><div class="inner"><div class="toc" id="toc.post-'.$post->date.'"></div></div></details></div><script src="'. site_url().'system/resources/js/toc.js"></script>' . $toc['1']; |
|
|
|
|
|
|
|
|
$post->body = $toc['0'] . '<div class="toc-wrapper" id="toc-wrapper.post-'.$post->date.'" style="display:none;" >'. $load .'<details '. $state .'><summary title="'. $label .'"><span class="details">'. $label .'</span></summary><div class="inner"><div class="toc" id="toc.post-'.$post->date.'"></div></div></details><script src="'. site_url().'system/resources/js/toc.generator.js"></script></div>' . $toc['1']; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Convert image tags to figures
|
|
|
// Convert image tags to figures
|
|
|
@ -612,7 +612,7 @@ function get_pages($pages, $page = 1, $perpage = 0) |
|
|
if (isset($toc['1'])) { |
|
|
if (isset($toc['1'])) { |
|
|
$state = config('toc.state'); |
|
|
$state = config('toc.state'); |
|
|
if ($state !== 'open') { |
|
|
if ($state !== 'open') { |
|
|
$state = 'close'; |
|
|
|
|
|
|
|
|
$state = ''; |
|
|
} |
|
|
} |
|
|
$label = config('toc.label'); |
|
|
$label = config('toc.label'); |
|
|
if (empty($label)) { |
|
|
if (empty($label)) { |
|
|
@ -631,7 +631,7 @@ function get_pages($pages, $page = 1, $perpage = 0) |
|
|
}); |
|
|
}); |
|
|
</script> |
|
|
</script> |
|
|
EOF; |
|
|
EOF; |
|
|
$post->body = $toc['0'] . $load . '<div class="toc-wrapper" id="toc-wrapper.page-'.$post->slug.'" style="display:none;" ><details '. $state .'><summary title="TOC"><span class="details">'. $label .'</span></summary><div class="inner"><div class="toc" id="toc.page-'.$post->slug.'"></div></div></details></div><script src="'. site_url().'system/resources/js/toc.js"></script>' . $toc['1']; |
|
|
|
|
|
|
|
|
$post->body = $toc['0'] . '<div class="toc-wrapper" id="toc-wrapper.page-'.$post->slug.'" style="display:none;" >'. $load .'<details '. $state .'><summary title="'. $label .'"><span class="details">'. $label .'</span></summary><div class="inner"><div class="toc" id="toc.page-'.$post->slug.'"></div></div></details><script src="'. site_url().'system/resources/js/toc.generator.js"></script></div>' . $toc['1']; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (config('views.counter') == 'true') { |
|
|
if (config('views.counter') == 'true') { |
|
|
@ -708,7 +708,7 @@ function get_subpages($sub_pages, $page = 1, $perpage = 0) |
|
|
if (isset($toc['1'])) { |
|
|
if (isset($toc['1'])) { |
|
|
$state = config('toc.state'); |
|
|
$state = config('toc.state'); |
|
|
if ($state !== 'open') { |
|
|
if ($state !== 'open') { |
|
|
$state = 'close'; |
|
|
|
|
|
|
|
|
$state = ''; |
|
|
} |
|
|
} |
|
|
$label = config('toc.label'); |
|
|
$label = config('toc.label'); |
|
|
if (empty($label)) { |
|
|
if (empty($label)) { |
|
|
@ -727,7 +727,7 @@ function get_subpages($sub_pages, $page = 1, $perpage = 0) |
|
|
}); |
|
|
}); |
|
|
</script> |
|
|
</script> |
|
|
EOF; |
|
|
EOF; |
|
|
$post->body = $toc['0'] . $load . '<div class="toc-wrapper" id="toc-wrapper.subpage-'.$post->slug.'" style="display:none;" ><details '. $state .'><summary title="TOC"><span class="details">'. $label .'</span></summary><div class="inner"><div class="toc" id="toc.subpage-'.$post->slug.'"></div></div></details></div><script src="'. site_url().'system/resources/js/toc.js"></script>' . $toc['1']; |
|
|
|
|
|
|
|
|
$post->body = $toc['0'] . '<div class="toc-wrapper" id="toc-wrapper.subpage-'.$post->slug.'" style="display:none;" >'. $load .'<details '. $state .'><summary title="'. $label .'"><span class="details">'. $label .'</span></summary><div class="inner"><div class="toc" id="toc.subpage-'.$post->slug.'"></div></div></details><script src="'. site_url().'system/resources/js/toc.generator.js"></script></div>' . $toc['1']; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (config('views.counter') == 'true') { |
|
|
if (config('views.counter') == 'true') { |
|
|
@ -1011,7 +1011,7 @@ function read_category_info($category) |
|
|
if (isset($toc['1'])) { |
|
|
if (isset($toc['1'])) { |
|
|
$state = config('toc.state'); |
|
|
$state = config('toc.state'); |
|
|
if ($state !== 'open') { |
|
|
if ($state !== 'open') { |
|
|
$state = 'close'; |
|
|
|
|
|
|
|
|
$state = ''; |
|
|
} |
|
|
} |
|
|
$label = config('toc.label'); |
|
|
$label = config('toc.label'); |
|
|
if (empty($label)) { |
|
|
if (empty($label)) { |
|
|
@ -1030,7 +1030,7 @@ function read_category_info($category) |
|
|
}); |
|
|
}); |
|
|
</script> |
|
|
</script> |
|
|
EOF; |
|
|
EOF; |
|
|
$desc->body = $toc['0'] . $load . '<div class="toc-wrapper" id="toc-wrapper.taxonomy-'.$desc->slug.'" style="display:none;" ><details '. $state .'><summary title="TOC"><span class="details">'. $label .'</span></summary><div class="inner"><div class="toc" id="toc.taxonomy-'.$desc->slug.'"></div></div></details></div><script src="'. site_url().'system/resources/js/toc.js"></script>' . $toc['1']; |
|
|
|
|
|
|
|
|
$desc->body = $toc['0'] . '<div class="toc-wrapper" id="toc-wrapper.taxonomy-'.$desc->slug.'" style="display:none;" >'. $load .'<details '. $state .'><summary title="'. $label .'"><span class="details">'. $label .'</span></summary><div class="inner"><div class="toc" id="toc.taxonomy-'.$desc->slug.'"></div></div></details><script src="'. site_url().'system/resources/js/toc.generator.js"></script></div>' . $toc['1']; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$desc->description = get_content_tag("d", $content, get_description($desc->body)); |
|
|
$desc->description = get_content_tag("d", $content, get_description($desc->body)); |
|
|
@ -1264,7 +1264,7 @@ function get_author($name) |
|
|
if (isset($toc['1'])) { |
|
|
if (isset($toc['1'])) { |
|
|
$state = config('toc.state'); |
|
|
$state = config('toc.state'); |
|
|
if ($state !== 'open') { |
|
|
if ($state !== 'open') { |
|
|
$state = 'close'; |
|
|
|
|
|
|
|
|
$state = ''; |
|
|
} |
|
|
} |
|
|
$label = config('toc.label'); |
|
|
$label = config('toc.label'); |
|
|
if (empty($label)) { |
|
|
if (empty($label)) { |
|
|
@ -1283,7 +1283,7 @@ function get_author($name) |
|
|
}); |
|
|
}); |
|
|
</script> |
|
|
</script> |
|
|
EOF; |
|
|
EOF; |
|
|
$author->about = $toc['0'] . $load . '<div class="toc-wrapper" id="toc-wrapper.profile-'.$author->slug.'" style="display:none;" ><details '. $state .'><summary title="TOC"><span class="details">'. $label .'</span></summary><div class="inner"><div class="toc" id="toc.profile-'.$author->slug.'"></div></div></details></div><script src="'. site_url().'system/resources/js/toc.js"></script>' . $toc['1']; |
|
|
|
|
|
|
|
|
$author->about = $toc['0'] . '<div class="toc-wrapper" id="toc-wrapper.profile-'.$author->slug.'" style="display:none;" >'. $load .'<details '. $state .'><summary title="'. $label .'"><span class="details">'. $label .'</span></summary><div class="inner"><div class="toc" id="toc.profile-'.$author->slug.'"></div></div></details><script src="'. site_url().'system/resources/js/toc.generator.js"></script></div>' . $toc['1']; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$author->body = $author->about; |
|
|
$author->body = $author->about; |
|
|
@ -1339,7 +1339,7 @@ function get_frontpage() |
|
|
if (isset($toc['1'])) { |
|
|
if (isset($toc['1'])) { |
|
|
$state = config('toc.state'); |
|
|
$state = config('toc.state'); |
|
|
if ($state !== 'open') { |
|
|
if ($state !== 'open') { |
|
|
$state = 'close'; |
|
|
|
|
|
|
|
|
$state = ''; |
|
|
} |
|
|
} |
|
|
$label = config('toc.label'); |
|
|
$label = config('toc.label'); |
|
|
if (empty($label)) { |
|
|
if (empty($label)) { |
|
|
@ -1358,7 +1358,7 @@ function get_frontpage() |
|
|
}); |
|
|
}); |
|
|
</script> |
|
|
</script> |
|
|
EOF; |
|
|
EOF; |
|
|
$front->body = $toc['0'] . $load . '<div class="toc-wrapper" id="toc-wrapper.page-front" style="display:none;" ><details '. $state .'><summary title="TOC"><span class="details">'. $label .'</span></summary><div class="inner"><div class="toc" id="toc.page-front"></div></div></details></div><script src="'. site_url().'system/resources/js/toc.js"></script>' . $toc['1']; |
|
|
|
|
|
|
|
|
$front->body = $toc['0'] . '<div class="toc-wrapper" id="toc-wrapper.page-front" style="display:none;" >'. $load .'<details '. $state .'><summary title="'. $label .'"><span class="details">'. $label .'</span></summary><div class="inner"><div class="toc" id="toc.page-front"></div></div></details><script src="'. site_url().'system/resources/js/toc.generator.js"></script></div>' . $toc['1']; |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
$front->title = 'Welcome'; |
|
|
$front->title = 'Welcome'; |
|
|
|