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") {?>
|
<?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', ''); ?>";
|
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 } ?>
|
<?php } ?>
|
||||||
|
mashiro_option.entry_content_theme = "<?php echo akina_option('entry_content_theme'); ?>";
|
||||||
|
|
||||||
<?php if(akina_option('jsdelivr_cdn_test')){ ?>
|
<?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', ''); ?>";
|
mashiro_option.jsdelivr_css_src = "<?php echo get_template_directory_uri() ?>/cdn/css/lib.css?<?php echo SAKURA_VERSION.akina_option('cookie_version', ''); ?>";
|
||||||
|
@ -81,4 +82,4 @@ mashiro_option.cover_api = "<?php echo $imgurl; ?>";
|
||||||
/*End of Initial Variables*/
|
/*End of Initial Variables*/
|
||||||
</script>
|
</script>
|
||||||
<?php }
|
<?php }
|
||||||
add_action('wp_head', 'font_end_js_control');
|
add_action('wp_head', 'font_end_js_control');
|
||||||
|
|
|
@ -547,7 +547,7 @@ function tableOfContentScroll(flag) {
|
||||||
} else {
|
} else {
|
||||||
if (flag) {
|
if (flag) {
|
||||||
var id = 1,
|
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() {
|
$(".entry-content , .links").children("h1,h2,h3,h4,h5").each(function() {
|
||||||
var hyphenated = "toc-head-" + id;
|
var hyphenated = "toc-head-" + id;
|
||||||
this.id = hyphenated;
|
this.id = hyphenated;
|
||||||
|
|
Loading…
Reference in New Issue