summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-05-18 09:12:16 +0300
committerAndrew Dolgov <[email protected]>2020-05-18 09:12:16 +0300
commitb09a0ed5d1861e0f291c2d76ed801556549e5588 (patch)
treea78bcbc1b2c456a6e36a0b952a244542fb69312f
parent021a845638d8003751980a8bc16da149702cf46b (diff)
show search box in app mode (except for offline)
-rw-r--r--css/index.css4
-rw-r--r--index.php11
-rw-r--r--js/app.js1
3 files changed, 16 insertions, 0 deletions
diff --git a/css/index.css b/css/index.css
index 66792cf..3eae557 100644
--- a/css/index.css
+++ b/css/index.css
@@ -3,6 +3,10 @@
flex-wrap: wrap;
}
+.separate-search {
+ padding : 8px;
+}
+
.row > div {
padding-top : 10px;
}
diff --git a/index.php b/index.php
index cd36791..02f1cea 100644
--- a/index.php
+++ b/index.php
@@ -200,6 +200,17 @@
<div class="container container-main">
+<form class="form-inline separate-search" style="display : none">
+ <div class="input-group">
+ <input type="text" name="query" class="form-control" placeholder="Search for..."
+ value="<?php echo htmlspecialchars($query) ?>">
+ <input type="hidden" name="mode" value="<?php echo $mode ?>">
+ <span class="input-group-btn">
+ <button type="submit" class="btn btn-default">Go</button>
+ </span>
+ </div>
+</form>
+
<div class="modal fade" id="summary-modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
diff --git a/js/app.js b/js/app.js
index 33333e8..1816095 100644
--- a/js/app.js
+++ b/js/app.js
@@ -44,6 +44,7 @@ const App = {
if (typeof EpubeApp != "undefined") {
$(".navbar").hide();
$(".epube-app-filler").show();
+ $(".separate-search").show();
if ($.urlParam("mode") == "favorites")
EpubeApp.setPage("PAGE_FAVORITES");