Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -81,30 +81,24 @@ def html(cards, pg, total):
|
|
81 |
padding: 0;
|
82 |
font-family: Poppins, sans-serif;
|
83 |
background: #f0f0f0;
|
84 |
-
overflow: hidden;
|
|
|
85 |
}
|
86 |
.container {
|
87 |
-
position:
|
88 |
-
top: 0;
|
89 |
-
left: 0;
|
90 |
-
right: 0;
|
91 |
-
bottom: 60px; /* Add space for the bottom buttons */
|
92 |
-
display: flex;
|
93 |
-
flex-direction: column;
|
94 |
width: 100%;
|
95 |
-
height:
|
96 |
box-sizing: border-box;
|
97 |
padding: 10px;
|
98 |
-
|
|
|
99 |
}
|
100 |
.grid {
|
101 |
display: grid;
|
102 |
grid-template-columns: repeat(3, 1fr);
|
103 |
-
grid-template-rows: repeat(3, 1.5fr); /* Increased row height by 50% */
|
104 |
gap: 12px;
|
105 |
width: 100%;
|
106 |
-
|
107 |
-
overflow: hidden;
|
108 |
}
|
109 |
.card {
|
110 |
background: #fff;
|
@@ -113,8 +107,8 @@ def html(cards, pg, total):
|
|
113 |
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
|
114 |
display: flex;
|
115 |
flex-direction: column;
|
116 |
-
|
117 |
-
|
118 |
}
|
119 |
.hdr {
|
120 |
padding: 8px 12px;
|
@@ -193,6 +187,26 @@ def html(cards, pg, total):
|
|
193 |
color: #777;
|
194 |
z-index: 101;
|
195 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
</style>"""
|
197 |
|
198 |
h = css + """
|
@@ -224,14 +238,6 @@ def html(cards, pg, total):
|
|
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 {
|
@@ -256,10 +262,10 @@ def build():
|
|
256 |
border-radius: 50px !important;
|
257 |
}
|
258 |
|
259 |
-
/*
|
260 |
#component-0 {
|
261 |
-
|
262 |
-
|
263 |
}
|
264 |
""") as demo:
|
265 |
# 상태 및 출력
|
|
|
81 |
padding: 0;
|
82 |
font-family: Poppins, sans-serif;
|
83 |
background: #f0f0f0;
|
84 |
+
overflow-x: hidden;
|
85 |
+
overflow-y: auto;
|
86 |
}
|
87 |
.container {
|
88 |
+
position: relative;
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
width: 100%;
|
90 |
+
height: auto;
|
91 |
box-sizing: border-box;
|
92 |
padding: 10px;
|
93 |
+
padding-bottom: 70px; /* Space for buttons */
|
94 |
+
overflow-y: auto;
|
95 |
}
|
96 |
.grid {
|
97 |
display: grid;
|
98 |
grid-template-columns: repeat(3, 1fr);
|
|
|
99 |
gap: 12px;
|
100 |
width: 100%;
|
101 |
+
margin-bottom: 60px; /* Space for buttons */
|
|
|
102 |
}
|
103 |
.card {
|
104 |
background: #fff;
|
|
|
107 |
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
|
108 |
display: flex;
|
109 |
flex-direction: column;
|
110 |
+
/* Each card is 50% taller */
|
111 |
+
height: 300px; /* Base height - will be 50% larger */
|
112 |
}
|
113 |
.hdr {
|
114 |
padding: 8px 12px;
|
|
|
187 |
color: #777;
|
188 |
z-index: 101;
|
189 |
}
|
190 |
+
|
191 |
+
/* 미디어 쿼리 */
|
192 |
+
@media (min-width: 1200px) {
|
193 |
+
.card {
|
194 |
+
height: 450px; /* 50% taller than 300px */
|
195 |
+
}
|
196 |
+
}
|
197 |
+
@media (min-width: 768px) and (max-width: 1199px) {
|
198 |
+
.card {
|
199 |
+
height: 400px; /* Adjusted for medium screens */
|
200 |
+
}
|
201 |
+
}
|
202 |
+
@media (max-width: 767px) {
|
203 |
+
.grid {
|
204 |
+
grid-template-columns: 1fr;
|
205 |
+
}
|
206 |
+
.card {
|
207 |
+
height: 350px; /* Adjusted for small screens */
|
208 |
+
}
|
209 |
+
}
|
210 |
</style>"""
|
211 |
|
212 |
h = css + """
|
|
|
238 |
def build():
|
239 |
_init_best()
|
240 |
with gr.Blocks(title="Vibe Game Craft", css="""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
241 |
footer {display: none !important;}
|
242 |
|
243 |
.button-row {
|
|
|
262 |
border-radius: 50px !important;
|
263 |
}
|
264 |
|
265 |
+
/* Allow scrolling in the HTML component */
|
266 |
#component-0 {
|
267 |
+
overflow-y: auto !important;
|
268 |
+
height: calc(100vh - 60px) !important;
|
269 |
}
|
270 |
""") as demo:
|
271 |
# 상태 및 출력
|