Skip to content

Commit

Permalink
Improve the style of #240
Browse files Browse the repository at this point in the history
  • Loading branch information
mnapoli committed Feb 14, 2019
1 parent e27a774 commit cb12819
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion website/template/default.twig
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
$('article h2, article h3, article h4, article h5').each(function () {
var url = document.URL.replace(/#.*$/, "") + '#' + $(this).attr('id');
$(this).prepend(' <a class="anchor inline-block mr-2" href="' + url + '">#</a>');
$(this).prepend(' <a class="title-anchor" href="' + url + '">#</a>');
});
</script>
</body>
Expand Down
16 changes: 16 additions & 0 deletions website/template/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ article p {
margin-top: 16px;
line-height: 24px;
}
article h1, article h2, article h3, article h4, article h5, article h6 {
position: relative;
}
article h1 {
margin-bottom: 40px;
}
Expand All @@ -108,6 +111,19 @@ article h3 {
margin-top: 40px;
margin-bottom: 16px;
}
.title-anchor {
position: absolute;
margin-left: -30px;
color: var(--color-blue-lighter);
margin-top: 1px;
right: 0;
left: 0;
opacity: 0.5;
}
a.title-anchor:hover {
text-decoration: none;
opacity: 0.75;
}
article ul, article ol {
margin-top: 8px;
margin-left: 16px;
Expand Down

0 comments on commit cb12819

Please sign in to comment.