3
0
Fork 0

+ kiwix-serve welcome page using jsquery

small_fixes
kelson42 14 years ago
parent e937f50f2c
commit 8d179edf68

@ -497,18 +497,15 @@ int main(int argc, char **argv) {
if (!currentBook.path.empty()) { if (!currentBook.path.empty()) {
welcomeBooksHtml += "<h3><a href=\"#\">" + currentBook.title + "</a></h3> \ welcomeBooksHtml += "<h3><a href=\"#\">" + currentBook.title + "</a></h3> \
<table style=\"width: 100%;\"><tr> \ <table style=\"width: 100%;\"><tr> \
<td>icon</td> \ <td style=\"background-repeat: no-repeat; background-image: url(data:" + currentBook.faviconMimeType+ ";base64," + currentBook.favicon + ")\"><div style=\"width: 50px\"/></td> \
<td style=\"width: 100%;\">" + currentBook.description + <td style=\"width: 100%;\">" + currentBook.description +
"<table style=\"font-size: small; color: grey;\">" + "<table style=\"font-size: small; color: grey; width: 100%;\">" +
"<tr><td>Size: " + "" + "<tr><td width=\"50%\">Size: " + beautifyInteger(atoi(currentBook.size.c_str())) + "MB (" + beautifyInteger(atoi(currentBook.articleCount.c_str())) + " articles, " + beautifyInteger(atoi(currentBook.mediaCount.c_str())) + " medias) \
"</td><td>Created:</td></tr> \ </td><td>Created: " + currentBook.date + "</td></tr> \
<tr><td>Author:</td><td>Language:</td></tr> \ <tr><td>Author: " + currentBook.creator + "</td><td>Language: " + currentBook.language + "</td></tr> \
<tr><td>Publisher:</td><td></td></tr> \ <tr><td>Publisher: " + (currentBook.publisher.empty() ? "unknown" : currentBook.publisher ) + "</td><td><button style=\"align: right; right: 0px; float:right;\" onclick=\"window.location.href='/" + currentBook.getHumanReadableIdFromPath() + "/';\">Load</button></td></tr> \
</table> \ </table> \
</td></tr> \ </td></tr> \
<tr><td colspan=\"2\" style=\"align: right; right: 0px;\"> \
<button style=\"align: right; right: 0px; float:right;\" onclick=\"window.location.href=\"/" + currentBook.getHumanReadableIdFromPath() + "/\">Load</button> \
</td></tr> \
</table>"; </table>";
} }
} }

@ -0,0 +1,21 @@
<html>
<head>
<meta charset="UTF-8" />
<title>Welcome to Kiwix Server</title>
<link type="text/css" href="/skin/jqueryui/css/smoothness/jquery-ui.custom.css" rel="Stylesheet" />
<script type="text/javascript" src="/skin/jqueryui/js/jquery.min.js"></script>
<script type="text/javascript" src="/skin/jqueryui/js/jquery-ui.custom.min.js"></script>
<script>
$(function() {
$( "#accordion" ).accordion();
});
</script>
</head>
<body>
<div id="accordion">
__BOOKS__
</div>
</body>
</html>
Loading…
Cancel
Save