Skip to content

Commit 370c16f

Browse files
fix(showcase): update LocalImage function to accept kwargs and improve image handling
1 parent eb6b971 commit 370c16f

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

binder/start

100755100644
File mode changed.

showcase/showcase1.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ begin
7474
write(io, "</p></details>")
7575
end
7676

77-
LocalImage(x) = display(LocalResource(joinpath(@__DIR__, "assets", "img", x)))
77+
LocalImage(x, kwargs) = LocalResource(joinpath(@__DIR__, "assets", "img", x), kwargs...)
7878
end
7979

8080
# ╔═╡ b806b033-db55-4033-a975-ae3fe609b345
@@ -118,7 +118,7 @@ md"""
118118

119119
# ╔═╡ a38bd2da-4ee7-4b16-88ae-f2eeb426dff3
120120
md"""
121-
## About Etch
121+
## Etch
122122
"""
123123

124124
# ╔═╡ 6c6e4d21-cc38-46eb-8178-4cc4a99adcba
@@ -145,7 +145,7 @@ TwoColumn(
145145
2. ###### **Protection** of cable-based systems
146146
3. ###### **Control** interactions
147147
4. ###### **Resilient HVDC** grids
148-
$(LocalResource(joinpath(@__DIR__, "assets", "img", "future_grids.svg")), :width => 600, :style => "display: block; float: left; margin-left: auto; margin-right: auto;"))
148+
$(LocalResource(joinpath(@__DIR__, "assets", "img", "future_grids.svg"), :width => 600, :style => "display: block; float: left; margin-left: auto; margin-right: auto;"))
149149
""")
150150

151151
# ╔═╡ 3e6a9c64-827d-4491-bcac-252ee7b1dc81
@@ -171,7 +171,7 @@ TwoColumn(
171171
- #### Cables as a part of multi-GW future power grids.
172172
173173
""",
174-
md"""$(LocalImage("cables1.png"), :width => 250, :style => "display: block; margin-left: auto; margin-right: auto; margin-bottom: 50px;"))
174+
md"""$(LocalImage("cables1.png", :width => 250, :style => "display: block; margin-left: auto; margin-right: auto; margin-bottom: 50px;"))
175175
$(LocalImage("cables2.png"), :width => 250, :style => "display: block; margin-left: auto; margin-right: auto;"))
176176
""")
177177

@@ -684,7 +684,7 @@ md"""
684684
# ╟─3e6a9c64-827d-4491-bcac-252ee7b1dc81
685685
# ╠═877a84cc-979f-48c9-ac41-59be60b4850b
686686
# ╟─a3f5a8c5-4ab9-4a33-abab-7907ffab1347
687-
# ╟─3ff0eea3-9f1d-487f-a752-be6462f4bfb7
687+
# ╠═3ff0eea3-9f1d-487f-a752-be6462f4bfb7
688688
# ╟─a8ea0da0-36f1-44d4-9415-d3041f34c23f
689689
# ╟─f5fa7e28-97a7-456b-87a9-5ac4b76be9d4
690690
# ╟─8c2eaef0-4e01-41b9-b1a6-a20dfa9b2d57

0 commit comments

Comments
 (0)