Spaces:
Sleeping
Sleeping
Sync app from GitHub Actions (feature/project-state-security-privacy-review)
Browse files- src/ui/login_page.py +4 -4
- src/ui/theme.py +30 -0
src/ui/login_page.py
CHANGED
|
@@ -87,10 +87,10 @@ def create_login_page(
|
|
| 87 |
Returns:
|
| 88 |
Tuple of (session_output, error_message, login_button)
|
| 89 |
"""
|
| 90 |
-
with gr.Row():
|
| 91 |
-
with gr.Column(scale=1):
|
| 92 |
gr.Markdown("")
|
| 93 |
-
with gr.Column(scale=6):
|
| 94 |
gr.Markdown("# BirdNET Validation Platform")
|
| 95 |
|
| 96 |
session_output = gr.Textbox(
|
|
@@ -127,7 +127,7 @@ def create_login_page(
|
|
| 127 |
)
|
| 128 |
login_button = gr.Button("Login", variant="primary", scale=1)
|
| 129 |
error_message = gr.Markdown()
|
| 130 |
-
with gr.Column(scale=1):
|
| 131 |
gr.Markdown("")
|
| 132 |
|
| 133 |
if enable_oauth_login and login_button is not None:
|
|
|
|
| 87 |
Returns:
|
| 88 |
Tuple of (session_output, error_message, login_button)
|
| 89 |
"""
|
| 90 |
+
with gr.Row(elem_classes=["bn-login-row"]):
|
| 91 |
+
with gr.Column(scale=1, elem_classes=["bn-login-spacer"]):
|
| 92 |
gr.Markdown("")
|
| 93 |
+
with gr.Column(scale=6, elem_classes=["bn-login-panel"]):
|
| 94 |
gr.Markdown("# BirdNET Validation Platform")
|
| 95 |
|
| 96 |
session_output = gr.Textbox(
|
|
|
|
| 127 |
)
|
| 128 |
login_button = gr.Button("Login", variant="primary", scale=1)
|
| 129 |
error_message = gr.Markdown()
|
| 130 |
+
with gr.Column(scale=1, elem_classes=["bn-login-spacer"]):
|
| 131 |
gr.Markdown("")
|
| 132 |
|
| 133 |
if enable_oauth_login and login_button is not None:
|
src/ui/theme.py
CHANGED
|
@@ -29,13 +29,43 @@ main.app,
|
|
| 29 |
}
|
| 30 |
|
| 31 |
.gradio-container {
|
|
|
|
| 32 |
max-width: 1540px !important;
|
|
|
|
|
|
|
| 33 |
}
|
| 34 |
|
| 35 |
.bn-shell {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
padding-top: 8px;
|
| 37 |
}
|
| 38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
.bn-app-header {
|
| 40 |
display: flex;
|
| 41 |
justify-content: space-between;
|
|
|
|
| 29 |
}
|
| 30 |
|
| 31 |
.gradio-container {
|
| 32 |
+
width: calc(100% - 32px) !important;
|
| 33 |
max-width: 1540px !important;
|
| 34 |
+
margin-left: auto !important;
|
| 35 |
+
margin-right: auto !important;
|
| 36 |
}
|
| 37 |
|
| 38 |
.bn-shell {
|
| 39 |
+
width: 100% !important;
|
| 40 |
+
max-width: 1540px !important;
|
| 41 |
+
margin-left: auto !important;
|
| 42 |
+
margin-right: auto !important;
|
| 43 |
padding-top: 8px;
|
| 44 |
}
|
| 45 |
|
| 46 |
+
.bn-login-row {
|
| 47 |
+
justify-content: center !important;
|
| 48 |
+
width: 100% !important;
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
.bn-login-spacer {
|
| 52 |
+
display: none !important;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
.bn-login-panel {
|
| 56 |
+
flex: 0 1 680px !important;
|
| 57 |
+
max-width: 680px !important;
|
| 58 |
+
min-width: 0 !important;
|
| 59 |
+
margin-left: auto !important;
|
| 60 |
+
margin-right: auto !important;
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
.bn-login-panel > *,
|
| 64 |
+
.bn-login-panel .block,
|
| 65 |
+
.bn-login-panel .form {
|
| 66 |
+
width: 100% !important;
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
.bn-app-header {
|
| 70 |
display: flex;
|
| 71 |
justify-content: space-between;
|