add highlight

This commit is contained in:
Tanner Nelson 2016-08-05 16:44:33 -04:00
parent 767e17facb
commit 43ab774121
No known key found for this signature in database
GPG Key ID: 9C24375C64856B76
2 changed files with 15 additions and 0 deletions

View File

@ -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>

View File

@ -42,6 +42,10 @@ h1, h2, h3, h4, h5, h6 {
letter-spacing: -1px;
}
:target {
background: #ffff99;
}
a.logo {
display: block;
position: relative;