From 1c2755a430bd99828a2d5a9e68089eb703439a4d Mon Sep 17 00:00:00 2001 From: Felix Eckhofer <felix@eckhofer.com> Date: Thu, 9 Jan 2025 16:42:11 +0100 Subject: [PATCH] Hide non-functional language switcher when javascript is disabled --- index.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 730cc4c..2136527 100644 --- a/index.html +++ b/index.html @@ -182,6 +182,9 @@ text-align: right; margin-top: 1rem; } + body.noscript .language-selection { + display: none; + } .language-selection > * { margin-left: 0.5em; } @@ -239,7 +242,7 @@ } </style> </head> - <body lang="en"> + <body lang="en" class="noscript"> <div class="page"> <nav> <div class="wrapper language-selection"> @@ -347,6 +350,8 @@ <script type="text/javascript" defer> (function () { + document.body.classList.remove("noscript"); + // In page navigation - for language switching document.body.addEventListener('click', function (ev) { if (!ev.target.href) return; -- GitLab