Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to insert svg icons or insert images, can you help me? #470

Open
liuwa666 opened this issue Sep 29, 2021 · 1 comment
Open

How to insert svg icons or insert images, can you help me? #470

liuwa666 opened this issue Sep 29, 2021 · 1 comment

Comments

@liuwa666
Copy link

as the title mentioned, i just want to insert bootstrap icons in my UI by using webio's dom"" string macro, thanks

@liuwa666
Copy link
Author

cd("E:\\daisyui")
pwd()
using Pkg
Pkg.activate(".")
using  Revise, WebIO, Mux
nodedaisybutton = dom"button.btn.btn-outline.btn-accent"(
    dom"img[src=icons/list.svg, alt=Bootstrap]"(),
)
scope = Scope()
scope.dom = nodedaisybutton
scope.imports=[Asset("https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css"), 
    Asset("https://cdn.jsdelivr.net/npm/[email protected]/dist/full.css")]

webio_serve(page("/", req -> scope), 8666)

image

the image source folder "icons" contains bootstrap icons 1.15 which i downloaded from github website, so the method i used
does not work.

julia> versioninfo()
Julia Version 1.6.2
Commit 1b93d53fc4 (2021-07-14 15:36 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: AMD Ryzen 9 5900HX with Radeon Graphics
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, generic)
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS =

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant