fix toc of github-style
This commit is contained in:
parent
911ddefb3d
commit
55250f8e28
|
@ -60,6 +60,7 @@ mashiro_option.entry_content_theme_src = "<?php echo get_template_directory_uri(
|
|||
<?php }elseif(akina_option('entry_content_theme') == "github") {?>
|
||||
mashiro_option.entry_content_theme_src = "<?php echo get_template_directory_uri() ?>/cdn/theme/github.css?<?php echo SAKURA_VERSION.akina_option('cookie_version', ''); ?>";
|
||||
<?php } ?>
|
||||
mashiro_option.entry_content_theme = "<?php echo akina_option('entry_content_theme'); ?>";
|
||||
|
||||
<?php if(akina_option('jsdelivr_cdn_test')){ ?>
|
||||
mashiro_option.jsdelivr_css_src = "<?php echo get_template_directory_uri() ?>/cdn/css/lib.css?<?php echo SAKURA_VERSION.akina_option('cookie_version', ''); ?>";
|
||||
|
|
|
@ -547,7 +547,7 @@ function tableOfContentScroll(flag) {
|
|||
} else {
|
||||
if (flag) {
|
||||
var id = 1,
|
||||
heading_fix=$("article").hasClass("type-post") ? $("div").hasClass("pattern-attachment-img") ? -75 : 200 : 375;
|
||||
heading_fix = mashiro_option.entry_content_theme == "sakura" ? $("article").hasClass("type-post") ? $("div").hasClass("pattern-attachment-img") ? -75 : 200 : 375 : window.innerHeight / 2;
|
||||
$(".entry-content , .links").children("h1,h2,h3,h4,h5").each(function() {
|
||||
var hyphenated = "toc-head-" + id;
|
||||
this.id = hyphenated;
|
||||
|
|
Loading…
Reference in New Issue