Skip to content

Commit

Permalink
refactor: Move ui.Theme.from_brand() Sass code into an .scss file (
Browse files Browse the repository at this point in the history
  • Loading branch information
gadenbuie authored Dec 31, 2024
1 parent ecc5c14 commit 41b8797
Show file tree
Hide file tree
Showing 5 changed files with 337 additions and 286 deletions.
5 changes: 1 addition & 4 deletions examples/brand/app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
from pathlib import Path

import matplotlib.pyplot as plt
Expand All @@ -7,10 +6,8 @@
from shiny import App, render, ui
from shiny.ui._theme_brand import bootstrap_colors

# TODO: Move this into the test that runs this app
os.environ["SHINY_BRAND_YML_RAISE_UNMAPPED"] = "true"
theme = ui.Theme.from_brand(__file__)
# theme = ui.Theme()
# theme = ui.Theme() ## default theme
theme.add_rules((Path(__file__).parent / "_colors.scss").read_text())

app_ui = ui.page_navbar(
Expand Down
Loading

0 comments on commit 41b8797

Please sign in to comment.