mirror of
https://github.com/gradio-app/gradio.git
synced 2025-03-07 11:46:51 +08:00
reintroduce custom css support
This commit is contained in:
parent
31919a884c
commit
e49e88c244
@ -28,6 +28,12 @@ get_config().then(config => {
|
|||||||
if (config.auth_required) {
|
if (config.auth_required) {
|
||||||
ReactDOM.render(<Login {...config} />, document.getElementById('root'))
|
ReactDOM.render(<Login {...config} />, document.getElementById('root'))
|
||||||
} else {
|
} else {
|
||||||
|
if (config.css !== null) {
|
||||||
|
var head = document.head || document.getElementsByTagName('head')[0],
|
||||||
|
style = document.createElement('style');
|
||||||
|
head.appendChild(style);
|
||||||
|
style.appendChild(document.createTextNode(config.css));
|
||||||
|
}
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
<div class="gradio_page">
|
<div class="gradio_page">
|
||||||
{config.title ? <h1 className="title">{config.title}</h1> : false}
|
{config.title ? <h1 className="title">{config.title}</h1> : false}
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
numpy
|
Flask-Cors>=3.0.8
|
||||||
scipy
|
Flask-Login
|
||||||
matplotlib
|
Flask>=1.1.1
|
||||||
pandas
|
analytics-python
|
||||||
pillow
|
|
||||||
ffmpy
|
ffmpy
|
||||||
|
flask-cachebuster
|
||||||
markdown2
|
markdown2
|
||||||
|
matplotlib
|
||||||
|
numpy
|
||||||
|
pandas
|
||||||
|
paramiko
|
||||||
|
pillow
|
||||||
pycryptodome
|
pycryptodome
|
||||||
requests
|
requests
|
||||||
paramiko
|
scipy
|
||||||
analytics-python
|
|
||||||
Flask>=1.1.1
|
|
||||||
Flask-Cors>=3.0.8
|
|
||||||
flask-cachebuster
|
|
||||||
Flask-Login
|
|
||||||
|
@ -239,6 +239,7 @@ class Interface:
|
|||||||
"description": self.description,
|
"description": self.description,
|
||||||
"article": self.article,
|
"article": self.article,
|
||||||
"theme": self.theme,
|
"theme": self.theme,
|
||||||
|
"css": self.css,
|
||||||
"thumbnail": self.thumbnail,
|
"thumbnail": self.thumbnail,
|
||||||
"allow_screenshot": self.allow_screenshot,
|
"allow_screenshot": self.allow_screenshot,
|
||||||
"allow_flagging": self.allow_flagging,
|
"allow_flagging": self.allow_flagging,
|
||||||
|
Loading…
Reference in New Issue
Block a user