Skip to content

Commit

Permalink
add theme toggle button, change dark primary color
Browse files Browse the repository at this point in the history
  • Loading branch information
iisakkirotko authored and maartenbreddels committed Mar 11, 2024
1 parent 9503f9b commit d336c1c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion solara/website/assets/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
--jp-content-font-size5: 2.25rem;

--dark-color-primary-lightest: #26273D;
--dark-color-primary: #ff991f;
--dark-color-primary: #7A8AFF;
--dark-color-primary-darker: #262D69;
--dark-color-text: hsla(0,0%,100%,.7);
--dark-color-grey: #ababab;
Expand Down Expand Up @@ -52,6 +52,10 @@ a:link {
color: var(--dark-color-primary);
}

.theme--dark .jp-RenderedHTMLCommon a:visited {
color: var(--dark-color-primary);
}

.jp-RenderedHTMLCommon pre {
background-color: var(--color-grey-light);
display: block;
Expand Down
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: '#ff991f',
primary: '#7A8AFF',
}
}
3 changes: 3 additions & 0 deletions solara/website/components/header.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Callable

import solara
import solara.lab
from solara.alias import rv
from solara.server import settings

Expand Down Expand Up @@ -71,5 +72,7 @@ def Header(
with rv.Btn(icon=True, tag="a", class_="d-none d-md-flex", attributes={"href": "https://discord.gg/dm4GKNDjXN", "target": "_blank"}):
rv.Icon(children=["mdi-discord"])

solara.lab.ThemeToggle()

with solara.Button(icon=True, class_="hidden-md-and-up", on_click=lambda: on_toggle_right_menu and on_toggle_right_menu()):
rv.Icon(children=["mdi-menu"])

0 comments on commit d336c1c

Please sign in to comment.