Better tablet (width >= 768px) support
This commit is contained in:
parent
c2916076ad
commit
02f8c97b44
@ -2,16 +2,6 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#swipe-nav {
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#swipe-shader {
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.mobile-app-hide {
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
@ -25,23 +15,23 @@
|
||||
display: initial;
|
||||
}
|
||||
|
||||
.navbar, .navbar-brand {
|
||||
min-height: 56px;
|
||||
height: 56px;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
font-size: 20px;
|
||||
margin-top: -4px;
|
||||
}
|
||||
|
||||
.navbar-toggle {
|
||||
border: 0px solid white;
|
||||
margin-top: 11px;
|
||||
margin-bottom: 11px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
.navbar, .navbar-brand {
|
||||
min-height: 56px;
|
||||
height: 56px;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
font-size: 20px;
|
||||
margin-top: -4px;
|
||||
}
|
||||
|
||||
.navbar-toggle {
|
||||
border: 0px solid white;
|
||||
margin-top: 11px;
|
||||
margin-bottom: 11px;
|
||||
}
|
||||
|
||||
#navbar-collapse {
|
||||
display: none;
|
||||
}
|
||||
@ -57,101 +47,101 @@
|
||||
|
||||
.navbar-header .navbar-brand img {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#swipe-nav {
|
||||
display: none;
|
||||
visibility: visible;
|
||||
overflow-y: scroll;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 60%;
|
||||
z-index: 9999999;
|
||||
max-width: 300px;
|
||||
min-width: 200px;
|
||||
background-color: #fafafa;
|
||||
box-shadow: 5px 0px 15px 0px rgba(0,0,0,0.5);
|
||||
}
|
||||
#swipe-nav {
|
||||
display: none;
|
||||
visibility: visible;
|
||||
overflow-y: scroll;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 60%;
|
||||
z-index: 9999999;
|
||||
max-width: 300px;
|
||||
min-width: 200px;
|
||||
background-color: #fafafa;
|
||||
box-shadow: 5px 0px 15px 0px rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
#swipe-nav #swipe-header {
|
||||
height: 150px;
|
||||
background-color: #eeeeee;
|
||||
position: relative;
|
||||
}
|
||||
#swipe-nav #swipe-header {
|
||||
height: 150px;
|
||||
background-color: #eeeeee;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#swipe-nav #swipe-header #swipe-username {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
padding-left: 10px;
|
||||
padding-bottom: 10px;
|
||||
font-size: 110%;
|
||||
}
|
||||
#swipe-nav #swipe-header #swipe-username {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
padding-left: 10px;
|
||||
padding-bottom: 10px;
|
||||
font-size: 110%;
|
||||
}
|
||||
|
||||
#swipe-nav #swipe-header #swipe-appicon {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
padding-left: 20px;
|
||||
padding-top: 20px;
|
||||
height: 80px;
|
||||
}
|
||||
#swipe-nav #swipe-header #swipe-appicon {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
padding-left: 20px;
|
||||
padding-top: 20px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
#swipe-nav #swipe-header #swipe-username .fa {
|
||||
font-size: 120%;
|
||||
}
|
||||
#swipe-nav #swipe-header #swipe-username .fa {
|
||||
font-size: 120%;
|
||||
}
|
||||
|
||||
#swipe-nav ul {
|
||||
margin-bottom: 10px;
|
||||
padding-left: 2px;
|
||||
list-style-type: none;
|
||||
padding: 3px;
|
||||
}
|
||||
#swipe-nav ul {
|
||||
margin-bottom: 10px;
|
||||
padding-left: 2px;
|
||||
list-style-type: none;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#swipe-nav ul li {
|
||||
color: #424242;
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
#swipe-nav ul li {
|
||||
color: #424242;
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
#swipe-nav ul li a:focus,a:active {
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
#swipe-nav ul li a:focus,a:active {
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
|
||||
#swipe-nav ul li i.fa {
|
||||
font-size: 120%;
|
||||
margin-right: 10px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
#swipe-nav ul li i.fa {
|
||||
font-size: 120%;
|
||||
margin-right: 10px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
#swipe-nav ul li a {
|
||||
display: inline-block;
|
||||
color: #424242;
|
||||
font-size: 110%;
|
||||
text-decoration: none;
|
||||
width: 100%;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
#swipe-nav ul li a {
|
||||
display: inline-block;
|
||||
color: #424242;
|
||||
font-size: 110%;
|
||||
text-decoration: none;
|
||||
width: 100%;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
#swipe-nav ul li a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
#swipe-nav ul li a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#swipe-nav #swipe-pages {
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
}
|
||||
#swipe-nav #swipe-pages {
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
}
|
||||
|
||||
#swipe-shader {
|
||||
position: fixed;
|
||||
display: none;
|
||||
visibility: visible;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
z-index: 9999998;
|
||||
}
|
||||
#swipe-shader {
|
||||
position: fixed;
|
||||
display: none;
|
||||
visibility: visible;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
z-index: 9999998;
|
||||
}
|
@ -53,13 +53,13 @@ function togglemenu() {
|
||||
$(document).ready(function () {
|
||||
$.fx.off = __JQUERYFXOFF__;
|
||||
var pages = $('#navbar-collapse .navbar-nav').html();
|
||||
var user = $('#navbar-collapse .navbar-right').html();
|
||||
var body = $('body');
|
||||
var username = "__USERNAME__";
|
||||
var menucolor = $('.navbar').css('backgroundColor');
|
||||
var textcolor = $('.navbar .navbar-nav > li > a').css('color');
|
||||
var logo = "__LOGO__";
|
||||
$('body').append("<div id='swipe-nav'><div id='swipe-header' style='background-color: " + menucolor + "; color: " + textcolor + "'><a href='./app.php'><img id='swipe-appicon' src='" + logo + "' /></a> <div id='swipe-username'><i class='fa fa-user fa-fw'></i> " + username + "</div></div>\n<ul id='swipe-pages'>" + pages + "</ul><ul><li><a onclick='quitapp()'><i class='fa fa-sign-out fa-fw'></i> Back to Menu</a></li></ul></div>");
|
||||
$('body').append("<div id='swipe-shader'></div>");
|
||||
body.append("<div id='swipe-nav'><div id='swipe-header' style='background-color: " + menucolor + "; color: " + textcolor + "'><a href='./app.php'><img id='swipe-appicon' src='" + logo + "' /></a> <div id='swipe-username'><i class='fa fa-user fa-fw'></i> " + username + "</div></div>\n<ul id='swipe-pages'>" + pages + "</ul><ul><li><a onclick='quitapp()'><i class='fa fa-sign-out fa-fw'></i> Back to Menu</a></li></ul></div>");
|
||||
body.append("<div id='swipe-shader'></div>");
|
||||
|
||||
$(".navbar-brand").attr("href", "#");
|
||||
|
||||
|
@ -37,6 +37,8 @@
|
||||
$('#appframe').on("load", function () {
|
||||
$("#loadframe").fadeOut(300);
|
||||
historyctr++;
|
||||
// Do this right away so it's a bit harder to glitch
|
||||
$('#appframe').contents().find('.navbar-right').html("<li><a onclick='quitapp()'><i class='fa fa-sign-out fa-fw'></i> Back to Menu</a></li>");
|
||||
$.get("css/sidemenu.css", function (style) {
|
||||
$('#appframe').contents().find('head').append("<style>" + style + "</style>");
|
||||
$.get("js/jquery-ui.min.js", function (script) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user