Jade Templates: Make Image Link
So, in HTML, I would do something like this:
<a href="www.something.com"> <img src="my/machine"> </a> to make the image into a link. But I want to do the same for Jade. I read the docs here , but didn't say anything about what I want. Please help me? Thank you very much in advance.
+7
Giancarlo manuel guerra salvΓ‘
source share2 answers
What you do is nested elements. Nesting only requires new lines and tabs at the socket level.
Jade:
a(href='www.something.com') img(src='my/machine') +9
technophobia
source shareUse img(src= someExpr) , where someExpr will be evaluated along the path to your image.
0
Nick Papanastasiou
source share