Skip to content

Commit

Permalink
Update default.html
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-pratik-k authored Nov 12, 2024
1 parent 198ff3d commit 5564cb4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h1>{{ site.title }}</h1>
function getQueryParams() {
const params = new URLSearchParams(window.location.search);
return {
bgColor: params.get('bgColor') || '#ffffff', // Default background color
bgColor: params.get('bgColor') || '#24292E', // Default background color
textColor: params.get('textColor') || '#000000' // Default text color
};
}
Expand All @@ -31,11 +31,8 @@ <h1>{{ site.title }}</h1>
const { bgColor, textColor } = getQueryParams();
const body = document.getElementById('customBody');

console.log('bgColor:', bgColor); // Debug log
console.log('textColor:', textColor); // Debug log

body.style.setProperty('background-color', bgColor, 'important');
body.style.setProperty('color', textColor, 'important');
body.style.backgroundColor = bgColor;
body.style.color = textColor;
});

anchors.add();
Expand Down

0 comments on commit 5564cb4

Please sign in to comment.