mirror of https://github.com/vapor/docs.git
add highlight
This commit is contained in:
parent
767e17facb
commit
43ab774121
|
|
@ -72,6 +72,17 @@
|
|||
if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) {
|
||||
$('body').addClass('safari');
|
||||
}
|
||||
|
||||
$('h1, h2, h3, h4, h5, h6').each(function(key, item) {
|
||||
var $item = $(item);
|
||||
var id = $item.attr('id');
|
||||
if (id) {
|
||||
var link = $('<a>');
|
||||
link.attr('href', '#' + id);
|
||||
console.log(link)
|
||||
$item.wrap(link);
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,10 @@ h1, h2, h3, h4, h5, h6 {
|
|||
letter-spacing: -1px;
|
||||
}
|
||||
|
||||
:target {
|
||||
background: #ffff99;
|
||||
}
|
||||
|
||||
a.logo {
|
||||
display: block;
|
||||
position: relative;
|
||||
|
|
|
|||
Loading…
Reference in New Issue