Skip to content

Commit

Permalink
noscript text on welcome page
Browse files Browse the repository at this point in the history
Added a <noscript> elements which hides everything on the welcome page if javascript is not enabled.
It displays a text to tell the user to navigate to /nojs endpoint
  • Loading branch information
juuz0 committed Mar 28, 2023
1 parent 5e4cf98 commit 3d3d695
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions static/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,29 @@
<script type="text/javascript" src="{{root}}/skin/index.js?KIWIXCACHEID" defer></script>
</head>
<body>
<noscript>
<style>
.kiwixNav, .kiwixHomeBody, #feedLink, .kiwixfooter {
display: none;
}
html, body {
height: 100%;
}
.noScriptLinkContainer {
position: absolute;
top: 50%;
left: 50%;
-moz-transform: translateX(-50%) translateY(-50%);
-webkit-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
font-size: 16px;
font-family: roboto;
}
</style>
<div class="noScriptLinkContainer">
<span id="noScriptLinkText">This page cannot be accessed if JavaScript is not enabled. Please head over to <a href="{{root}}/nojs">nojs endpoint.</a></span>
</div>
</noscript>
<div class='kiwixNav'>
<a href="{{root}}/catalog/v2/entries" id="feedLink">
<img src="{{root}}/skin/feed.svg?KIWIXCACHEID"
Expand Down

0 comments on commit 3d3d695

Please sign in to comment.