👀 Reading hidden code
using PlutoUI .ExperimentalLayout: grid, vbox, hbox, Div
UndefVarError: EmbeddableCellOutput not defined
Here is what happened, the most recent locations are first:
- getpropertyfrom Base.jl:35
- (::var"#9#10"{Module})
(id::Base.UUID) from This cell: line 4map(ids) do id
PlutoRunner.EmbeddableCellOutput(id)
end...
- Show more...
👀 Reading hidden code
hbox([bond, p1, p2])
👀 Reading hidden code
hbox([bond, bond, p1, p2])
👀 Reading hidden code
UndefVarError: EmbeddableCellOutput not defined
Here is what happened, the most recent locations are first:
- getpropertyfrom Base.jl:35
- from This cell: line 1
PlutoRunner.EmbeddableCellOutput(ids[1])
computer bad, you GREAT!
PlutoRunner.EmbeddableCellOutput(ids[1])
👀 Reading hidden code
UndefVarError: EmbeddableCellOutput not defined
Here is what happened, the most recent locations are first:
- getpropertyfrom Base.jl:35
- (::var"#7#8"{Module})
(id::Base.UUID) from This cell: line 5$(map(ids) do id
PlutoRunner.embed_display(PlutoRunner.EmbeddableCellOutput(id))
end)
- Show more...
@htl("""
<div style="display: flex; flex-direction: row;">
$(PlutoRunner.embed_display(bond))
$(map(ids) do id
PlutoRunner.embed_display(PlutoRunner.EmbeddableCellOutput(id))
end)
</div>
""")
👀 Reading hidden code
using PlutoUI
👀 Reading hidden code
bond = @bind x Slider(1:10)
👀 Reading hidden code
p1 = slowplot(x)
👀 Reading hidden code
p2 = slowplot(x)
👀 Reading hidden code
UUID("622842fd-8a37-4cdc-a970-09323be1e015")
UUID("fb76aeaf-5ac2-4def-8e6e-e8014c292c10")
UUID("351adbda-e969-409a-9395-770e36478fb4")
👀 Reading hidden code
👀 Reading hidden code
slowplot (generic function with 1 method)
function slowplot(x; kwargs...)
sleep(1)
plot(rand(10) .+ x; size=(150,150), legend=false, kwargs...)
end
👀 Reading hidden code
using Plots
👀 Reading hidden code
WARNING: using Plots.grid in module workspace#4 conflicts with an existing identifier.
👀 Reading hidden code
using UUIDs
👀 Reading hidden code
UUID("97914842-76d2-11eb-0c48-a7eedca870fb")
id1 = UUID("97914842-76d2-11eb-0c48-a7eedca870fb")
👀 Reading hidden code
UndefVarError: EmbeddableCellOutput not defined
Here is what happened, the most recent locations are first:
- getpropertyfrom Base.jl:35
- from This cell: line 1
[rand(), PlutoRunner.EmbeddableCellOutput(id1)]
Be patient :)
[rand(), PlutoRunner.EmbeddableCellOutput(id1)]
👀 Reading hidden code
using HypertextLiteral
👀 Reading hidden code
Sliders and outputs in the same cell
FINALLY
👀 Reading hidden code
PlutoRunner.DivElement(
children=[
slider1,
output1
],
)
👀 Reading hidden code
slider1 = @bind hello Slider(1:100)
👀 Reading hidden code
slider2 = @bind hello2 Slider(1:.1:10)
👀 Reading hidden code
output1 = plot(rand(hello) .^ hello2; size=(200,100), legend=enable1)
👀 Reading hidden code
👀 Reading hidden code
Results
123
main = Div([
md"""## Results""",
grid([
output1 123
output1 output1
]),
coolness
],
style="display: flex; flex-direction: column; flex: 1 1 auto;"
)
👀 Reading hidden code
coolness = Text(repeat("😎", other_number))
👀 Reading hidden code
Parameters
Lorem ipsum asdfasdf dolor sit amet, consectetur adipiscing elit.
Enable something:
And this:
sidebar = Div([
md"""### Parameters
Lorem ipsum asdfasdf dolor sit amet, consectetur adipiscing elit. """,
slider1,
md"---",
slider2,
md"Enable something: $(@bind enable1 CheckBox())",
md"And this: $(@bind other_number NumberField(0:20))",
md"---",
],
style="flex: 1 1 120px; background: #fef; padding: 1em; border-radius: 1em;"
)
👀 Reading hidden code
Results
123
Parameters
Lorem ipsum asdfasdf dolor sit amet, consectetur adipiscing elit.
Enable something:
And this:
hbox([
main,
sidebar,
])
👀 Reading hidden code
👀 Reading hidden code
👀 Reading hidden code
👀 Reading hidden code
👀 Reading hidden code
Appendix
👀 Reading hidden code
# Div(args...; style::String="") = PlutoRunner.DivElement(
# children=[args...],
# style=style
# )
👀 Reading hidden code
# Div(; children=[], style::String="") = PlutoRunner.DivElement(
# children=children,
# style=style
# )
👀 Reading hidden code
# function grid(items::AbstractMatrix; fill_width::Bool=true)
# Div(
# children=Div.(vec(permutedims(items, [2,1]))),
# style="""
# display: $(fill_width ? "grid" : "inline-grid");
# grid-template-columns: repeat($(size(items,2)), auto);
# column-gap: 1em;
# """,
# )
# end
👀 Reading hidden code