tiahchia commited on
Commit
0ad4bec
Β·
verified Β·
1 Parent(s): 744edd0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -13
app.py CHANGED
@@ -36,7 +36,7 @@ starter_web = """<!DOCTYPE html>
36
  <head>
37
  <style>
38
  body { font-family: monospace; background:#1e1e1e; color:#00ff00; }
39
- h1 { color:#D16BA5; text-align:center; }
40
  </style>
41
  </head>
42
  <body>
@@ -44,16 +44,17 @@ h1 { color:#D16BA5; text-align:center; }
44
  </body>
45
  </html>"""
46
 
47
- with gr.Blocks(css="""
48
- body { margin:0; padding:0; font-family:'Poppins', sans-serif; background:#121212; color:#e0e0e0; }
49
- .gradio-container { max-width:1200px; margin:auto; padding:20px; }
50
- .gr-row { display:flex; gap:20px; margin-top:20px; }
51
- .output-panel { flex:1; background:#1e1e1e; border-radius:8px; box-shadow:0 4px 8px rgba(0,0,0,0.5); height:500px; padding:16px; font-family: monospace; color: #00ff00; white-space: pre-wrap; overflow:auto; }
52
- .gr-textbox textarea { font-family: monospace; background:#1e1e1e; color:#e0e0e0; border:none; border-radius:8px; padding:16px; height:500px; overflow:auto; }
53
- .gr-radio { color:#e0e0e0; margin-bottom:16px; }
54
- button, .gr-button { background-color:#D16BA5 !important; color:#fff !important; border-radius:6px !important; padding:10px 20px !important; }
55
- footer { display:none !important; } /* Hide Gradio footer */
56
- header { background:#000000; padding:16px; color:#D16BA5; font-size:1.8em; text-align:center; margin-top:20px; }
 
57
  """) as demo:
58
 
59
  # Language selector at the top
@@ -77,8 +78,13 @@ header { background:#000000; padding:16px; color:#D16BA5; font-size:1.8em; text-
77
  # Render button
78
  render_button = gr.Button("Render")
79
 
80
- # Footer-style header at the bottom
81
- gr.Markdown("<header>Fun Code Playground – Powered by Simple & Static</header>")
 
 
 
 
 
82
 
83
  # Update starter template on language change
84
  def update_template(lang):
 
36
  <head>
37
  <style>
38
  body { font-family: monospace; background:#1e1e1e; color:#00ff00; }
39
+ h1 { color:#F714C5; text-align:center; }
40
  </style>
41
  </head>
42
  <body>
 
44
  </body>
45
  </html>"""
46
 
47
+ with gr.Blocks(css=f"""
48
+ body {{ margin:0; padding:0; font-family:'Poppins', sans-serif; background:#121212; color:#e0e0e0; }}
49
+ .gradio-container {{ max-width:1200px; margin:auto; padding:20px; }}
50
+ .gr-row {{ display:flex; gap:20px; margin-top:20px; }}
51
+ .output-panel {{ flex:1; background:#1e1e1e; border-radius:8px; box-shadow:0 4px 8px rgba(0,0,0,0.5); height:500px; padding:16px; font-family: monospace; color: #00ff00; white-space: pre-wrap; overflow:auto; }}
52
+ .gr-textbox textarea {{ font-family: monospace; background:#1e1e1e; color:#e0e0e0; border:none; border-radius:8px; padding:16px; height:500px; overflow:auto; }}
53
+ .gr-radio {{ color:#e0e0e0; margin-bottom:16px; }}
54
+ button, .gr-button {{ background-color:#F714C5 !important; color:#fff !important; border-radius:6px !important; padding:10px 20px !important; }}
55
+ footer {{ display:none !important; }} /* Hide Gradio footer */
56
+ header {{ background:#000000; padding:16px; color:#F714C5; font-size:1.6em; text-align:center; margin-top:20px; }}
57
+ header img {{ vertical-align:middle; height:20px; margin-right:8px; }}
58
  """) as demo:
59
 
60
  # Language selector at the top
 
78
  # Render button
79
  render_button = gr.Button("Render")
80
 
81
+ # Footer with logo + text
82
+ gr.Markdown("""
83
+ <header>
84
+ <img src="https://simpleandstatic.com/favicon.ico" alt="Logo" />
85
+ πš‚πš’πš–πš™πš•πšŽ & πš‚πšπšŠπšπš’πšŒ
86
+ </header>
87
+ """)
88
 
89
  # Update starter template on language change
90
  def update_template(lang):