hugo-bearblog : add comment for stylesheet, script

This commit is contained in:
minoplhy 2024-03-14 14:08:35 +07:00
parent 0ee42d6223
commit 324a1e12a3
Signed by: minoplhy
GPG Key ID: 41D406044E2434BF
4 changed files with 4 additions and 0 deletions

View File

@ -134,6 +134,7 @@ ul.blog-posts li a:visited {
color: #ddd;
}
/* Dark Mode */
.dark-mode h1,
.dark-mode h2,
.dark-mode h3,

View File

@ -1,3 +1,4 @@
/* Main darkmode script here */
function darkmode() {
if (localStorage.getItem('dark-mode') === 'false') {
darkmode_enable();

View File

@ -1 +1,2 @@
/* initialize onclick here because the main point is to avoid inline scripts and stylesheets */
document.getElementById("dark-mode-button").addEventListener("click", darkmode);

View File

@ -1,3 +1,4 @@
/* random text color on blog listing */
const links = document.querySelectorAll('.random-color');
// To avoid too bright and too dark color being generated