diff --git a/memberships/static/js/main.js b/memberships/static/js/main.js index b3d8e7e1..aa8ca2ea 100644 --- a/memberships/static/js/main.js +++ b/memberships/static/js/main.js @@ -12,6 +12,8 @@ function checkDarkMode() { default: if (window.matchMedia("(prefers-color-scheme: dark)").matches) document.documentElement.classList.add("dark"); + else + document.documentElement.classList.remove("dark"); } } @@ -50,6 +52,14 @@ function hideHelpText(popover) { classList.add("opacity-0", "animate-fade-out"); } +// stop displaying popover if opacity is 0 +function hideIfTransparent(popover) { + let classList = popover.classList; + + if (classList.contains('opacity-0')) + classList.add('hidden'); +} + // check if an element is offscreen to the right and translate if necessary function correctOffscreenRight(element) { let rootFontSize = parseFloat(getComputedStyle(document.documentElement).fontSize); diff --git a/memberships/templates/base.html b/memberships/templates/base.html index f90e3ee8..d2a19357 100644 --- a/memberships/templates/base.html +++ b/memberships/templates/base.html @@ -1,6 +1,6 @@ {% load static %} - + @@ -44,7 +44,7 @@ Wiki -
+ {% if user.is_authenticated %}
  • @@ -75,11 +75,16 @@