Skip to content

Commit

Permalink
No pallete when the play-only-mode is triggered
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Charles <[email protected]>
  • Loading branch information
justin212407 committed Jan 29, 2025
1 parent d08f4b9 commit 5ede517
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
2 changes: 2 additions & 0 deletions css/activities.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
}
*/

@import url("play-only-mode.css");

*:focus {
outline: none;
}
Expand Down
36 changes: 36 additions & 0 deletions css/play-only-mode.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.play-only #palette {
display: none !important;
visibility: hidden !important;
height: 0 !important;
width: 0 !important;
pointer-events: none !important;
overflow: hidden !important;
}

.play-only #Grid {
display: none !important;
visibility: hidden !important;
height: 0 !important;
width: 0 !important;
pointer-events: none !important;
overflow: hidden !important;
}

.play-only #Clear {
display: none !important;
visibility: hidden !important;
height: 0 !important;
width: 0 !important;
pointer-events: none !important;
overflow: hidden !important;
}

.play-only #Collapse {
display: none !important;
visibility: hidden !important;
height: 0 !important;
width: 0 !important;
pointer-events: none !important;
overflow: hidden !important;
}

15 changes: 15 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,21 @@
</script>
</div>
</div>
<script>
function togglePlayOnlyMode() {
const isSmallScreen =
window.innerWidth < 768 || window.innerHeight < 600;
const body = document.body;
if (isSmallScreen) {
body.classList.add("play-only");
} else {
body.classList.remove("play-only");
}
}
togglePlayOnlyMode();
window.addEventListener("resize", togglePlayOnlyMode);
</script>

<div id="searchBar" tabindex="-1">
<input
type="text"
Expand Down

0 comments on commit 5ede517

Please sign in to comment.