Spaces:
Running
Running
add dark mode color
Browse files
app.py
CHANGED
|
@@ -61,6 +61,27 @@ def search_kbli(text: str):
|
|
| 61 |
color: #4b5563;
|
| 62 |
margin-top: 4px;
|
| 63 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
</style>
|
| 65 |
<div>
|
| 66 |
"""
|
|
@@ -82,8 +103,8 @@ def search_kbli(text: str):
|
|
| 82 |
with gr.Blocks(css="""
|
| 83 |
.title {font-size: 22px; font-weight: 700; color: #111827; margin-bottom: 4px;}
|
| 84 |
.desc {font-size: 14px; color: #6b7280; margin-bottom: 16px;}
|
| 85 |
-
.btn-primary {background-color: #
|
| 86 |
-
.btn-primary:hover {background-color: #
|
| 87 |
.btn-clear {background-color: #f3f4f6; color: #374151; border-radius: 6px;}
|
| 88 |
.btn-clear:hover {background-color: #e5e7eb;}
|
| 89 |
""") as demo:
|
|
@@ -104,7 +125,7 @@ with gr.Blocks(css="""
|
|
| 104 |
|
| 105 |
with gr.Tab("Search KBLI"):
|
| 106 |
inp2 = gr.Textbox(label="Masukkan teks")
|
| 107 |
-
out2 = gr.HTML(label="Hasil KBLI")
|
| 108 |
inp2.submit(search_kbli, inp2, out2, api_name="search_kbli")
|
| 109 |
|
| 110 |
with gr.Row():
|
|
|
|
| 61 |
color: #4b5563;
|
| 62 |
margin-top: 4px;
|
| 63 |
}
|
| 64 |
+
|
| 65 |
+
@media (prefers-color-scheme: dark) {
|
| 66 |
+
.kbli-item {
|
| 67 |
+
border: 1px solid #374151; /* abu gelap */
|
| 68 |
+
}
|
| 69 |
+
.kbli-item:hover {
|
| 70 |
+
background: #1f2937;
|
| 71 |
+
}
|
| 72 |
+
.kbli-title {
|
| 73 |
+
color: #f3f4f6;
|
| 74 |
+
}
|
| 75 |
+
.kbli-desc {
|
| 76 |
+
color: #d1d5db;
|
| 77 |
+
}
|
| 78 |
+
.kbli-item:hover .kbli-title {
|
| 79 |
+
color: #93c5fd;
|
| 80 |
+
}
|
| 81 |
+
.kbli-item:hover .kbli-desc {
|
| 82 |
+
color: #e5e7eb;
|
| 83 |
+
}
|
| 84 |
+
}
|
| 85 |
</style>
|
| 86 |
<div>
|
| 87 |
"""
|
|
|
|
| 103 |
with gr.Blocks(css="""
|
| 104 |
.title {font-size: 22px; font-weight: 700; color: #111827; margin-bottom: 4px;}
|
| 105 |
.desc {font-size: 14px; color: #6b7280; margin-bottom: 16px;}
|
| 106 |
+
.btn-primary {background-color: #23e500; color: white; border-radius: 6px;}
|
| 107 |
+
.btn-primary:hover {background-color: #11a12f;}
|
| 108 |
.btn-clear {background-color: #f3f4f6; color: #374151; border-radius: 6px;}
|
| 109 |
.btn-clear:hover {background-color: #e5e7eb;}
|
| 110 |
""") as demo:
|
|
|
|
| 125 |
|
| 126 |
with gr.Tab("Search KBLI"):
|
| 127 |
inp2 = gr.Textbox(label="Masukkan teks")
|
| 128 |
+
out2 = gr.HTML(label="Hasil Pencarian KBLI")
|
| 129 |
inp2.submit(search_kbli, inp2, out2, api_name="search_kbli")
|
| 130 |
|
| 131 |
with gr.Row():
|