mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Search bar now resizes responsively via javascript
This commit is contained in:
5
src/interface/static/css/mobile.css
vendored
5
src/interface/static/css/mobile.css
vendored
@@ -32,12 +32,15 @@
|
||||
max-width: min-content;
|
||||
}
|
||||
.nav_search{
|
||||
display: none !important;
|
||||
/* display: none !important; */
|
||||
}
|
||||
#horiz_nav_main{
|
||||
grid-template-columns: auto;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 768px) {
|
||||
.nav_search{content: "Search"}
|
||||
}
|
||||
@media only screen and (max-width: 400px) {
|
||||
.vert-nav{
|
||||
list-style: None;
|
||||
|
||||
8
src/interface/static/js/pyshelf_ux.js
vendored
8
src/interface/static/js/pyshelf_ux.js
vendored
@@ -8,7 +8,7 @@ $(document).ready(function(){
|
||||
/* Initialize ui variables */
|
||||
var outstream = []; // put customlog messages here
|
||||
var win_height = window.innerHeight; // Get the displays height
|
||||
var win_width = window.innwerWidth; // Get the displays width
|
||||
var win_width = window.innerWidth; // Get the displays width
|
||||
var scr_height = window.outerHeight;
|
||||
var scr_width = window.outerWidth;
|
||||
var hdr_height = $('.app_hdr').height(); // Get our header height
|
||||
@@ -85,4 +85,10 @@ $(document).ready(function(){
|
||||
window.location.href=_location;
|
||||
});
|
||||
$('#search_string').html("<i> "+$('#_search').val().substr(0,15)+"</i>")
|
||||
if (win_width >= 1024)
|
||||
$('.search_string').attr('size', 20)
|
||||
$('.search_string').val("Search")
|
||||
if (win_width >= 425)
|
||||
$('.search_string').attr('size', 10)
|
||||
$('.search_string').val("Search")
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user