mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-26 10:11:30 +00:00
The language selector on the welcome page has been replaced with a smaller button that opens a modal language selector. Though the code for introducing such a modal language selector has been added in i18n.js, its appearance relies on styles defined in index.css. Once this new UI for changing the UI language is approved, it must be used in the ZIM viewer too. Known issues: - selecting the language with arrow keys (using the keyboard only, without pressing space first, so that the full list of languages is shown) doesn't work because as soon as the current language is changed the modal language selector disappears.
106 lines
4.7 KiB
HTML
106 lines
4.7 KiB
HTML
<!DOCTYPE html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
<link type="root" href="{{root}}">
|
|
<title>Welcome to Kiwix Server</title>
|
|
<link
|
|
type="text/css"
|
|
href="{{root}}/skin/index.css?KIWIXCACHEID"
|
|
rel="Stylesheet"
|
|
/>
|
|
<link
|
|
rel="alternate"
|
|
type="application/atom+xml"
|
|
title="Library OPDS Feed"
|
|
id="headFeedLink"
|
|
href="{{root}}/catalog/v2/entries"
|
|
/>
|
|
<link rel="apple-touch-icon" sizes="180x180" href="{{root}}/skin/favicon/apple-touch-icon.png?KIWIXCACHEID">
|
|
<link rel="icon" type="image/png" sizes="32x32" href="{{root}}/skin/favicon/favicon-32x32.png?KIWIXCACHEID">
|
|
<link rel="icon" type="image/png" sizes="16x16" href="{{root}}/skin/favicon/favicon-16x16.png?KIWIXCACHEID">
|
|
<link rel="manifest" href="{{root}}/skin/favicon/site.webmanifest?KIWIXCACHEID">
|
|
<link rel="mask-icon" href="{{root}}/skin/favicon/safari-pinned-tab.svg?KIWIXCACHEID" color="#5bbad5">
|
|
<link rel="shortcut icon" href="{{root}}/skin/favicon/favicon.ico?KIWIXCACHEID">
|
|
<meta name="msapplication-TileColor" content="#da532c">
|
|
<meta name="msapplication-config" content="{{root}}/skin/favicon/browserconfig.xml?KIWIXCACHEID">
|
|
<meta name="theme-color" content="#ffffff">
|
|
<style>
|
|
@font-face {
|
|
font-family: "poppins";
|
|
src: url("{{root}}/skin/fonts/Poppins.ttf?KIWIXCACHEID") format("truetype");
|
|
}
|
|
|
|
@font-face {
|
|
font-family: "roboto";
|
|
src: url("{{root}}/skin/fonts/Roboto.ttf?KIWIXCACHEID") format("truetype");
|
|
}
|
|
</style>
|
|
<script type="module" src="{{root}}/skin/i18n.js?KIWIXCACHEID" defer></script>
|
|
<script type="text/javascript" src="{{root}}/skin/languages.js?KIWIXCACHEID" defer></script>
|
|
<script src="{{root}}/skin/isotope.pkgd.min.js?KIWIXCACHEID" defer></script>
|
|
<script src="{{root}}/skin/iso6391To3.js?KIWIXCACHEID"></script>
|
|
<script type="text/javascript" src="{{root}}/skin/index.js?KIWIXCACHEID" defer></script>
|
|
</head>
|
|
<body>
|
|
<a href="{{root}}/catalog/v2/entries" id="feedLink">
|
|
<img src="{{root}}/skin/feed.png?KIWIXCACHEID"
|
|
class="feedLogo"
|
|
id="feedLogo"
|
|
alt="Library OPDS Feed"
|
|
aria-label="Library OPDS Feed"
|
|
title="Library OPDS Feed">
|
|
</a>
|
|
<a onclick="window.modalUILanguageSelector.show()">
|
|
<svg xmlns="http://www.w3.org/2000/svg"
|
|
id="uiLanguageSelectorButton"
|
|
width="30"
|
|
height="30"
|
|
viewBox="0 0 20 20">
|
|
<g fill="#36c">
|
|
<path d="M20 18h-1.44a.61.61 0 0 1-.4-.12.81.81 0 0 1-.23-.31L17 15h-5l-1 2.54a.77.77 0 0 1-.22.3.59.59 0 0 1-.4.14H9l4.55-11.47h1.89zm-3.53-4.31L14.89 9.5a11.62 11.62 0 0 1-.39-1.24q-.09.37-.19.69l-.19.56-1.58 4.19zm-6.3-1.58a13.43 13.43 0 0 1-2.91-1.41 11.46 11.46 0 0 0 2.81-5.37H12V4H7.31a4 4 0 0 0-.2-.56C6.87 2.79 6.6 2 6.6 2l-1.47.5s.4.89.6 1.5H0v1.33h2.15A11.23 11.23 0 0 0 5 10.7a17.19 17.19 0 0 1-5 2.1q.56.82.87 1.38a23.28 23.28 0 0 0 5.22-2.51 15.64 15.64 0 0 0 3.56 1.77zM3.63 5.33h4.91a8.11 8.11 0 0 1-2.45 4.45 9.11 9.11 0 0 1-2.46-4.45z"/>
|
|
</g>
|
|
</svg>
|
|
</a>
|
|
<div class='kiwixNav'>
|
|
<div class="kiwixNav__filters">
|
|
<div class="kiwixNav__select">
|
|
<select name="lang" id="languageFilter" class='kiwixNav__kiwixFilter filter'>
|
|
<option value="" selected>All languages</option>
|
|
</select>
|
|
</div>
|
|
<div class="kiwixNav__select">
|
|
<select name="category" id="categoryFilter" class='kiwixNav__kiwixFilter filter'>
|
|
<option value="" selected>All categories</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<form id='kiwixSearchForm' class='kiwixNav__SearchForm'>
|
|
<input type="text" name="q" placeholder="Search" id="searchFilter" class='kiwixSearch filter'>
|
|
<span class="kiwixButton tagFilterLabel"></span>
|
|
<input type="submit" class="kiwixButton kiwixButtonHover" id="searchButton" value="Search"/>
|
|
</form>
|
|
</div>
|
|
<div class="kiwixHomeBody">
|
|
<div class="book__list">
|
|
<h3 class="kiwixHomeBody__results"></h3>
|
|
</div>
|
|
<div id="fadeOut" class="fadeOut"></div>
|
|
</div>
|
|
<div class="loader" style="position: absolute; top: 50%"><div class="loader-spinner"></div></div>
|
|
<div id="kiwixfooter" class="kiwixfooter">Powered by <a href="https://kiwix.org">Kiwix</a></div>
|
|
</body>
|
|
<script>
|
|
function closeModal() {
|
|
for(modal of document.getElementsByClassName('modal-wrapper')) {
|
|
if ( modal.id == "uiLanguageSelector" ) {
|
|
window.modalUILanguageSelector.close();
|
|
} else {
|
|
modal.remove();
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</html>
|