Skip to content

Commit

Permalink
incorporate feedback from review
Browse files Browse the repository at this point in the history
  • Loading branch information
iisakkirotko authored and maartenbreddels committed Mar 8, 2024
1 parent ba35750 commit fa6c862
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 24 deletions.
2 changes: 1 addition & 1 deletion solara/components/applayout.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def set_path(index):
close_on_content_click=False,
):
pass
v.Html(tag="div", children=children_sidebar, style_="background-color: white; padding: 12px; min-width: 400px")
v.Sheet(children=children_sidebar, style_="padding: 12px; min-width: 400px")
if title or children_appbartitle:
v.ToolbarTitle(children=children_appbartitle or [title])
v.Spacer()
Expand Down
23 changes: 20 additions & 3 deletions solara/website/assets/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
--jp-content-font-size5: 2.25rem;

--dark-color-primary-lightest: #26273D;
--dark-color-primary: #7A8AFF;
--dark-color-primary-darker: #262D69;
/* --dark-color-primary: #7A8AFF; */
--dark-color-primary: #f77e14;
--dark-color-primary-darker: #303886;
--dark-color-text: hsla(0,0%,100%,.7);
--dark-color-grey: #ababab;
--dark-color-grey-light: #202020;
Expand Down Expand Up @@ -162,7 +163,8 @@ blockquote p:last-child {
}

.theme--dark .v-btn.homepage-button {
background-color: var(--dark-color-primary-darker) !important;
background-color: var(--dark-color-primary) !important;
color: var(--dark-color-grey-light);
}

.v-card.testimonial-card{
Expand Down Expand Up @@ -198,6 +200,21 @@ blockquote p:last-child {
color: var(--dark-color-primary-darker) !important;
}

/* header */
.news {
background-color: var(--color-primary);
padding: 10px;
font-size: 20px;
display: flex;
justify-content: center;
}
.theme--dark .news {
background-color: var(--dark-color-primary);
}
.news a {
color: white !important;
}

/* hero */
.hero {
background: var(--color-primary-lightest) url(https://dxhl76zpt6fap.cloudfront.net/public/hero.webp);
Expand Down
50 changes: 50 additions & 0 deletions solara/website/assets/images/logo_white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion solara/website/assets/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ vuetifyThemes = {
primary: '#ff991f',
},
dark: {
primary: '#7A8AFF',
primary: '#f77e14',
}
}
22 changes: 4 additions & 18 deletions solara/website/components/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
from solara.alias import rv
from solara.server import settings

# TODO: remove import once function is included in solara
from solara.website.pages.apps.scatter import use_dark_effective


@solara._component_vue("algolia.vue")
def Algolia(app_id: str, index_name: str, api_key: str, debug=False):
Expand All @@ -22,23 +25,6 @@ def Header(

# set states for menu
with solara.Column(gap="0px"):
solara.Style(
"""
.news {
background-color: var(--color-primary);
padding: 10px;
font-size: 20px;
display: flex;
justify-content: center;
}
.theme--dark .news {
background-color: var(--dark-color-primary-darker);
}
.news a {
color: white !important;
}
"""
)
with solara.Div(classes=["news"]):
solara.HTML(
"div",
Expand All @@ -50,7 +36,7 @@ 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"])
with solara.Link(path_or_route="/"):
solara.Image(router.root_path + "/static/assets/images/logo.svg")
solara.Image(router.root_path + f"/static/assets/images/logo{'_white' if use_dark_effective() else ''}.svg")
rv.Spacer()

if settings.search.enabled:
Expand Down
19 changes: 18 additions & 1 deletion solara/website/templates/index.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,25 @@
color: #182026;
}
.theme--dark .DocSearch-Button {
background-color: #26273D;
color: hsla(0,0%,100%,.7);
}
.DocSearch-Button:hover {
background-color: rgb(255, 247, 227);
background-color: rgba(150,150,200,0.15);
}
.theme--dark .DocSearch-Button:hover {
background-color: rgba(255, 255, 255, 0.15);
}
.DocSearch-Button .DocSearch-Search-Icon {
color: #26273D;
}
.theme--dark .DocSearch-Button .DocSearch-Search-Icon {
color: #ff991f;
}
</style>

Expand Down

0 comments on commit fa6c862

Please sign in to comment.