some styles fixes

This commit is contained in:
Mivinci 2021-11-06 15:28:56 +08:00
parent 1e8d1ff994
commit 991bc2f116
6 changed files with 36 additions and 8 deletions

View file

@ -1,6 +1,9 @@
// This file contains some codes to fix style of elements under `.md`
// fix style of checkboxes in posts.
document.querySelectorAll('.md ul').forEach(v => {
if (/<li><input .+>.+<\/li>/.test(v.innerHTML)) {
v.classList.add('ul-checkbox');
}
});
});
// use custom font family
document.querySelector('body').style.setProperty('--global-font-family', '{{ .Site.Params.globalFontFamily }}');