diff --git a/src/theme/book.css b/src/theme/book.css index 93d4c9f0..c73eb4a0 100644 --- a/src/theme/book.css +++ b/src/theme/book.css @@ -315,7 +315,7 @@ h3 { .light .mobile-nav-chapters { background-color: #fafafa; } -.light .content a { +.light .content a:link { color: #4183c4; } .light .theme-popup { @@ -371,7 +371,7 @@ h3 { .coal .mobile-nav-chapters { background-color: #292c2f; } -.coal .content a { +.coal .content a:link { color: #2b79a2; } .coal .theme-popup { @@ -427,7 +427,7 @@ h3 { .navy .mobile-nav-chapters { background-color: #282d3f; } -.navy .content a { +.navy .content a:link { color: #2b79a2; } .navy .theme-popup { @@ -483,7 +483,7 @@ h3 { .rust .mobile-nav-chapters { background-color: #3b2e2a; } -.rust .content a { +.rust .content a:link { color: #2b79a2; } .rust .theme-popup { diff --git a/src/theme/book.js b/src/theme/book.js index b07c9929..3a7ce712 100644 --- a/src/theme/book.js +++ b/src/theme/book.js @@ -28,6 +28,15 @@ $( document ).ready(function() { var html = $("html"); var sidebar = $("#sidebar"); var page_wrapper = $("#page-wrapper"); + var content = $("#content"); + + + // Add anchors for all content headers + content.find("h1, h2, h3, h4, h5").wrap(function(){ + var wrapper = $(""); + wrapper.attr("name", $(this).text()); + return wrapper; + }); // Toggle sidebar diff --git a/src/theme/stylus/themes/base.styl b/src/theme/stylus/themes/base.styl index e222fe4a..b9a6d893 100644 --- a/src/theme/stylus/themes/base.styl +++ b/src/theme/stylus/themes/base.styl @@ -51,7 +51,7 @@ background-color: $sidebar-bg } - .content a { + .content a:link { color: $links }