mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00
added welcome page + help page + integrated
This commit is contained in:
parent
484ddb7da1
commit
6f5256b56b
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@ -2,12 +2,12 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Welcome to Kiwix!</title>
|
||||
<title>Kiwix Help</title>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="bootstrap/css/bootstrap.css" rel="stylesheet">
|
||||
<link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
||||
<link href="welcome.css" rel="stylesheet">
|
||||
<link href="file:///android_asset/www/bootstrap/css/bootstrap.css" rel="stylesheet">
|
||||
<link href="file:///android_asset/www/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
||||
<link href="file:///android_asset/www/static.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body class="help" lang="en-US">
|
||||
@ -41,11 +41,6 @@
|
||||
<div id="contents"></div>
|
||||
</section>
|
||||
|
||||
<section id="how-to-download">
|
||||
<h2>How do I download?</h2>
|
||||
|
||||
</section>
|
||||
|
||||
<section id="can-wikipedia">
|
||||
<h2>Can I download from Wikipedia directly?</h2>
|
||||
<p>Yes! You can create a <em>book</em> while browsing Wikipedia and add as many article to this <em>book</em>. Once done, you can download the book as an <em>OpenZIM file</em>. This file can be opened by Kiwix.</p>
|
||||
@ -59,8 +54,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="jquery.js"></script>
|
||||
<script src="js/bootstrap.min.js"></script>
|
||||
<script src="file:///android_asset/www/jquery.js"></script>
|
||||
<script src="file:///android_asset/www/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var loaded = false;
|
||||
function loadcontent() {
|
||||
|
@ -5,9 +5,9 @@
|
||||
<title>Welcome to Kiwix!</title>
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link href="bootstrap/css/bootstrap.css" rel="stylesheet">
|
||||
<link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
||||
<link href="welcome.css" rel="stylesheet">
|
||||
<link href="file:///android_asset/www/bootstrap/css/bootstrap.css" rel="stylesheet">
|
||||
<link href="file:///android_asset/www/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
|
||||
<link href="file:///android_asset/www/static.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body class="welcome" lang="en-US">
|
||||
@ -25,19 +25,19 @@
|
||||
|
||||
<section id="step2">
|
||||
<h2><span>2.</span> Take a drink break!</h2>
|
||||
<img class="media-object" data-src="holder.js/64x64" src="coffee.png">
|
||||
<img src="coffee.png">
|
||||
<p>Downloads can take a long time, go mind your regular business and come back once done.</p>
|
||||
</section>
|
||||
|
||||
<section id="step3">
|
||||
<h2><span>3.</span> Open the file up-here!</h2>
|
||||
<h2><span>3.</span> Open the file up-there!</h2>
|
||||
<p>Click the <span><a href="content://org.kiwix.ui/selectzimfile">Open File</a></span> button in the toolbar up there and select the ZIM file you downloaded. <strong>That's It!</strong></p>
|
||||
<p>Now, Enjoy your content, and take a look at the <a href="help.html">Help Page</a> once bored.</p>
|
||||
<p>Now, Enjoy your content, and take a look at the <a href="content://org.kiwix.ui/gotohelp">Help</a> Page once bored.</p>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="jquery.js"></script>
|
||||
<script src="js/bootstrap.min.js"></script>
|
||||
<script src="file:///android_asset/www/jquery.js"></script>
|
||||
<script src="file:///android_asset/www/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -196,6 +196,8 @@ public class KiwixMobileActivity extends Activity {
|
||||
// To handle links which access user interface (i.p. used in help page)
|
||||
if (url.equals(ZimContentProvider.UI_URI.toString()+"selectzimfile")) {
|
||||
selectZimFile();
|
||||
} else if (url.equals(ZimContentProvider.UI_URI.toString()+"gotohelp")) {
|
||||
showHelp();
|
||||
} else {
|
||||
Log.e("kiwix", "UI Url "+url+ " not supported.");
|
||||
}
|
||||
@ -262,7 +264,7 @@ public class KiwixMobileActivity extends Activity {
|
||||
// fits better normal android behavior if after closing app ("back" button) state is not maintained.
|
||||
} else {
|
||||
Log.d("kiwix", " Kiwix normal start, no zimfile loaded last time -> display welcome page");
|
||||
showHelp();
|
||||
showWelcome();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -397,12 +399,16 @@ public class KiwixMobileActivity extends Activity {
|
||||
return stream.toString();
|
||||
}
|
||||
|
||||
private void showWelcome() {
|
||||
webView.loadUrl("file:///android_res/raw/welcome.html");
|
||||
}
|
||||
|
||||
private void showHelp() {
|
||||
//Load from resource. Use with base url as else no images can be embedded.
|
||||
// Note that this leads inclusion of welcome page in browser history
|
||||
// This is not perfect, but good enough. (and would be signifcant
|
||||
// effort to remove file)
|
||||
webView.loadUrl("file:///android_res/raw/welcome.html");
|
||||
webView.loadUrl("file:///android_res/raw/help.html");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user