Any tips for placing an image at a point on a clerk notebook? For example as if it was right aligned?
If you mean how to place images from cell results, you might nest them inside clerk/html like so:
(clerk/html
[:div.flex.justify-end
(clerk/image "some-image.png")])
and use the markup that best fits your use case (e.g using https://tailwindcss.com/docs/flex-basis)html seemed to be the way to go
(clerk/html "
align=right> ")clerk/html also takes hiccup...
Is there a recommended way to display a table wider than the default width? Iāve got a table with lots of columns, and Iād like to use more space to show the table.
you can use {clerk/width :full} as either metadata or a first map arg to clerk/table
That did the trick. Thank you!
Iām looking into the data on my personal web site. Earlier, I just used the terminal. Putting a big table on a big screen was super helpful.
(defn big-table [x]
(v/with-viewer (dissoc v/table-viewer :page-size)
x))
^{::clerk/width :full}
(big-table
(->> (cli/files->relations {})
vals
(sort-by :slug)))Did I tell you earlier that I think Clerk is great? I might have to tell you again š
I feel like I've seen this asked several times before but I can't seem to find the answer: How do I get local images in my notebook to appear in the static version?
One option is clerk/image and .
A limitation then is SVG support, I donāt think java images support SVG natively. For SVG, reading the raw file and then viewing with clerk/html worked for me.
Both screenshots are taken from Clerk garden, so Iād say thatās a āstatic versionā.
What are you expecting and what isnāt working? Iāve felt like the book answered how to show images well for my use cases.
For io/resource to work, you probably need to make sure the image file is on the classpath. You can control the classpath with :paths ["src" "resources"] in deps.edn.
Thank you! Yes! I think āio/resourceā was what Iād seen suggested before