Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -104,12 +104,15 @@ def html(cards, pg, total):
|
|
104 |
overflow: hidden;
|
105 |
display: flex;
|
106 |
flex-direction: column;
|
|
|
|
|
107 |
}
|
108 |
.grid-container {
|
109 |
flex: 1;
|
110 |
overflow: hidden;
|
111 |
padding: 10px;
|
112 |
box-sizing: border-box;
|
|
|
113 |
}
|
114 |
.grid {
|
115 |
display: grid;
|
@@ -117,7 +120,7 @@ def html(cards, pg, total):
|
|
117 |
grid-template-rows: repeat(3, 1fr);
|
118 |
gap: 10px;
|
119 |
width: 100%;
|
120 |
-
height: 100
|
121 |
overflow: hidden;
|
122 |
box-sizing: border-box;
|
123 |
}
|
@@ -192,7 +195,7 @@ def html(cards, pg, total):
|
|
192 |
}
|
193 |
.navigation-buttons {
|
194 |
position: fixed;
|
195 |
-
bottom:
|
196 |
left: 0;
|
197 |
right: 0;
|
198 |
display: flex;
|
@@ -201,6 +204,7 @@ def html(cards, pg, total):
|
|
201 |
padding: 10px;
|
202 |
z-index: 1000;
|
203 |
background: transparent;
|
|
|
204 |
}
|
205 |
.navigation-buttons button {
|
206 |
background: rgba(255, 255, 255, 0.9);
|
@@ -259,7 +263,10 @@ def html(cards, pg, total):
|
|
259 |
h += "</div></div>"
|
260 |
|
261 |
# ํ์ด์ง ์ ๋ณด
|
262 |
-
h += f"<div class='page-info'>Page {pg} / {total}</div
|
|
|
|
|
|
|
263 |
|
264 |
# JavaScript๋ก ์คํฌ๋กค ๋ฐฉ์ง ์ถ๊ฐ
|
265 |
h += """
|
@@ -292,6 +299,9 @@ def build():
|
|
292 |
bp = gr.State(1)
|
293 |
out = gr.HTML(elem_id="main-output")
|
294 |
|
|
|
|
|
|
|
295 |
# ํ์ด์ง ๋ค๋น๊ฒ์ด์
|
296 |
with gr.Row(elem_classes="navigation-buttons"):
|
297 |
b_prev = gr.Button("โ ์ด์ ", size="lg")
|
@@ -324,4 +334,4 @@ def build():
|
|
324 |
app = build()
|
325 |
|
326 |
if __name__ == "__main__":
|
327 |
-
app.launch(
|
|
|
104 |
overflow: hidden;
|
105 |
display: flex;
|
106 |
flex-direction: column;
|
107 |
+
padding-bottom: 70px; /* ๋ค๋น๊ฒ์ด์
๋ฒํผ์ ์ํ ๊ณต๊ฐ */
|
108 |
+
box-sizing: border-box;
|
109 |
}
|
110 |
.grid-container {
|
111 |
flex: 1;
|
112 |
overflow: hidden;
|
113 |
padding: 10px;
|
114 |
box-sizing: border-box;
|
115 |
+
margin-bottom: 70px; /* ๋ฒํผ์ ์ํ ๊ณต๊ฐ ํ๋ณด */
|
116 |
}
|
117 |
.grid {
|
118 |
display: grid;
|
|
|
120 |
grid-template-rows: repeat(3, 1fr);
|
121 |
gap: 10px;
|
122 |
width: 100%;
|
123 |
+
height: calc(100% - 70px); /* ๋ค๋น๊ฒ์ด์
๋ฒํผ ์์ญ ์ ์ธ */
|
124 |
overflow: hidden;
|
125 |
box-sizing: border-box;
|
126 |
}
|
|
|
195 |
}
|
196 |
.navigation-buttons {
|
197 |
position: fixed;
|
198 |
+
bottom: 10px;
|
199 |
left: 0;
|
200 |
right: 0;
|
201 |
display: flex;
|
|
|
204 |
padding: 10px;
|
205 |
z-index: 1000;
|
206 |
background: transparent;
|
207 |
+
height: 60px; /* ๋ฒํผ ์์ญ์ ๋์ด ๊ณ ์ */
|
208 |
}
|
209 |
.navigation-buttons button {
|
210 |
background: rgba(255, 255, 255, 0.9);
|
|
|
263 |
h += "</div></div>"
|
264 |
|
265 |
# ํ์ด์ง ์ ๋ณด
|
266 |
+
h += f"<div class='page-info'>Page {pg} / {total}</div>"
|
267 |
+
|
268 |
+
# ๋ค๋น๊ฒ์ด์
๋ฒํผ์ ์ํ ์ถ๊ฐ ๊ณต๊ฐ
|
269 |
+
h += "<div style='height:60px;'></div></div>"
|
270 |
|
271 |
# JavaScript๋ก ์คํฌ๋กค ๋ฐฉ์ง ์ถ๊ฐ
|
272 |
h += """
|
|
|
299 |
bp = gr.State(1)
|
300 |
out = gr.HTML(elem_id="main-output")
|
301 |
|
302 |
+
# ๋ค๋น๊ฒ์ด์
๋ฒํผ์ ์ํ ์ถ๊ฐ ๊ณต๊ฐ (๋ณด์ด์ง ์๋ ์์)
|
303 |
+
gr.HTML("<div style='height:60px;'></div>")
|
304 |
+
|
305 |
# ํ์ด์ง ๋ค๋น๊ฒ์ด์
|
306 |
with gr.Row(elem_classes="navigation-buttons"):
|
307 |
b_prev = gr.Button("โ ์ด์ ", size="lg")
|
|
|
334 |
app = build()
|
335 |
|
336 |
if __name__ == "__main__":
|
337 |
+
app.launch()
|