Skip to content

Commit 1fb243e

Browse files
author
crorisvanjski4
committed
added fullscreen compatibility
1 parent 9907f64 commit 1fb243e

File tree

4 files changed

+32
-2
lines changed

4 files changed

+32
-2
lines changed

src/App.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,22 @@ body {
2626
font-family: "Exo", sans-serif;
2727
}
2828

29+
html {
30+
width: 100vw;
31+
height: 100vh;
32+
}
33+
34+
body,
35+
#root {
36+
width: 100%;
37+
height: 100%;
38+
}
39+
2940
.context {
3041
width: 100%;
3142
position: absolute;
3243
display: flex;
44+
height: 100%;
3345
z-index: 1;
3446
}
3547

src/App.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
import "./App.scss";
22
import BarContainer from "./components/Dashboard";
33

4+
function isFullScreen(): boolean {
5+
let params = new URLSearchParams(document.location.search);
6+
let isFullScreen = params.get("fullscreen") === "true";
7+
return isFullScreen;
8+
}
9+
410
function App() {
11+
const fullScreen = isFullScreen();
12+
513
return (
6-
<>
14+
<div data-fullscreen={fullScreen ? "" : undefined}>
715
<div className="context">
816
<BarContainer count={15} speed={60} />
917
</div>
@@ -22,7 +30,7 @@ function App() {
2230
<li></li>
2331
</ul>
2432
</div>
25-
</>
33+
</div>
2634
);
2735
}
2836

src/assets/scss/Dashboard.module.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@
55
padding: 3rem;
66
gap: 3rem;
77
}
8+
9+
div[data-fullscreen] .dashboard {
10+
padding: 1.5rem;
11+
gap: 1.5rem;
12+
justify-content: space-between;
13+
}

src/assets/scss/SortBox.module.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@
2424
height: 100%;
2525
}
2626
}
27+
28+
div[data-fullscreen] .sort-box-group {
29+
min-width: 78vw;
30+
}

0 commit comments

Comments
 (0)