Fix main page visibility for noscript users

The body tag of the home page was previously hidden until the page was
finished loading to prevent a flash of unstyled content, but this broke
functionality for users who disallow javascript. This adds in a new
noscript tag to manually enable visibility of the body element, as well
as automatically displaying the config section (since its visibility is
also typically handled by javascript).
main
Ben Busby 2020-11-03 10:41:29 -05:00
parent 1148a7fb8d
commit f88d1fbb66
1 changed files with 8 additions and 1 deletions

View File

@ -26,6 +26,13 @@
{% if config.dark %} {% if config.dark %}
<link rel="stylesheet" href="static/css/dark-theme.css"/> <link rel="stylesheet" href="static/css/dark-theme.css"/>
{% endif %} {% endif %}
<noscript>
<style>
#main { display: inherit !important; }
.content { max-height: 520px; padding: 18px; border-radius: 10px; }
.collapsible { display: none; }
</style>
</noscript>
<title>Whoogle Search</title> <title>Whoogle Search</title>
</head> </head>
<body id="main" style="display: none; background-color: {{ '#000' if config.dark else '#fff' }}"> <body id="main" style="display: none; background-color: {{ '#000' if config.dark else '#fff' }}">