diff --git a/www/css/app.css b/www/css/app.css
index f5f44abf..676f270a 100644
--- a/www/css/app.css
+++ b/www/css/app.css
@@ -383,19 +383,145 @@ pre {
margin-bottom: 15% !important;
}
-@media (max-width: 768px) {
- /*Increase touchability of bottom buttons*/
- footer .btn-default {
- font-size: 120% !important;
+ /*********************************/
+ /******* Custom checkboxes *******/
+/*********************************/
+
+/* Hide the browser's default checkbox */
+.container input[type=checkbox], .container input[type=radio] {
+ position: absolute;
+ opacity: 0;
+ cursor: pointer;
+ height: 0;
+ width: 0;
+}
+
+/* Create a custom checkbox */
+.checkmark {
+ position: absolute;
+ top: 0;
+ left: -25px;
+ height: 20px;
+ width: 20px;
+ background-color: #eee;
+ border: 2px solid #0078d7;
+}
+
+.panel-warning .checkmark, .panel-warning .radiobtn {
+ border-color: darkkhaki;
+}
+
+.panel-danger .checkmark, .panel-danger .radiobtn {
+ border-color: #a94442;
+}
+
+.dark .checkmark, .dark .radiobtn {
+ border-color: darkslategray;
+}
+
+/* On mouse-over, add a grey background color */
+.checkbox:hover input ~ .checkmark {
+ background-color: #ccc;
+}
+
+.dark .panel-warning .checkmark, .dark .panel-warning .radiobtn {
+ border-color: #808000;
+}
+
+.dark .panel-danger .checkmark, .dark .panel-danger .radiobtn {
+ border-color: #800000;
+}
+
+/* When the checkbox is checked, add a blue background */
+.container input:checked ~ .checkmark, .container input:indeterminate ~ .checkmark, .container input:checked ~ .radiobtn {
+ background-color: steelblue;
+}
+
+.dark .container input:checked ~ .checkmark, .dark .container input:indeterminate ~ .checkmark, .dark .container input:checked ~ .radiobtn {
+ background-color: #12303b;
+}
+
+.panel-warning input:checked ~ .checkmark, .panel-warning input:checked ~ .radiobtn {
+ background-color: darkkhaki;
+}
+
+.dark .panel-warning input:checked ~ .checkmark, .dark .panel-warning input:checked ~ .radiobtn {
+ background-color: #4d4d00;
+}
+
+.panel-danger input:checked ~ .checkmark, .panel-danger input:checked ~ .radiobtn {
+ background-color: #a94442;
+}
+
+.dark .panel-danger input:checked ~ .checkmark, .dark .panel-danger input:checked ~ .radiobtn {
+ background-color: #4d0000;
+}
+
+/* Style the checkmark/indicator */
+.container input:checked ~ .checkmark:after {
+ content: "";
+ position: absolute;
+ left: 6px;
+ top: 2px;
+ width: 5px;
+ height: 10px;
+ border: solid white;
+ border-width: 0 3px 3px 0;
+ transform: rotate(45deg);
+}
+
+.container input:indeterminate ~ .checkmark:after {
+ content: "";
+ position: absolute;
+ top: 30%;
+ left: 30%;
+ width: 40%;
+ height: 40%;
+ background: white;
+}
+
+/* Create a custom radio button */
+.radiobtn {
+ position: absolute;
+ top: 0;
+ left: -25px;
+ height: 20px;
+ width: 20px;
+ background-color: #eee;
+ border-radius: 50%;
+ border: 2px solid #0078d7;
+}
+
+/* On mouse-over, add a grey background color */
+.radio:hover input ~ .radiobtn {
+ background-color: #ccc;
+}
+
+/* Style the indicator (dot/circle) */
+ .container input:checked ~ .radiobtn:after {
+ content: "";
+ position: absolute;
+ top: 4px;
+ left: 4px;
+ width: 8px;
+ height: 8px;
+ border-radius: 50%;
+ background: white;
}
- /* Pour réduire la taille du menu en haut */
- .navbar {
- min-height: 20px !important;
- margin-bottom: 1px !important;
- }
- /*.navbar-brand, .navbar-nav a { /* GK added navbar-nav a*/
- /*padding-top: 2px !important;
+ @media (max-width: 768px) {
+ /*Increase touchability of bottom buttons*/
+ footer .btn-default {
+ font-size: 120% !important;
+ }
+
+ /* Pour réduire la taille du menu en haut */
+ .navbar {
+ min-height: 20px !important;
+ margin-bottom: 1px !important;
+ }
+ /*.navbar-brand, .navbar-nav a { /* GK added navbar-nav a*/
+ /*padding-top: 2px !important;
padding-bottom: 1px !important;
height: 25px !important;
}
@@ -404,49 +530,49 @@ pre {
padding-bottom: 15px !important;
}*/
- .navbar-toggle {
- padding-top: 2px !important;
- padding-bottom: 2px !important;
- margin-top: 2px !important;
- margin-bottom: 0px !important;
- background-color: lightgray !important;
- }
- /* Pour réduire la taille des éléments et boutons dans l'aréa de navégation - GK
+ .navbar-toggle {
+ padding-top: 2px !important;
+ padding-bottom: 2px !important;
+ margin-top: 2px !important;
+ margin-bottom: 0px !important;
+ background-color: lightgray !important;
+ }
+ /* Pour réduire la taille des éléments et boutons dans l'aréa de navégation - GK
.navbar-nav, .navbar-nav > li {
padding-top: 2px !important;
padding-bottom: 2px !important;
margin-top: 2px !important;
margin-bottom: 0px !important;
} */
- .navbar-nav {
- margin-top: 0 !important;
- margin-bottom: 0 !important;
- }
- /*Make sure these align correctly rather than stacking at full width - GK*/
- .navbar-nav > li > a {
- /*float: left !important;*/
- /*Added this to prevent the buttons becoming so small*/
- padding-top: 15px !important;
+ .navbar-nav {
+ margin-top: 0 !important;
+ margin-bottom: 0 !important;
}
+ /*Make sure these align correctly rather than stacking at full width - GK*/
+ .navbar-nav > li > a {
+ /*float: left !important;*/
+ /*Added this to prevent the buttons becoming so small*/
+ padding-top: 15px !important;
+ }
- /*.col-md-offset-1 {
+ /*.col-md-offset-1 {
padding-left: 5px !important;
}
[role=region] > header {
margin-bottom: 10px !important;
}*/
- /* Pour supprimer l'espace entre la zone de recherche et l'iframe
+ /* Pour supprimer l'espace entre la zone de recherche et l'iframe
.list-group {
margin-bottom: 0 !important;
} */
- /* Pour réduire la taille du champ de recherche
+ /* Pour réduire la taille du champ de recherche
.form-control {
height: 28px !important;
padding-bottom: 5px !important;
} */
- /*.dropdown-menu {
+ /*.dropdown-menu {
font-size: 20px !important;
}
@@ -458,15 +584,16 @@ pre {
.btn-xs, .btn-sm, .btn-default, .btn-group-xs > .btn, .btn-group-sm > .btn {
font-size: 10px !important;
}*/
- /* Pour réduire la taille des boutons en bas de l'écran
+ /* Pour réduire la taille des boutons en bas de l'écran
.btn-lg, .btn-group-lg > .btn {
padding-top: 1px !important;
padding-bottom: 1px !important;
font-size: 16px !important;
}*/
-}
-@media (max-width: 440px) {
- /*.btn-primary {
+ }
+
+ @media (max-width: 440px) {
+ /*.btn-primary {
font-size: 12px !important;
}
.input-group-btn {
@@ -475,4 +602,4 @@ pre {
#btnHome {
float: left;
}*/
-}
\ No newline at end of file
+ }
\ No newline at end of file
diff --git a/www/index.html b/www/index.html
index e8174f60..4d5ea77a 100644
--- a/www/index.html
+++ b/www/index.html
@@ -478,16 +478,19 @@
Dark mode:
-
@@ -497,19 +500,23 @@
+
Select style automatically (recommended: matches the ZIM style)
+
Use Wikimedia desktop style (and transform if necessary)
+
Use Wikimedia mobile style (and transform if necessary)
-
+
- Remove max page width restriction: (useful for recent Wikipedia archives)
+
+ Remove max page width restriction: [ ] (useful for recent Wikipedia archives)
@@ -518,6 +525,7 @@
+
Hide top toolbar while scrolling (tap once to reveal)
@@ -528,27 +536,31 @@
+
Use locally cached display styles (recommended for Wikipedia ZIM)
+
Display images if any (if hidden, tap the blue area to display one-by-one)
- Permanently hide warning about active content (only hide if you know how to access the Archive Index [Hint: type a space in the search box])
+
+ Permanently hide active content warning (for experienced users)
Start character of alphabet:
-
+
(use capital letters if they exist in your locale) End character of alphabet:
-
+
(these are used to set appropriate alphabet for the Archive Index)
- Allow opening articles in a separate browser tab (slightly increases app's memory usage)
+
+ Allow opening articles in a separate browser tab (slightly increases app's memory usage)
@@ -565,6 +577,7 @@
+
Reopen last-visited page on next app launch
@@ -581,6 +594,7 @@
+
Display selectors for files and folders : This is for downloading Wikivoyage in other languages. If you wish to open different ZIM files (e.g. Wikipedia), you should instead download Kiwix JS from the Store
@@ -590,10 +604,12 @@
+
Typeset TeX equations with MathJax (recommended: very fast, but not all symbols supported in all languages; will use SVG fallbacks if TeX string not available)
+
Use SVG fallback images (very slow and memory hungry, but will dislplay all symbols)
@@ -603,10 +619,12 @@
+
JQuery (slow and memory hungry, but safer)
+
ServiceWorker (faster but unstable, and not supported by all platforms)
diff --git a/www/js/app.js b/www/js/app.js
index b3384058..411fa0b6 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -778,8 +778,11 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'q', 'module'
if (params.cssTheme == 'auto') document.getElementById('darkInvert').style.display = cssUIThemeGetOrSet('auto', true) == 'light' ? 'none' : 'inline';
document.getElementById('cssUIDarkThemeCheck').addEventListener('click', function () {
//This code implements a tri-state checkbox
- if (this.readOnly) { this.checked = true; this.readOnly = false; }
- else if (this.checked) this.readOnly = this.indeterminate = true;
+ if (this.readOnly) this.checked = this.readOnly = false;
+ else if (!this.checked) this.readOnly = this.indeterminate = true;
+ //Code below shows how to invert the order
+ //if (this.readOnly) { this.checked = true; this.readOnly = false; }
+ //else if (this.checked) this.readOnly = this.indeterminate = true;
params.cssUITheme = this.indeterminate ? "auto" : this.checked ? 'dark' : 'light';
if (!uiSettings) initializeUISettings();
cookies.setItem('cssUITheme', params.cssUITheme, Infinity);
@@ -789,8 +792,8 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'q', 'module'
if (params.cssUITheme != params.cssTheme) $('#cssWikiDarkThemeCheck').click();
});
document.getElementById('cssWikiDarkThemeCheck').addEventListener('click', function () {
- if (this.readOnly) { this.checked = true; this.readOnly = false; }
- else if (this.checked) this.readOnly = this.indeterminate = true;
+ if (this.readOnly) this.checked = this.readOnly = false;
+ else if (!this.checked) this.readOnly = this.indeterminate = true;
params.cssTheme = this.indeterminate ? "auto" : this.checked ? 'dark' : 'light';
if (!uiSettings) initializeUISettings();
var determinedValue = params.cssTheme;
@@ -877,15 +880,16 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'q', 'module'
}
}
var determinedWikiTheme = params.cssTheme == 'auto' ? cssUIThemeGetOrSet('auto', true) : params.cssTheme;
+ var breakoutLink = doc.getElementById('breakoutLink');
if (determinedWikiTheme != "light") {
var link = doc.createElement("link");
link.setAttribute("rel", "stylesheet");
link.setAttribute("type", "text/css");
link.setAttribute("href", determinedWikiTheme == "dark" ? treePath + "-/s/style-dark.css" : treePath + "-/s/style-dark-invert.css");
doc.head.appendChild(link);
- doc.getElementById('breakoutLink').src = treePath + 'img/icons/new_window_lb.svg';
+ if (breakoutLink) breakoutLink.src = treePath + 'img/icons/new_window_lb.svg';
} else {
- doc.getElementById('breakoutLink').src = treePath + 'img/icons/new_window.svg';
+ if (breakoutLink) breakoutLink.src = treePath + 'img/icons/new_window.svg';
}
document.getElementById('darkInvert').style.display = determinedWikiTheme == 'light' ? 'none' : 'inline';
}
@@ -915,7 +919,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'q', 'module'
if (this.readOnly) this.checked = this.readOnly = false;
else if (!this.checked) this.readOnly = this.indeterminate = true;
params.removePageMaxWidth = this.indeterminate ? "auto" : this.checked;
- document.getElementById('pageMaxWidthState').innerHTML = (params.removePageMaxWidth == "auto" ? "[auto]" : params.removePageMaxWidth ? "[always]" : "[never]") + " ";
+ document.getElementById('pageMaxWidthState').innerHTML = (params.removePageMaxWidth == "auto" ? "auto" : params.removePageMaxWidth ? "always" : "never");
cookies.setItem('removePageMaxWidth', params.removePageMaxWidth, Infinity);
removePageMaxWidth();
});
diff --git a/www/js/init.js b/www/js/init.js
index 4f1b8703..d89fd34f 100644
--- a/www/js/init.js
+++ b/www/js/init.js
@@ -82,9 +82,9 @@ if (getCookie('lastPageLoad') == 'failed') {
document.getElementById('cssCacheModeCheck').checked = params.cssCache;
document.getElementById('imageDisplayModeCheck').checked = params.imageDisplay;
document.getElementById('removePageMaxWidthCheck').checked = params.removePageMaxWidth === true; // Will be false if false or auto
-document.getElementById('removePageMaxWidthCheck').indeterminate = params.removePageMaxWidth == "auto" ? true : false;
-document.getElementById('removePageMaxWidthCheck').readOnly = params.removePageMaxWidth == "auto" ? true : false;
-document.getElementById('pageMaxWidthState').innerHTML = (params.removePageMaxWidth == "auto" ? "[auto]" : params.removePageMaxWidth ? "[true]" : "[false]");
+document.getElementById('removePageMaxWidthCheck').indeterminate = params.removePageMaxWidth == "auto";
+document.getElementById('removePageMaxWidthCheck').readOnly = params.removePageMaxWidth == "auto";
+document.getElementById('pageMaxWidthState').innerHTML = (params.removePageMaxWidth == "auto" ? "auto" : params.removePageMaxWidth ? "always" : "never");
document.getElementById('hideToolbarCheck').checked = params.hideToolbar;
document.getElementById('cssUIDarkThemeCheck').checked = params.cssUITheme == "dark"; // Will be true, or false if light or auto
document.getElementById('cssUIDarkThemeCheck').indeterminate = params.cssUITheme == "auto";