Skip to content

Commit

Permalink
never add core_theme to THEMES
Browse files Browse the repository at this point in the history
  • Loading branch information
hhaensel committed Oct 10, 2024
1 parent 3b0d87d commit 287d8db
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/Layout.jl
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,11 @@ function htmldiv(args...;
Genie.Renderer.Html.div(args...; kwargs...)
end

function coretheme()
stylesheet("https://fonts.googleapis.com/css?family=Material+Icons"),
stylesheet(Genie.Assets.asset_path(Stipple.assets_config, :css, file="stipplecore"))
end

"""
function theme() :: String
Expand All @@ -528,20 +533,12 @@ julia> push!(Stipple.Layout.THEMES[], StippleUI.theme)
function theme(; core_theme::Bool = true) :: Vector{String}
output = String[]

if core_theme
push!(THEMES[], () -> begin
stylesheet("https://fonts.googleapis.com/css?family=Material+Icons"),
stylesheet(Genie.Assets.asset_path(Stipple.assets_config, :css, file="stipplecore"))
end
)
end

unique!(THEMES[])

for f in THEMES[]
push!(output, f()...)
end

core_theme && coretheme THEMES[] && push!(output, coretheme()...)

output
end

Expand Down

0 comments on commit 287d8db

Please sign in to comment.