Skip to content

Commit

Permalink
update Quasar to version 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Helmut Hänsel committed Feb 12, 2024
1 parent 583a344 commit dcb4541
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
1 change: 1 addition & 0 deletions assets/css/quasar.prod.css

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions assets/js/quasar.umd.prod.js

Large diffs are not rendered by default.

19 changes: 13 additions & 6 deletions src/StippleUI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ const assets_config = Genie.Assets.AssetsConfig(package = "StippleUI.jl")

function deps_routes() :: Nothing
if ! Genie.Assets.external_assets(assets_config)
Genie.Router.route(Genie.Assets.asset_route(assets_config, :css, file="quasar.min")) do
Genie.Router.route(Genie.Assets.asset_route(assets_config, :css, file="quasar.prod")) do
Genie.Renderer.WebRenderable(
Genie.Assets.embedded(Genie.Assets.asset_file(cwd=normpath(joinpath(@__DIR__, "..")), type="css", file="quasar.min")),
Genie.Assets.embedded(Genie.Assets.asset_file(cwd=normpath(joinpath(@__DIR__, "..")), type="css", file="quasar.prod")),
:css) |> Genie.Renderer.respond
end
end

if ! Genie.Assets.external_assets(assets_config)
Genie.Router.route(Genie.Assets.asset_route(assets_config, :js, file="quasar.umd.min")) do
Genie.Router.route(Genie.Assets.asset_route(assets_config, :js, file="quasar.umd.prod")) do
Genie.Renderer.WebRenderable(
Genie.Assets.embedded(Genie.Assets.asset_file(cwd=normpath(joinpath(@__DIR__, "..")), type="js", file="quasar.umd.min")),
Genie.Assets.embedded(Genie.Assets.asset_file(cwd=normpath(joinpath(@__DIR__, "..")), type="js", file="quasar.umd.prod")),
:javascript) |> Genie.Renderer.respond
end
end
Expand All @@ -31,18 +31,23 @@ end

function theme() :: Vector{String}
[
Stipple.Elements.stylesheet(Genie.Assets.asset_path(assets_config, :css, file="quasar.min"))
Stipple.Elements.stylesheet(Genie.Assets.asset_path(assets_config, :css, file="quasar.prod"))
]
end

#===#

function deps() :: Vector{String}
[
Genie.Renderer.Html.script(src="$(Genie.Assets.asset_path(assets_config, :js, file="quasar.umd.min"))")
Genie.Renderer.Html.script(src="$(Genie.Assets.asset_path(assets_config, :js, file="quasar.umd.prod"))")
]
end

function plugins() :: Vector{String}
[
"Quasar"
]
end
#===#

include("API.jl")
Expand Down Expand Up @@ -169,7 +174,9 @@ end
function __init__()
deps_routes()
push!(Stipple.Layout.THEMES[], theme)
Stipple.add_css(theme)
Stipple.deps!(@__MODULE__, deps)
Stipple.add_plugins(plugins)

@static if !isdefined(Base, :get_extension)
@require DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" begin
Expand Down

0 comments on commit dcb4541

Please sign in to comment.