hugo-theme-terminal/static/assets/languageSelector.js
quest 26ad260858
Numerous improvements and bug fixes.
- Refactored themes to always load with just a single file. This avoids
  a round trip on each request.
- Locally load font when available on the system, then try to
  load the woff2 file, then fall back to regular woff.
- Update markup to use relative urls where it is safe. RSS feeds still
  use absolute URLs.
- Only set og:image:(height/width) when using the standard color icon.
- Fixed styles on the pagination buttons.
- Added ability to switch font to Source Code Pro (useSourceCodePro).
- Added yellow theme.
- Added grey theme.
- Bold and remove underline for active page in header.
- Removed markdownify on summary.
- Only display date if present.
2022-09-12 16:26:31 -10:00

1 line
467 B
JavaScript

!function(){var e=getComputedStyle(document.body).getPropertyValue("--phoneWidth"),t=function(){return window.matchMedia(e).matches},n=document.querySelector(".language-selector-current"),o=document.querySelector(".language-selector__more");document.body.addEventListener("click",(function(){t()||!o||o.classList.contains("hidden")||o.classList.add("hidden")})),n&&n.addEventListener("click",(function(e){t()||(e.stopPropagation(),o.classList.toggle("hidden"))}))}();