diff --git a/solara/website/components/header.py b/solara/website/components/header.py index c3ad7a951..68070978c 100644 --- a/solara/website/components/header.py +++ b/solara/website/components/header.py @@ -32,9 +32,10 @@ def Header( with solara.Button(icon=True, class_="hidden-md-and-up", on_click=lambda: on_toggle_left_menu and on_toggle_left_menu()): rv.Icon(children=["mdi-menu"]) + display = " d-none d-sm-flex" if route_current is not None and route_current.path not in ["about", "pricing", "careers"] else " d-flex" with solara.v.Html( tag="div", - class_="header-logo-container d-none d-sm-flex", + class_="header-logo-container" + display, style_=""" background-color: transparent; flex-grow: 1; @@ -46,16 +47,17 @@ def Header( solara.Image(router.root_path + f"/static/assets/images/logo{'_white' if dark_effective else ''}.svg", classes=["header-logo"]) solara.Text("API", style={"font-size": "20px", "font-weight": "600"}) - if settings.search.enabled: - from solara_enterprise.search.search import Search + if route_current is not None and route_current.path not in ["about", "pricing", "careers"]: + if settings.search.enabled: + from solara_enterprise.search.search import Search - Search() - else: - Algolia() + Search() + else: + Algolia() with rv.Html(tag="ul", class_="main-menu menu d-none d-md-flex", style_="justify-content: flex-end;"): for route in all_routes: - if route.path in ["apps", "contact", "changelog"]: + if route.path in ["apps", "contact", "changelog", "our_team", "about", "pricing", "roadmap", "careers"]: continue current = route_current == route with rv.Html(tag="li", class_="active" if current else None): diff --git a/solara/website/components/markdown.py b/solara/website/components/markdown.py index 18f066c45..0d03e3279 100644 --- a/solara/website/components/markdown.py +++ b/solara/website/components/markdown.py @@ -27,7 +27,9 @@ def MarkdownWithMetadata(content: str, unsafe_solara_execute=True): solara.Meta(property=key, content=value) else: solara.Meta(name=key, content=value) - with solara.v.Html(tag="div", style_="display: flex; flex-direction: row; gap: 15px;", attributes={"id": "markdown-to-navigate"}): + with solara.v.Html( + tag="div", style_="display: flex; flex-direction: row; gap: 15px; max-width: 90%; margin: 0 auto;", attributes={"id": "markdown-to-navigate"} + ): solara.Markdown(content, unsafe_solara_execute=unsafe_solara_execute, style="flex-grow: 1;") MarkdownNavigation(id="markdown-to-navigate").key("markdown-nav" + str(hash(content))) diff --git a/solara/website/components/sidebar.py b/solara/website/components/sidebar.py index 21d430e5c..5538c9947 100644 --- a/solara/website/components/sidebar.py +++ b/solara/website/components/sidebar.py @@ -95,5 +95,9 @@ def Sidebar(): with solara.v.ListItem(value="/changelog"): solara.v.ListItemIcon(children=[solara.v.Icon(children=["mdi-history"])]) solara.v.ListItemTitle(style_="padding: 0 20px;", children=["Changelog"]) + with solara.Link("/roadmap"): + with solara.v.ListItem(value="/roadmap"): + solara.v.ListItemIcon(children=[solara.v.Icon(children=["mdi-road"])]) + solara.v.ListItemTitle(style_="padding: 0 20px;", children=["Roadmap"]) return main diff --git a/solara/website/pages/careers/__init__.py b/solara/website/pages/careers/__init__.py index 37fdb60b6..f13b7a19c 100644 --- a/solara/website/pages/careers/__init__.py +++ b/solara/website/pages/careers/__init__.py @@ -8,7 +8,8 @@ def Page(): """ # Careers We are always looking for talented individuals to join our team. If you're still be interested after reading the rest of this page, reach out at [contact@widgetti.io](mailto:contact@widgetti.io). - """ + """, + style={"max-width": "90%", "margin": "0 auto"}, ) with solara.Row(style={"flex-wrap": "wrap", "align-items": "stretch"}, gap="0"): with Tile(): diff --git a/solara/website/pages/changelog/__init__.py b/solara/website/pages/changelog/__init__.py index d7cff996b..cad468b06 100644 --- a/solara/website/pages/changelog/__init__.py +++ b/solara/website/pages/changelog/__init__.py @@ -1,10 +1,10 @@ from pathlib import Path -import solara from solara.website.components.sidebar import Sidebar +from solara.website.components import MarkdownWithMetadata title = "Changelog" HERE = Path(__file__) -Page = solara.Markdown(Path(HERE.parent / "changelog.md").read_text()) +Page = MarkdownWithMetadata(Path(HERE.parent / "changelog.md").read_text()) Sidebar = Sidebar diff --git a/solara/website/pages/our_team/__init__.py b/solara/website/pages/our_team/__init__.py index fe520c93b..f76ba2876 100644 --- a/solara/website/pages/our_team/__init__.py +++ b/solara/website/pages/our_team/__init__.py @@ -3,7 +3,7 @@ @solara.component def Page(): - with solara.Column(gap="40px"): + with solara.Column(gap="40px", style={"max-width": "90%"}): solara.Markdown(""" # Our Team @@ -54,12 +54,12 @@ def DevCard( website=None, email=None, ): - with solara.Row(gap="40px", style={"align-items": "stretch"}): - with solara.Div(style={"flex": "1 0 200px", "border-radius": "15px", "overflow": "hidden", "aspect-ratio": "1/1"}): + with solara.Row(gap="40px", style={"align-items": "stretch", "max-height": "300px", "flex": "1 1 auto"}): + with solara.Div(style={"flex": "0 1 300px", "border-radius": "15px", "overflow": "hidden", "aspect-ratio": "1/1"}): solara.v.Html( tag="img", attributes={"src": image or "https://dxhl76zpt6fap.cloudfront.net/public/logo.svg", "alt": name}, - style_="width: 100%; height: 100%; object-fit: cover;", + style_="height: 100%; aspect-ratio: 1; object-fit: cover;", ) with solara.Column(): solara.HTML(tag="h2", unsafe_innerHTML=name) diff --git a/solara/website/pages/roadmap/__init__.py b/solara/website/pages/roadmap/__init__.py index a185b0b82..693bf425f 100644 --- a/solara/website/pages/roadmap/__init__.py +++ b/solara/website/pages/roadmap/__init__.py @@ -1,9 +1,11 @@ from pathlib import Path from solara.website.components.markdown import MarkdownWithMetadata +from solara.website.components.sidebar import Sidebar title = "Roadmap" HERE = Path(__file__) +Sidebar = Sidebar Page = MarkdownWithMetadata(Path(HERE.parent / "roadmap.md").read_text())