From 846f1ba4725ead1aba69070f1bca203769dea382 Mon Sep 17 00:00:00 2001 From: Pietro Vertechi Date: Sun, 12 May 2019 17:43:11 +0100 Subject: [PATCH] try jsasset --- src/Interact.jl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Interact.jl b/src/Interact.jl index b7e0eaa..e7287eb 100644 --- a/src/Interact.jl +++ b/src/Interact.jl @@ -26,6 +26,21 @@ function InteractBase.libraries(::Bulma) vcat(InteractBase.font_awesome, InteractBase.style_css, bulmalib) end +function InteractBase.slap_design!(widget::Scope, ::Bulma) + InteractBase.isijulia() ? import!(widget, bulma_confined_css) : import!(widget, bulma_css) + import!(widget, InteractBase.style_css) + jsasset = WebIO.JSAsset(InteractBase.font_awesome) + onmount(widget, js""" + function() { + if (document.querySelector("fa") === null) { + $jsasset + } + } + """ + ) + return widget +end + function __init__() InteractBase.registertheme!(:bulma, Bulma()) settheme!(Bulma())