Fix for mobile

This commit is contained in:
ebolam
2022-08-11 15:33:10 -04:00
parent 5f25883fa3
commit c38b793425
2 changed files with 49 additions and 28 deletions

View File

@@ -263,6 +263,13 @@
cursor: pointer;
}
@media only screen and (max-aspect-ratio: 7/5) {
/* mobile */
.menu_icon.hidden {
display: inline-block !important;
}
}
@media only screen and (max-aspect-ratio: 7/5) {
.menu_pin {
display: none;
@@ -468,6 +475,13 @@
grid-area: lefticon;
}
@media only screen and (max-aspect-ratio: 7/5) {
/* mobile */
.right_menu_icon.hidden {
display: inline-block !important;
}
}
.rightSideMenu {
height: 100%;
width: 0;
@@ -488,9 +502,12 @@
width: var(--flyout_menu_width);
}
@media only screen and (min-aspect-ratio: 7/5) {
/* Desktop Mode */
.rightSideMenu.pinned {
width: var(--flyout_menu_width);
}
}
.rightSideMenu .flyout_menu_contents {
overflow-x: hidden;
@@ -498,6 +515,12 @@
height: calc(100vh - 150px);
}
@media only screen and (max-aspect-ratio: 7/5) {
/* mobile */
.story_menu_pin {
display: none;
}
}
table.server_vars {
@@ -629,7 +652,7 @@ body {
grid-template-areas: "menuicon gamescreen lefticon"
"menuicon options lefticon"
"menuicon inputrow lefticon";
grid-template-columns: 30px auto 20px;
grid-template-columns: 30px auto 30px;
grid-template-rows: auto min-content 100px;
}
}
@@ -1118,3 +1141,9 @@ body.NotConnected {
.cursor {
cursor: pointer;
}
@font-face {
font-family: 'Material Symbols Outlined';
font-style: normal;
src: url(/material-symbols.woff) format('woff');
}

View File

@@ -1958,9 +1958,6 @@ function close_menus() {
}
function toggle_flyout(x) {
if (document.getElementById("SideMenu").classList.contains("pinned")) {
//do nothing
} else {
if (document.getElementById("SideMenu").classList.contains("open")) {
x.classList.remove("change");
document.getElementById("SideMenu").classList.remove("open");
@@ -1972,12 +1969,8 @@ function toggle_flyout(x) {
document.getElementById("menu_pin").classList.remove("hidden");
}
}
}
function toggle_flyout_right(x) {
if (document.getElementById("rightSideMenu").classList.contains("pinned")) {
//do nothing
} else {
if (document.getElementById("rightSideMenu").classList.contains("open")) {
x.classList.remove("change");
document.getElementById("rightSideMenu").classList.remove("open");
@@ -1988,7 +1981,6 @@ function toggle_flyout_right(x) {
document.getElementById("main-grid").classList.add("story_menu-open");
document.getElementById("story_menu_pin").classList.remove("hidden");
}
}
}
function toggle_settings_pin_flyout() {
@@ -2045,7 +2037,7 @@ function setCookie(cname, cvalue, exdays=60) {
const d = new Date();
d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
let expires = "expires="+d.toUTCString();
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/;samesite=none;domain=koboldai.org";
}
function getCookie(cname) {