Skip to content
Snippets Groups Projects
Verified Commit 1c2755a4 authored by tribut's avatar tribut :man_dancing:
Browse files

Hide non-functional language switcher when javascript is disabled

parent e24a3eef
No related branches found
No related tags found
1 merge request!1Add dark mode
...@@ -182,6 +182,9 @@ ...@@ -182,6 +182,9 @@
text-align: right; text-align: right;
margin-top: 1rem; margin-top: 1rem;
} }
body.noscript .language-selection {
display: none;
}
.language-selection > * { .language-selection > * {
margin-left: 0.5em; margin-left: 0.5em;
} }
...@@ -239,7 +242,7 @@ ...@@ -239,7 +242,7 @@
} }
</style> </style>
</head> </head>
<body lang="en"> <body lang="en" class="noscript">
<div class="page"> <div class="page">
<nav> <nav>
<div class="wrapper language-selection"> <div class="wrapper language-selection">
...@@ -347,6 +350,8 @@ ...@@ -347,6 +350,8 @@
<script type="text/javascript" defer> <script type="text/javascript" defer>
(function () { (function () {
document.body.classList.remove("noscript");
// In page navigation - for language switching // In page navigation - for language switching
document.body.addEventListener('click', function (ev) { document.body.addEventListener('click', function (ev) {
if (!ev.target.href) return; if (!ev.target.href) return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment