Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -84,6 +84,11 @@ def html(cards, pg, total):
|
|
84 |
overflow: hidden;
|
85 |
}
|
86 |
.container {
|
|
|
|
|
|
|
|
|
|
|
87 |
display: flex;
|
88 |
flex-direction: column;
|
89 |
width: 100%;
|
@@ -98,8 +103,8 @@ def html(cards, pg, total):
|
|
98 |
grid-template-rows: repeat(3, 1fr);
|
99 |
gap: 12px;
|
100 |
width: 100%;
|
101 |
-
|
102 |
-
|
103 |
}
|
104 |
.card {
|
105 |
background: #fff;
|
@@ -109,6 +114,7 @@ def html(cards, pg, total):
|
|
109 |
display: flex;
|
110 |
flex-direction: column;
|
111 |
height: 100%;
|
|
|
112 |
}
|
113 |
.hdr {
|
114 |
padding: 8px 12px;
|
@@ -134,6 +140,7 @@ def html(cards, pg, total):
|
|
134 |
.frame {
|
135 |
flex: 1;
|
136 |
position: relative;
|
|
|
137 |
}
|
138 |
.frame iframe {
|
139 |
position: absolute;
|
@@ -217,7 +224,16 @@ def html(cards, pg, total):
|
|
217 |
def build():
|
218 |
_init_best()
|
219 |
with gr.Blocks(title="Vibe Game Craft", css="""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
footer {display: none !important;}
|
|
|
221 |
.button-row {
|
222 |
position: fixed !important;
|
223 |
bottom: 0 !important;
|
@@ -230,6 +246,7 @@ def build():
|
|
230 |
margin: 0 !important;
|
231 |
z-index: 1000 !important;
|
232 |
}
|
|
|
233 |
.button-row button {
|
234 |
margin: 0 10px !important;
|
235 |
padding: 10px 20px !important;
|
@@ -237,9 +254,10 @@ def build():
|
|
237 |
font-weight: bold !important;
|
238 |
border-radius: 50px !important;
|
239 |
}
|
240 |
-
|
241 |
-
|
242 |
-
|
|
|
243 |
overflow: hidden !important;
|
244 |
}
|
245 |
""") as demo:
|
|
|
84 |
overflow: hidden;
|
85 |
}
|
86 |
.container {
|
87 |
+
position: fixed; /* Changed from relative to fixed */
|
88 |
+
top: 0;
|
89 |
+
left: 0;
|
90 |
+
right: 0;
|
91 |
+
bottom: 0;
|
92 |
display: flex;
|
93 |
flex-direction: column;
|
94 |
width: 100%;
|
|
|
103 |
grid-template-rows: repeat(3, 1fr);
|
104 |
gap: 12px;
|
105 |
width: 100%;
|
106 |
+
height: calc(100vh - 70px); /* Fixed height calculation */
|
107 |
+
overflow: hidden;
|
108 |
}
|
109 |
.card {
|
110 |
background: #fff;
|
|
|
114 |
display: flex;
|
115 |
flex-direction: column;
|
116 |
height: 100%;
|
117 |
+
max-height: 100%; /* Prevent expansion */
|
118 |
}
|
119 |
.hdr {
|
120 |
padding: 8px 12px;
|
|
|
140 |
.frame {
|
141 |
flex: 1;
|
142 |
position: relative;
|
143 |
+
overflow: hidden; /* Prevent content overflow */
|
144 |
}
|
145 |
.frame iframe {
|
146 |
position: absolute;
|
|
|
224 |
def build():
|
225 |
_init_best()
|
226 |
with gr.Blocks(title="Vibe Game Craft", css="""
|
227 |
+
/* Fix container sizing and prevent scrolling */
|
228 |
+
html, body, .gradio-container {
|
229 |
+
height: 100vh !important;
|
230 |
+
overflow: hidden !important;
|
231 |
+
margin: 0 !important;
|
232 |
+
padding: 0 !important;
|
233 |
+
}
|
234 |
+
|
235 |
footer {display: none !important;}
|
236 |
+
|
237 |
.button-row {
|
238 |
position: fixed !important;
|
239 |
bottom: 0 !important;
|
|
|
246 |
margin: 0 !important;
|
247 |
z-index: 1000 !important;
|
248 |
}
|
249 |
+
|
250 |
.button-row button {
|
251 |
margin: 0 10px !important;
|
252 |
padding: 10px 20px !important;
|
|
|
254 |
font-weight: bold !important;
|
255 |
border-radius: 50px !important;
|
256 |
}
|
257 |
+
|
258 |
+
/* Fix component height */
|
259 |
+
#component-0 {
|
260 |
+
height: calc(100vh - 60px) !important;
|
261 |
overflow: hidden !important;
|
262 |
}
|
263 |
""") as demo:
|