Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Commit dd4fe42

Browse files
travis1111sghung
authored andcommitted
Add grey background to inline code (#171)
Signed-off-by: tiaoyuw <[email protected]>
1 parent 6085bdc commit dd4fe42

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

docs/css/styles.css

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ a {
1111
}
1212
code {
1313
color: #b93370;
14+
background-color: #eff0f1;
1415
}
1516
.main {
1617
margin: auto;

docs/js/docs.js

+16
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,22 @@ $(function() {
2727
window.location.replace($(this).data("url"));
2828
}
2929
});
30+
31+
$('a[href^="#"]').not('.list-group-item').on("click", function(e) {
32+
33+
e.preventDefault();
34+
var id = $($(this).attr('href'));
35+
36+
if (id.length === 0) {
37+
return;
38+
}
39+
40+
var pos = id.offset().top - 131;
41+
42+
// animated top scrolling
43+
$('body, html').animate({scrollTop: pos});
44+
});
45+
3046

3147

3248

0 commit comments

Comments
 (0)