Skip to content

Commit 0a11da6

Browse files
committed
playground styling
1 parent 61a3f5d commit 0a11da6

2 files changed

Lines changed: 18 additions & 8 deletions

File tree

ggsql-wasm/demo/src/index.qmd

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,20 @@ section-divs: false
55
toc: false
66
lightbox: false
77
repo-actions: false
8-
include-in-header:
8+
include-in-header:
99
- text: |
1010
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
1111
<link rel="stylesheet" href="bundle.css" />
12+
<script>
13+
// Set navbar height CSS variable for proper playground sizing
14+
document.addEventListener('DOMContentLoaded', () => {
15+
const header = document.getElementById('quarto-header');
16+
if (header) {
17+
const height = header.offsetHeight;
18+
document.documentElement.style.setProperty('--quarto-navbar-height', height + 'px');
19+
}
20+
});
21+
</script>
1222
include-after-body:
1323
- text: |
1424
<script type="module" src="bundle.js"></script>

ggsql-wasm/demo/src/styles.css

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
body {
88
font-family: "Nunito Sans", -apple-system, BlinkMacSystemFont,
99
"Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
10-
height: 100vh;
10+
height: 100dvh;
1111
overflow: hidden;
1212
background: #F9F9F9;
1313
color: #001219;
@@ -17,7 +17,7 @@ body {
1717
display: grid;
1818
grid-template-columns: 200px 1fr 1fr;
1919
grid-template-rows: 1fr 150px;
20-
height: 100vh;
20+
height: calc(100dvh - var(--quarto-navbar-height, 0px));
2121
gap: 1px;
2222
background: #005F73;
2323
border-top: 2px solid #005F73;
@@ -31,7 +31,7 @@ body {
3131
#status {
3232
font-size: 12px;
3333
padding: 3px 10px;
34-
border-radius: 3px;
34+
border-radius: 0;
3535
background: #F9F9F9;
3636
color: #005F73;
3737
}
@@ -119,11 +119,11 @@ body {
119119

120120
.file-input-label {
121121
display: block;
122-
padding: 6px 8px;
122+
padding: 6px 12px;
123123
background: #005F73;
124124
color: #F9F9F9;
125125
text-align: center;
126-
border-radius: 3px;
126+
border-radius: 50rem;
127127
cursor: pointer;
128128
font-size: 12px;
129129
margin-bottom: 6px;
@@ -150,12 +150,12 @@ body {
150150
.example-button {
151151
display: block;
152152
width: 100%;
153-
padding: 5px 8px;
153+
padding: 5px 12px;
154154
margin: 3px 0;
155155
background: #F9F9F9;
156156
border: 1px solid #94D2BD;
157157
color: #001219;
158-
border-radius: 3px;
158+
border-radius: 50rem;
159159
cursor: pointer;
160160
font-size: 12px;
161161
text-align: left;

0 commit comments

Comments
 (0)