diff --git a/_layouts/default.html b/_layouts/default.html index 65952e5..db94380 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -55,20 +55,7 @@ layout: compress {% if page.layout == "posts" %} - + {% endif %}
diff --git a/assets/js/custom.js b/assets/js/custom.js new file mode 100644 index 0000000..468fed6 --- /dev/null +++ b/assets/js/custom.js @@ -0,0 +1,12 @@ +window.onload = () => { + let commit = document.querySelector("#commit-id > a"); + if (commit != null) { + let colorCode = commit.innerHTML.trim().substring(1, 7); + commit.addEventListener('mouseover', function handler() { + commit.style.color = `#${colorCode}`; + }) + commit.addEventListener('mouseout', function handler() { + commit.style.color = ''; + }) + } +} \ No newline at end of file