Skip to content

Commit

Permalink
Support setting banner message
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvipanda committed Jul 1, 2024
1 parent 28dd39d commit 4f23207
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
1 change: 1 addition & 0 deletions binderhub/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def get(self):
"logoWidth": "320px",
"repoProviders": repoproviders_display_config,
"aboutMessage": self.settings["about_message"],
"bannerHtml": self.settings["banner_message"],
"binderVersion": binder_version,
}
self.render_template(
Expand Down
20 changes: 14 additions & 6 deletions binderhub/static/js/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,22 @@ const router = createBrowserRouter(
);
function App() {
return (
<div className="container-md">
<div className="col-8 offset-md-2">
<div className="text-center m-4">
<img src={PAGE_CONFIG.logoUrl} width={PAGE_CONFIG.logoWidth} />
<>
{PAGE_CONFIG.bannerHtml && (
<div
className="p-3 bg-light shadow-sm text-center"
dangerouslySetInnerHTML={{ __html: PAGE_CONFIG.bannerHtml }}
></div>
)}
<div className="container-md">
<div className="col-8 offset-md-2">
<div className="text-center m-4">
<img src={PAGE_CONFIG.logoUrl} width={PAGE_CONFIG.logoWidth} />
</div>
<RouterProvider router={router} />
</div>
<RouterProvider router={router} />
</div>
</div>
</>
);
}

Expand Down

0 comments on commit 4f23207

Please sign in to comment.