|
|
@ -138,11 +138,20 @@ void introduceTaskbar(string& content, const string& humanReadableBookId)
|
|
|
|
? " #kiwix_serve_taskbar_library_button { display: none }"
|
|
|
|
? " #kiwix_serve_taskbar_library_button { display: none }"
|
|
|
|
: "")
|
|
|
|
: "")
|
|
|
|
+ "</style>");
|
|
|
|
+ "</style>");
|
|
|
|
|
|
|
|
if ( humanReadableBookId.empty() ) {
|
|
|
|
|
|
|
|
content = appendToFirstOccurence(
|
|
|
|
|
|
|
|
content,
|
|
|
|
|
|
|
|
"<body[^>]*>",
|
|
|
|
|
|
|
|
RESOURCE::global_taskbar_html_part);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
content = appendToFirstOccurence(
|
|
|
|
content = appendToFirstOccurence(
|
|
|
|
content,
|
|
|
|
content,
|
|
|
|
"<body[^>]*>",
|
|
|
|
"<body[^>]*>",
|
|
|
|
replaceRegex(
|
|
|
|
replaceRegex(
|
|
|
|
RESOURCE::taskbar_html_part, humanReadableBookId, "__CONTENT__"));
|
|
|
|
RESOURCE::taskbar_html_part,
|
|
|
|
|
|
|
|
humanReadableBookId,
|
|
|
|
|
|
|
|
"__CONTENT__"));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -982,6 +991,8 @@ int main(int argc, char** argv)
|
|
|
|
welcomeHTML
|
|
|
|
welcomeHTML
|
|
|
|
= replaceRegex(RESOURCE::home_html_tmpl, welcomeBooksHtml, "__BOOKS__");
|
|
|
|
= replaceRegex(RESOURCE::home_html_tmpl, welcomeBooksHtml, "__BOOKS__");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
introduceTaskbar(welcomeHTML, "");
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _WIN32
|
|
|
|
#ifndef _WIN32
|
|
|
|
/* Fork if necessary */
|
|
|
|
/* Fork if necessary */
|
|
|
|
if (daemonFlag) {
|
|
|
|
if (daemonFlag) {
|
|
|
|