DF theme: fix flickering at tx page

pull/3333/head
Victor Baranov 4 years ago
parent eacb4c4888
commit d58b3fa55d
  1. 4
      apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex
  2. 2
      apps/block_scout_web/lib/block_scout_web/templates/transaction/overview.html.eex

@ -69,8 +69,8 @@
@view_module == Elixir.BlockScoutWeb.TransactionTokenTransferView @view_module == Elixir.BlockScoutWeb.TransactionTokenTransferView
) -> %> ) -> %>
<script> <script>
if (document.getElementsByTagName("body")[0]) { if (document.getElementsByClassName("layout-container")[0]) {
document.getElementsByTagName("body")[0].style.visibility = "hidden"; document.getElementsByClassName("layout-container")[0].style.visibility = "hidden";
} }
</script> </script>
<% true -> %> <% true -> %>

@ -14,7 +14,7 @@
document.documentElement.className += " " + "dark-forest-theme-applied"; document.documentElement.className += " " + "dark-forest-theme-applied";
return; return;
} }
document.getElementsByTagName("body")[0].style.visibility = "visible"; document.getElementsByClassName("layout-container")[0].style.visibility = "visible";
}) })
} }
window.onload = applyCustomMode() window.onload = applyCustomMode()

Loading…
Cancel
Save