Archie commited on
Commit ·
928026b
1
Parent(s): 79bab70
Fix readability: white bg, dark text, proper contrast
Browse files
app.py
CHANGED
|
@@ -96,38 +96,46 @@ def load_stats(network):
|
|
| 96 |
# Build the UI
|
| 97 |
theme = gr.themes.Base(
|
| 98 |
primary_hue="amber",
|
| 99 |
-
neutral_hue="
|
| 100 |
font=gr.themes.GoogleFont("Space Grotesk"),
|
| 101 |
font_mono=gr.themes.GoogleFont("JetBrains Mono"),
|
| 102 |
).set(
|
| 103 |
-
body_background_fill="#
|
| 104 |
-
body_background_fill_dark="#
|
| 105 |
-
block_background_fill="#
|
| 106 |
-
block_background_fill_dark="#
|
| 107 |
-
body_text_color="#
|
| 108 |
body_text_color_dark="#e8e6e3",
|
| 109 |
-
block_label_text_color="#
|
| 110 |
-
block_label_text_color_dark="#
|
| 111 |
-
button_primary_background_fill="#
|
| 112 |
button_primary_background_fill_dark="#c4a035",
|
| 113 |
-
button_primary_text_color="#
|
| 114 |
button_primary_text_color_dark="#0a0a0f",
|
| 115 |
-
border_color_primary="#
|
| 116 |
border_color_primary_dark="#c4a035",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
)
|
| 118 |
|
| 119 |
css = """
|
| 120 |
.gradio-container { max-width: 1200px !important; }
|
| 121 |
.main-header { text-align: center; margin-bottom: 1rem; }
|
| 122 |
-
.main-header h1 { font-family: 'JetBrains Mono', monospace; color: #
|
|
|
|
| 123 |
footer { display: none !important; }
|
|
|
|
|
|
|
|
|
|
| 124 |
"""
|
| 125 |
|
| 126 |
with gr.Blocks(theme=theme, css=css, title="BlockchainToken Explorer") as demo:
|
| 127 |
gr.HTML("""
|
| 128 |
<div class="main-header">
|
| 129 |
-
<h1>Ð BLOCKCHAIN<span style="color:#
|
| 130 |
-
<p style="color:#
|
| 131 |
The most comprehensive Dogeparty & Counterparty asset database — 303,330 assets indexed.
|
| 132 |
<br>Powered by <a href="https://blockchaintoken.com" style="color:#c4a035">blockchaintoken.com</a>
|
| 133 |
</p>
|
|
@@ -193,12 +201,12 @@ with gr.Blocks(theme=theme, css=css, title="BlockchainToken Explorer") as demo:
|
|
| 193 |
issuer_btn.click(fn=get_top_issuers, inputs=network, outputs=issuer_table)
|
| 194 |
|
| 195 |
gr.HTML("""
|
| 196 |
-
<div style="text-align:center;margin-top:2rem;padding:1rem;border-top:1px solid
|
| 197 |
-
<p style="font-family:'JetBrains Mono',monospace;font-size:0.7rem;color:#
|
| 198 |
-
DATA: <a href="https://blockchaintoken.com" style="color:#
|
| 199 |
-
API: <a href="https://blockchaintoken.com/api.php?action=stats" style="color:#
|
| 200 |
-
<a href="https://dogeparty.net" style="color:#
|
| 201 |
-
<a href="https://counterparty.io" style="color:#
|
| 202 |
</p>
|
| 203 |
</div>
|
| 204 |
""")
|
|
|
|
| 96 |
# Build the UI
|
| 97 |
theme = gr.themes.Base(
|
| 98 |
primary_hue="amber",
|
| 99 |
+
neutral_hue="gray",
|
| 100 |
font=gr.themes.GoogleFont("Space Grotesk"),
|
| 101 |
font_mono=gr.themes.GoogleFont("JetBrains Mono"),
|
| 102 |
).set(
|
| 103 |
+
body_background_fill="#ffffff",
|
| 104 |
+
body_background_fill_dark="#1a1a2e",
|
| 105 |
+
block_background_fill="#f8f8f8",
|
| 106 |
+
block_background_fill_dark="#22223a",
|
| 107 |
+
body_text_color="#1a1a1a",
|
| 108 |
body_text_color_dark="#e8e6e3",
|
| 109 |
+
block_label_text_color="#555555",
|
| 110 |
+
block_label_text_color_dark="#b0b0bc",
|
| 111 |
+
button_primary_background_fill="#b8941e",
|
| 112 |
button_primary_background_fill_dark="#c4a035",
|
| 113 |
+
button_primary_text_color="#ffffff",
|
| 114 |
button_primary_text_color_dark="#0a0a0f",
|
| 115 |
+
border_color_primary="#b8941e",
|
| 116 |
border_color_primary_dark="#c4a035",
|
| 117 |
+
input_background_fill="#ffffff",
|
| 118 |
+
input_background_fill_dark="#2a2a42",
|
| 119 |
+
input_border_color="#cccccc",
|
| 120 |
+
input_border_color_dark="#444466",
|
| 121 |
)
|
| 122 |
|
| 123 |
css = """
|
| 124 |
.gradio-container { max-width: 1200px !important; }
|
| 125 |
.main-header { text-align: center; margin-bottom: 1rem; }
|
| 126 |
+
.main-header h1 { font-family: 'JetBrains Mono', monospace; color: #b8941e !important; }
|
| 127 |
+
.main-header p { color: #555 !important; }
|
| 128 |
footer { display: none !important; }
|
| 129 |
+
/* Ensure table text is readable */
|
| 130 |
+
.gradio-dataframe td, .gradio-dataframe th { color: #1a1a1a !important; }
|
| 131 |
+
.dark .gradio-dataframe td, .dark .gradio-dataframe th { color: #e8e6e3 !important; }
|
| 132 |
"""
|
| 133 |
|
| 134 |
with gr.Blocks(theme=theme, css=css, title="BlockchainToken Explorer") as demo:
|
| 135 |
gr.HTML("""
|
| 136 |
<div class="main-header">
|
| 137 |
+
<h1>Ð BLOCKCHAIN<span style="color:#888;font-weight:400">TOKEN</span></h1>
|
| 138 |
+
<p style="color:#555;font-size:0.9rem;">
|
| 139 |
The most comprehensive Dogeparty & Counterparty asset database — 303,330 assets indexed.
|
| 140 |
<br>Powered by <a href="https://blockchaintoken.com" style="color:#c4a035">blockchaintoken.com</a>
|
| 141 |
</p>
|
|
|
|
| 201 |
issuer_btn.click(fn=get_top_issuers, inputs=network, outputs=issuer_table)
|
| 202 |
|
| 203 |
gr.HTML("""
|
| 204 |
+
<div style="text-align:center;margin-top:2rem;padding:1rem;border-top:1px solid #ddd;">
|
| 205 |
+
<p style="font-family:'JetBrains Mono',monospace;font-size:0.7rem;color:#666;">
|
| 206 |
+
DATA: <a href="https://blockchaintoken.com" style="color:#b8941e">blockchaintoken.com</a> ·
|
| 207 |
+
API: <a href="https://blockchaintoken.com/api.php?action=stats" style="color:#b8941e">Free JSON API</a> ·
|
| 208 |
+
<a href="https://dogeparty.net" style="color:#b8941e">Dogeparty</a> ·
|
| 209 |
+
<a href="https://counterparty.io" style="color:#b8941e">Counterparty</a>
|
| 210 |
</p>
|
| 211 |
</div>
|
| 212 |
""")
|