Skip to content

Commit 74b0b24

Browse files
author
saowang
committed
Change anchor to header right
1 parent 7e6bf77 commit 74b0b24

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

_sass/class/markdown-body.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,12 @@
5050
}
5151

5252
.anchor {
53+
// overwrite
54+
float: none;
5355
padding-right: 0;
54-
margin-left: -15px;
56+
margin-left: 3px;
5557
}
58+
5659
.highlight pre,
5760
pre {
5861
font-size: $font-size-small;

assets/js/theme.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ $(".toc ul")
267267
link.prepend(expand);
268268
});
269269

270-
$(".markdown-body :header").prepend(function () {
270+
$(".markdown-body :header").append(function () {
271271
return `<a href="#${this.id}" class="anchor"><i class="octicon-link fa fa-link text-blue"></i></a>`;
272272
});
273273

0 commit comments

Comments
 (0)