Better tablet (width >= 768px) support

This commit is contained in:
Skylar Ittner 2017-12-23 01:18:11 -07:00
parent c2916076ad
commit 02f8c97b44
3 changed files with 105 additions and 113 deletions

View File

@ -2,16 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * 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 { .mobile-app-hide {
display: none; display: none;
visibility: hidden; visibility: hidden;
@ -25,6 +15,7 @@
display: initial; display: initial;
} }
@media screen and (max-width: 767px) {
.navbar, .navbar-brand { .navbar, .navbar-brand {
min-height: 56px; min-height: 56px;
height: 56px; height: 56px;
@ -41,7 +32,6 @@
margin-bottom: 11px; margin-bottom: 11px;
} }
@media screen and (max-width: 767px) {
#navbar-collapse { #navbar-collapse {
display: none; display: none;
} }
@ -58,6 +48,7 @@
.navbar-header .navbar-brand img { .navbar-header .navbar-brand img {
display: none; display: none;
} }
}
#swipe-nav { #swipe-nav {
display: none; display: none;
@ -154,4 +145,3 @@
background-color: rgba(0,0,0,0.5); background-color: rgba(0,0,0,0.5);
z-index: 9999998; z-index: 9999998;
} }
}

View File

@ -53,13 +53,13 @@ function togglemenu() {
$(document).ready(function () { $(document).ready(function () {
$.fx.off = __JQUERYFXOFF__; $.fx.off = __JQUERYFXOFF__;
var pages = $('#navbar-collapse .navbar-nav').html(); var pages = $('#navbar-collapse .navbar-nav').html();
var user = $('#navbar-collapse .navbar-right').html(); var body = $('body');
var username = "__USERNAME__"; var username = "__USERNAME__";
var menucolor = $('.navbar').css('backgroundColor'); var menucolor = $('.navbar').css('backgroundColor');
var textcolor = $('.navbar .navbar-nav > li > a').css('color'); var textcolor = $('.navbar .navbar-nav > li > a').css('color');
var logo = "__LOGO__"; 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-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-shader'></div>");
$(".navbar-brand").attr("href", "#"); $(".navbar-brand").attr("href", "#");

View File

@ -37,6 +37,8 @@
$('#appframe').on("load", function () { $('#appframe').on("load", function () {
$("#loadframe").fadeOut(300); $("#loadframe").fadeOut(300);
historyctr++; 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) { $.get("css/sidemenu.css", function (style) {
$('#appframe').contents().find('head').append("<style>" + style + "</style>"); $('#appframe').contents().find('head').append("<style>" + style + "</style>");
$.get("js/jquery-ui.min.js", function (script) { $.get("js/jquery-ui.min.js", function (script) {