diff --git a/static/koboldai.css b/static/koboldai.css index 0b2e27f1..6ad509e2 100644 --- a/static/koboldai.css +++ b/static/koboldai.css @@ -316,6 +316,12 @@ width: var(--flyout_menu_width); } +.SideMenu .flyout_menu_contents { + overflow-x: hidden; + overflow-y: auto; + height: calc(100vh - 40px); +} + .settings_menu { padding-left: 30px; padding-top: 7px; @@ -477,6 +483,14 @@ width: var(--flyout_menu_width); } +.rightSideMenu .flyout_menu_contents { + overflow-x: hidden; + overflow-y: auto; + height: calc(100vh - 150px); +} + + + table.server_vars { border: 1px solid #959595; } @@ -566,37 +580,53 @@ body { } @media only screen and (min-aspect-ratio: 7/5) { +/* ------------------- Desktop Mode --------------------------- */ .main-grid { transition: margin-left .5s; display: grid; height: 98vh; - margin-left: var(--flyout_menu_closed_width); + margin-left: var(--flyout_menu_width); + margin-right: var(--flyout_menu_closed_width); grid-template-areas: "menuicon gamescreen options lefticon" "menuicon inputrow inputrow lefticon"; - grid-template-columns: 30px auto fit-content(30%) 20px; + grid-template-columns: 30px auto 30% 30px; grid-template-rows: auto 100px; } +.main-grid.settings_pinned { + margin-left: var(--flyout_menu_width); +} +.main-grid.story_pinned { + margin-left: var(--flyout_menu_closed_width); + margin-right: var(--flyout_menu_width); + grid-template-areas: "menuicon options gamescreen lefticon" + "menuicon inputrow inputrow lefticon"; + grid-template-columns: 30px 30% auto 30px; +} +.main-grid.settings_pinned.story_pinned { + margin-left: var(--flyout_menu_width); + margin-right: var(--flyout_menu_width); + grid-template-areas: "menuicon gamescreen options lefticon" + "menuicon inputrow inputrow lefticon"; + grid-template-columns: 30px auto 30% 30px; +} } @media only screen and (max-aspect-ratio: 7/5) { +/* mobile */ .main-grid { transition: margin-left .5s; display: grid; height: 98vh; margin-left: var(--flyout_menu_closed_width); grid-template-areas: "menuicon gamescreen lefticon" - "menuicon mobile_options lefticon" + "menuicon options lefticon" "menuicon inputrow lefticon"; grid-template-columns: 30px auto 20px; grid-template-rows: auto min-content 100px; } } -@media only screen and (min-aspect-ratio: 7/5) { -.main-grid.pinned { - margin-left: var(--flyout_menu_width); -} -} + /* ---------------------------------- GAME SCREEN ----------------------------------*/ .gamescreen { @@ -638,23 +668,12 @@ body { font-style: italic; } -@media only screen and (min-aspect-ratio: 7/5) { .sequence_area { margin-top: 10px; grid-area: options; background-color: var(--gamescreen_background); overflow-y: scroll; } -} - -@media only screen and (max-aspect-ratio: 7/5) { -.sequence_area { - margin-top: 5px; - grid-area: mobile_options; - background-color: var(--gamescreen_background); - overflow-y: hidden; -} -} @media only screen and (max-aspect-ratio: 7/5) { .sequences { @@ -1087,10 +1106,4 @@ body.NotConnected { .cursor { cursor: pointer; -} - -.flout_menu_contents { - overflow-x: hidden; - overflow-y: auto; - height: 80vh; } \ No newline at end of file diff --git a/static/koboldai.js b/static/koboldai.js index 7cdc3eb5..b1bbfd76 100644 --- a/static/koboldai.js +++ b/static/koboldai.js @@ -1879,41 +1879,62 @@ String.prototype.toHHMMSS = function () { } function toggle_flyout(x) { - if (document.getElementById("SideMenu").classList.contains("open")) { - x.classList.remove("change"); - document.getElementById("SideMenu").classList.remove("open"); - document.getElementById("main-grid").classList.remove("menu-open"); - //if pinned - if (document.getElementById("SideMenu").classList.contains("pinned")) { - document.getElementById("menu_pin").classList.remove("hidden"); - } else { - document.getElementById("menu_pin").classList.add("hidden"); - } + if (document.getElementById("SideMenu").classList.contains("pinned")) { + //do nothing } else { - x.classList.add("change"); - document.getElementById("SideMenu").classList.add("open"); - document.getElementById("main-grid").classList.add("menu-open"); - document.getElementById("menu_pin").classList.remove("hidden"); - } + if (document.getElementById("SideMenu").classList.contains("open")) { + x.classList.remove("change"); + document.getElementById("SideMenu").classList.remove("open"); + document.getElementById("main-grid").classList.remove("menu-open"); + } else { + x.classList.add("change"); + document.getElementById("SideMenu").classList.add("open"); + document.getElementById("main-grid").classList.add("menu-open"); + document.getElementById("menu_pin").classList.remove("hidden"); + } +} } function toggle_flyout_right(x) { - if (document.getElementById("rightSideMenu").classList.contains("open")) { - document.getElementById("rightSideMenu").classList.remove("open"); - x.setAttribute("data-glyph", "chevron-left"); + if (document.getElementById("rightSideMenu").classList.contains("pinned")) { + //do nothing } else { - document.getElementById("rightSideMenu").classList.add("open"); - x.setAttribute("data-glyph", "chevron-right"); + if (document.getElementById("rightSideMenu").classList.contains("open")) { + x.classList.remove("change"); + document.getElementById("rightSideMenu").classList.remove("open"); + document.getElementById("main-grid").classList.remove("story_menu-open"); + } else { + x.classList.add("change"); + document.getElementById("rightSideMenu").classList.add("open"); + document.getElementById("main-grid").classList.add("story_menu-open"); + document.getElementById("story_menu_pin").classList.remove("hidden"); + } } } -function toggle_pin_flyout() { +function toggle_settings_pin_flyout() { if (document.getElementById("SideMenu").classList.contains("pinned")) { document.getElementById("SideMenu").classList.remove("pinned"); - document.getElementById("main-grid").classList.remove("pinned"); + document.getElementById("main-grid").classList.remove("settings_pinned"); + document.getElementById("setting_menu_icon").classList.remove("hidden"); } else { + document.getElementById("setting_menu_icon").classList.remove("change"); + document.getElementById("setting_menu_icon").classList.add("hidden"); document.getElementById("SideMenu").classList.add("pinned"); - document.getElementById("main-grid").classList.add("pinned"); + document.getElementById("main-grid").classList.add("settings_pinned"); + } +} + +function toggle_story_pin_flyout() { + if (document.getElementById("rightSideMenu").classList.contains("pinned")) { + document.getElementById("rightSideMenu").classList.remove("pinned"); + document.getElementById("main-grid").classList.remove("story_pinned"); + document.getElementById("story_menu_icon").classList.remove("hidden"); + } else { + document.getElementById("rightSideMenu").classList.add("pinned"); + document.getElementById("main-grid").classList.add("story_pinned"); + document.getElementById("story_menu_icon").classList.remove("change"); + document.getElementById("story_menu_icon").classList.add("hidden"); } } diff --git a/templates/index_new.html b/templates/index_new.html index 76cb9a4b..f71bb7b8 100644 --- a/templates/index_new.html +++ b/templates/index_new.html @@ -20,14 +20,14 @@
- + {% include 'settings flyout.html' %}
-
+
-
+ {% include 'story flyout.html' %}
diff --git a/templates/settings flyout.html b/templates/settings flyout.html index 1ff55404..b368b8b0 100644 --- a/templates/settings flyout.html +++ b/templates/settings flyout.html @@ -32,56 +32,58 @@ User Help
+
-
-
-
- Running Model: ReadOnly - +
+
+
+ Running Model: ReadOnly + +
+
-
-
-
- {% with menu='Model' %} - {% include 'settings item.html' %} - {% endwith %} -
-
-