Skip to content

Commit

Permalink
fix: blink on dark theme
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarcia360 committed Oct 15, 2024
1 parent f7c26b4 commit d137a49
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sphinx_scylladb_theme/layout.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{# layout.html #}

<!DOCTYPE html>
<html class="no-js" lang="en">
<html class="no-js" lang="en" style="visibility: hidden;">
{% macro script() %}
<script type="text/javascript" src="{{ pathto('_static/js/runtime.bundle.js', 1) }}"></script>
<script type="text/javascript" src="{{ pathto('_static/js/main.bundle.js', 1) }}"></script>
Expand Down
2 changes: 1 addition & 1 deletion sphinx_scylladb_theme/static/css/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sphinx_scylladb_theme/static/js/main.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/js/dark-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export class DarkTheme {
let rootDocumentEl = $("html");
let darkThemeTogglerEl = $(".dark-theme-toggler");


const toggler = (state) => {
if (state) {
rootDocumentEl.addClass('dark')
Expand All @@ -17,6 +16,7 @@ export class DarkTheme {

toggler(state);

rootDocumentEl.css("visibility","");

darkThemeTogglerEl.on('click', () => {
state = !state;
Expand Down

0 comments on commit d137a49

Please sign in to comment.